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 members and deputies, changing group details, and fetching all groups associated with the authenticated user.

The "Lấy Tất Cả Nhóm" (Get All Groups) operation specifically retrieves a list of all Zalo groups accessible to the user. This is useful for scenarios where you want to display or process all groups without specifying each individually.

Practical examples:

  • Automatically syncing all your Zalo groups into a CRM or database.
  • Generating reports on group memberships or activity.
  • Triggering workflows based on the existence or properties of any group.

Properties

Name Meaning
Giới Hạn Maximum number of groups to retrieve (limit). Default is 50.

Note: The provided property "Giới Hạn" (limit) is defined but not explicitly used in the "getAllGroups" operation in the source code. It may be intended for future use or filtering after retrieval.

Output

The output JSON structure for the "Lấy Tất Cả Nhóm" operation contains:

{
  "response": [ /* array of group objects */ ]
}
  • response: An array containing all the groups retrieved from the Zalo API. Each element represents a group with its associated data as returned by the API.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential to authenticate with the Zalo API.
  • Uses the external zca-js library to interact with Zalo services.
  • The node expects valid credentials including cookie, IMEI, and user agent strings either from stored credentials or input data.
  • Proper configuration of the Zalo API credential within n8n is necessary.

Troubleshooting

  • No API instance found error: This occurs if the node cannot create a valid API client instance due to missing or invalid credentials. Ensure that the API key credential is correctly configured and includes valid cookie, IMEI, and user agent values.
  • Empty or incomplete group list: If the response does not contain expected groups, verify that the authenticated user has access to groups and that the API credentials are correct.
  • Network or API errors: These might happen if the Zalo API service is unreachable or rate-limited. Check network connectivity and API usage limits.
  • Property "Giới Hạn" not limiting results: Currently, the limit parameter is not applied in the code for "getAllGroups". Users needing limited results should implement filtering downstream or request enhancement.

Links and References

Discussion