Actions9
Overview
This node manages Zalo groups, specifically allowing users to perform various group-related operations via the Zalo API. The "Add User To Group" operation lets you add one or multiple members to an existing Zalo group by specifying the group's ID and a list of user IDs.
Common scenarios include:
- Automating group membership management in Zalo for community or team chats.
- Adding new members to a group after registration or approval processes.
- Integrating Zalo group management into broader workflows that involve communication or collaboration.
Example: Automatically add newly registered users to a specific Zalo group by providing their user IDs and the target group ID.
Properties
| Name | Meaning |
|---|---|
| ID Nhóm (groupId) | The unique identifier of the Zalo group where users will be added. |
| Danh Sách ID Thành Viên (userIds) | A comma-separated list of user IDs to add to the specified group. |
Output
The output JSON contains the response from the Zalo API after attempting to add the specified users to the group. It typically includes details about the success or failure of the operation and any relevant metadata returned by the API.
Example output structure:
{
"json": {
// API response data confirming addition of users or error details
},
"pairedItem": {
"item": 0
}
}
No binary data is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including authentication tokens such as cookies, device IMEI, and user agent strings.
- The node depends on the external
zca-jslibrary to interact with the Zalo API. - Proper configuration of the Zalo API credential in n8n is necessary to authenticate requests.
Troubleshooting
- Invalid Credentials: If the node throws an error indicating no API instance found, verify that the Zalo API credentials are correctly configured and valid.
- Incorrect Group ID or User IDs: Ensure the group ID exists and the user IDs are correct and active in Zalo; otherwise, the API may return errors or fail silently.
- Comma-Separated User IDs: Make sure the user IDs are properly formatted as a comma-separated string without extra spaces or invalid characters.
- API Rate Limits or Permissions: If adding users fails repeatedly, check if the API key has sufficient permissions or if rate limits have been exceeded.
Links and References
- Zalo Official API Documentation
- n8n Documentation on Creating Custom Nodes
- zca-js GitHub Repository (for the underlying Zalo API client used)