Actions10
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.
A common use case is automating group management tasks in Zalo for businesses or communities that use Zalo as a communication platform. For example, you can automatically fetch all your groups to synchronize them with another system, add or remove users from groups based on external triggers, or update group names and avatars programmatically.
Specifically, the "Lấy Tất Cả Nhóm" (Get All Groups) operation retrieves all groups linked to the authenticated account, which is useful for listing or processing all groups without specifying each individually.
Properties
| Name | Meaning |
|---|---|
| Giới Hạn | The maximum number of groups to retrieve. (For "Lấy Tất Cả Nhóm" operation, this limits how many groups are fetched.) |
Note: Although the provided property JSON defines only "Giới Hạn" (limit), the node supports many other properties for different operations (e.g., groupId, userIds, groupName), but they are not relevant here since the focus is on the "Lấy Tất Cả Nhóm" operation.
Output
The output is an array of items where each item contains a json object with the following structure for the "Lấy Tất Cả Nhóm" operation:
{
"response": [ /* array of group objects retrieved from Zalo API */ ]
}
response: Contains the list of all groups returned by the Zalo API for the authenticated user.- Each group object inside the response typically includes group metadata such as group ID, name, members, and other related info (structure depends on the Zalo API).
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including:
- An API authentication token stored as a cookie.
- Device identifiers like IMEI and User-Agent strings.
- The node uses an external library (
zca-js) to interact with the Zalo API. - Credentials must be configured properly in n8n to allow successful login and API calls.
Troubleshooting
Common issues:
- Invalid or expired credentials will cause login failure and prevent any API calls.
- Missing or incorrect cookie, IMEI, or User-Agent values may result in authentication errors.
- Network connectivity problems can cause request failures.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
This indicates that the node could not authenticate with the Zalo API. Verify that the API key credential is correctly set up and valid.- Errors thrown during API calls will include the error message from the Zalo API. If
continueOnFailis enabled, these errors will be returned in the output JSON under anerrorfield.
Resolution tips:
- Double-check the API credentials and ensure they have not expired.
- Confirm that the required device identifiers (IMEI, User-Agent) are provided either via credentials or input data.
- Enable
continueOnFailif you want the workflow to proceed despite individual item errors.
Links and References
- Zalo Official Developer Documentation
- n8n Documentation on Credentials
- zca-js GitHub Repository (for the underlying Zalo API client library)