Actions16
Overview
This node manages Zalo groups by interacting with the Zalo API. Specifically, the "Thêm Thành Viên Vào Nhóm" (Add User to Group) operation allows users to add one or multiple members to an existing Zalo group by specifying the group ID and a list of user IDs.
Common scenarios where this node is useful include:
- Automating group membership management in Zalo for community or team chats.
- Adding new participants to a group chat based on external triggers or workflows.
- Bulk adding multiple users to a group efficiently via comma-separated user IDs.
Example: Automatically add newly registered users to a specific Zalo group by passing their user IDs as a comma-separated string along with the target group ID.
Properties
| Name | Meaning |
|---|---|
| ID Nhóm | The unique identifier of the Zalo group to which users will be added. |
| 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) | A comma-separated list of user IDs representing the members to add to the 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 operation's success or failure and any relevant data returned by the API.
Example output structure:
{
"response": {
// API-specific response data confirming added users or error details
}
}
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including an API key credential that provides cookie, IMEI, and user agent information.
- The node uses the
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 API instance cannot be initialized, ensure that the provided Zalo API credentials are correct and have not expired.
- Malformed User IDs: Ensure the user IDs are correctly formatted as a comma-separated string without extra spaces or invalid characters.
- Group ID Errors: Verify that the group ID exists and that the authenticated user has permission to add members to the group.
- API Rate Limits or Restrictions: The Zalo API may impose limits; if errors occur, check API usage policies.
- Error Messages: The node throws errors if the API instance is not found or if required parameters are missing. Review error messages carefully and verify input parameters.
Links and References
- Zalo Official API Documentation
- n8n Documentation on Creating Custom Nodes
- zca-js GitHub Repository (Zalo Client API JavaScript SDK)