Actions10
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 user IDs.
Common scenarios where this node is useful include:
- Automating group membership management in Zalo for community or team chats.
- Adding new users to a group after registration or onboarding processes.
- Bulk adding multiple users to a group efficiently via automation workflows.
Example: Automatically add newly registered users to a specific Zalo group by passing their user IDs as a comma-separated list along with the target group ID.
Properties
Name | Meaning |
---|---|
ID Nhóm (groupId) | 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) (userIds) | 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 success or failure of the operation and any relevant metadata returned by the API.
Example output structure:
{
"json": {
// Response object from the Zalo API indicating the result of adding users to the group
},
"pairedItem": {
"item": 0
}
}
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-js
library to interact with the Zalo API. - Proper configuration of the Zalo API credentials within n8n is necessary for authentication.
Troubleshooting
- Invalid Credentials: If the node throws an error stating "No API instance found," it usually means the provided credentials are invalid or incomplete. Verify that the API key credential includes valid cookie, IMEI, and user agent values.
- Incorrect Group ID or User IDs: Ensure the group ID exists and the user IDs are correct and active in Zalo. Invalid IDs may cause the API to reject the request.
- Comma-Separated User IDs: The user IDs must be provided as a comma-separated string without extra spaces. Improper formatting can lead to errors.
- API Rate Limits or Permissions: If the API returns permission errors or rate limit issues, check your Zalo API usage limits and permissions associated with the credentials.
Links and References
- Zalo Official API Documentation (for detailed API capabilities and requirements)
- n8n Documentation on Credentials (for setting up API credentials securely)