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 discussion 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:
{
"id": "123456789",
"name": "My New Group",
"members": ["user1", "user2", "user3"],
...
}
The output is paired with the input item index to maintain data consistency across workflows.
Dependencies
- Requires valid Zalo API credentials including an API key credential that provides cookie, IMEI, and user agent information.
- Uses the
zca-js
library 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 throws an error indicating no API instance found, verify that the provided Zalo API credentials are correct and contain valid cookie, IMEI, and user agent values.
- Malformed User IDs: Ensure the user IDs string is correctly formatted as a comma-separated list without extra spaces or invalid characters.
- API Rate Limits or Permissions: Operations may fail if the authenticated user lacks permissions or exceeds API rate limits. Check Zalo API documentation and your account status.
- Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning error messages in the output JSON under the
error
field.
Links and References
- Zalo Official API Documentation
- n8n Documentation on Creating Custom Nodes
- zca-js GitHub Repository (for the underlying Zalo API client used)