Actions9
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 listing all groups.
The "Lấy Tất Cả Nhóm" (Get All Groups) operation specifically retrieves all groups associated with the authenticated user. This is useful for scenarios where you want to list or process all your Zalo groups in an automated workflow, for example:
- Synchronizing group data with another system.
- Generating reports on group memberships.
- Triggering actions based on group presence or changes.
Properties
| Name | Meaning |
|---|---|
| Giới Hạn | Maximum number of groups to retrieve (number). Default is 50. |
Note: Although the "Giới Hạn" (limit) property is defined in the input properties JSON, the bundled code's "getAllGroups" operation does not explicitly use this limit parameter when calling the API. The node fetches all groups without limiting them in the shown code.
Output
The output for the "Lấy Tất Cả Nhóm" operation is a JSON object containing:
response: The full response from the Zalo API containing all groups.
Example structure:
{
"response": [
{
"groupId": "string",
"groupName": "string",
"members": [...],
...
},
...
]
}
Each item in the response array represents a group with its details as provided by the Zalo API.
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including cookie, IMEI, and user agent information.
- The node uses an external library (
zca-js) to interact with the Zalo API. - Credentials must be configured properly in n8n to authenticate API requests.
Troubleshooting
- No API instance found: This error indicates invalid or missing credentials. Ensure that the Zalo API credential is correctly set up with valid cookie, IMEI, and user agent values.
- API request failures: Network issues or expired authentication tokens can cause failures. Refresh credentials or check network connectivity.
- Limit property ignored: Although a limit property exists, the current implementation does not apply it to the "getAllGroups" operation. If you require limiting results, consider filtering after retrieval or updating the node logic.
Links and References
- Zalo Official API Documentation
- n8n Documentation
- zca-js GitHub Repository (for the Zalo API client used)