Actions9
Overview
This node manages Zalo groups by interacting with the Zalo API. It allows users to create new groups, retrieve group information, add or remove members, change group names or avatars, and list all groups. This is useful for automating group management tasks in Zalo, such as setting up new chat groups with specific members or updating group details programmatically.
For example, you can use this node to:
- Create a new Zalo group with a specified name and initial members.
- Fetch detailed information about an existing group.
- Add deputies or regular members to a group.
- Change the group's avatar or rename it.
- Retrieve lists of group members or all groups associated with the account.
Properties
| Name | Meaning |
|---|---|
| Tên Nhóm (groupName) | The name of the new group to be created. |
| Danh Sách ID Thành Viên (nếu nhiều người dùng vui lòng phân cách bằng dấu phẩy) (userIds) | A comma-separated list of member IDs to include in the group. |
Output
The output JSON structure depends on the operation performed. For the "Tạo Nhóm" (createGroup) operation, the output contains the response from the Zalo API after creating the group. This typically includes details about the newly created group such as its ID and metadata.
Example output JSON for creating a group:
{
"json": {
// Response object returned by the Zalo API's createGroup method
},
"pairedItem": {
"item": 0
}
}
If other operations are used, the output will vary accordingly, containing relevant data such as group info, member lists, or status messages.
Dependencies
- Requires valid Zalo API credentials including an API key credential that provides cookie, IMEI, and user agent information.
- Uses the
zca-jslibrary to interact with the Zalo API. - The node expects these credentials to be configured properly in n8n before execution.
Troubleshooting
- Invalid Credentials: If the node cannot instantiate the API client, it throws an error indicating no API instance was found. Ensure that the provided credentials (cookie, IMEI, user agent) are correct and valid.
- Malformed User IDs: When providing multiple user IDs, ensure they are comma-separated without extra spaces or invalid characters.
- API Errors: Any errors returned by the Zalo API during operations will be caught and either cause the node to fail or, if "Continue On Fail" is enabled, return the error message in the output JSON.
- Missing Required Parameters: The "Tên Nhóm" and "Danh Sách ID Thành Viên" fields are required for creating a group; missing these will cause errors.