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 fetches all groups associated with the authenticated user. This is useful for scenarios where you want to synchronize or display a list of all your Zalo groups within an automation workflow.
Practical example:
- Automatically retrieve all your Zalo groups to monitor group activity or send notifications based on group membership changes.
- Use the list of groups to feed into other nodes for further processing, like messaging or analytics.
Properties
| Name | Meaning |
|---|---|
| Giới Hạn | The maximum number of groups to retrieve (limit). Default is 50. |
Note: Although the property "Giới Hạn" (limit) is defined in the input properties JSON, the bundled code's "getAllGroups" operation does not explicitly use this limit parameter when calling the API. It simply calls getAllGroups() without parameters. This might mean the underlying API call returns all groups or uses a default limit internally.
Output
The output of the "Lấy Tất Cả Nhóm" operation is a JSON object containing:
{
"response": [ /* array of group objects */ ]
}
- response: An array representing all groups retrieved from the Zalo API. Each element contains detailed information about a group.
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including cookie, IMEI, and user agent information.
- The node depends on the external
zca-jslibrary to interact with the Zalo API. - Credentials must be configured in n8n with appropriate authentication tokens/cookies to allow API access.
Troubleshooting
Common issues:
- Invalid or expired credentials will cause login failure and prevent any API calls.
- Missing or malformed cookie, IMEI, or user agent values can lead to authentication errors.
- Network connectivity problems may cause timeouts or failed requests.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node could not authenticate with the Zalo API. Check that credentials are correctly set and valid.- Errors returned from the Zalo API will be surfaced in the node output if "Continue On Fail" is enabled.
Resolution tips:
- Verify and refresh your Zalo API credentials.
- Ensure the cookie, IMEI, and user agent fields are correctly populated either via credentials or input data.
- Enable "Continue On Fail" to handle partial failures gracefully during batch executions.
Links and References
- Zalo Official Developer Documentation (for general API reference)
- n8n Documentation (for credential setup and node usage)