Zalo Group icon

Zalo Group

Quản lý nhóm Zalo

Overview

This node manages Zalo groups by interacting with the Zalo API. It supports various group-related operations such as creating groups, retrieving group information, managing group members and deputies, changing group details (name, avatar), and handling group notes.

The specific operation "Lấy Tất Cả Nhóm" ("Get All Groups") retrieves a list of all Zalo groups associated with the authenticated user, optionally limited by a maximum number of groups to return.

Practical examples:

  • Fetching all groups to display in a dashboard or for further processing.
  • Automating group management tasks by first retrieving all groups and then performing actions on selected ones.
  • Integrating Zalo group data into other systems or workflows.

Properties

Name Meaning
Giới Hạn The maximum number of groups to retrieve. This limits how many groups are returned by the "Get All Groups" operation. Default is 50.

Output

The output JSON object contains:

  • response: The raw response from the Zalo API containing group data. This includes:
    • gridVerMap: A map of group versions keyed by group IDs, limited to the specified count.
    • gridInfoMap: A map of detailed group information keyed by group IDs, also limited accordingly.
  • totalGroups: The total number of groups available.
  • limitedToCount: The limit applied to the number of groups retrieved (as per the input property).
  • actualReturnedCount: The actual number of groups returned in the response (counted from gridVerMap).

This structure allows users to understand both the scope of their request and the exact data returned.

Dependencies

  • Requires valid Zalo API credentials including an API authentication token (cookie), device IMEI, and user agent string.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured properly in n8n before execution.

Troubleshooting

  • No API instance found error: This occurs if the node cannot establish a connection to the Zalo API due to missing or invalid credentials. Ensure that the API key credential is correctly set up with valid cookie, IMEI, and user agent values.
  • Empty or incomplete group lists: If the returned groups are fewer than expected, verify the Giới Hạn (limit) property and the actual groups available in the Zalo account.
  • API rate limits or permission errors: These may arise if the Zalo API restricts access or if the credentials lack necessary permissions. Check the API usage policies and credential scopes.
  • Continue On Fail behavior: If enabled, the node will continue processing subsequent items even if one fails, returning error messages in the output JSON under the error field.

Links and References

Discussion