Actions9
Overview
This node manages Zalo groups by interacting with the Zalo API. Specifically, the "Thêm Phó Nhóm" (Add Group Deputy) operation allows you to add a user as a deputy (co-admin) to a specified Zalo group. This is useful for delegating group management responsibilities without transferring full ownership.
Common scenarios include:
- Assigning moderators or deputies in large group chats to help manage members and content.
- Automating group role assignments based on external workflows or triggers.
- Integrating Zalo group management into broader automation pipelines.
Example: Automatically promote a trusted member to deputy when certain conditions are met, such as reaching a membership milestone.
Properties
| Name | Meaning |
|---|---|
| ID Nhóm | The unique identifier of the Zalo group where the deputy will be added. |
| ID Người Dùng | The unique identifier of the user to be added as a deputy in the group. |
Output
The output JSON contains:
status: A string indicating the result of the operation, typically"Thành công"meaning "Success".response: The raw response from the Zalo API after attempting to add the deputy user.
Example output:
{
"status": "Thành công",
"response": { /* API response object */ }
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential to authenticate with the Zalo API.
- The node uses stored credentials including cookie, IMEI, and user agent strings to establish a session.
- The
zca-jslibrary is used internally to interact with the Zalo API.
Troubleshooting
- Invalid Credentials: If the node throws "No API instance found," verify that the provided API credentials (cookie, IMEI, user agent) are valid and up to date.
- User or Group Not Found: Errors may occur if the specified group ID or user ID does not exist or the authenticated account lacks permission.
- API Rate Limits: Frequent calls might hit Zalo API rate limits; consider adding delays or error handling for retries.
- Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning error details in the output.
Links and References
- Zalo Official API Documentation
- n8n Documentation on Creating Custom Nodes
- zca-js GitHub Repository (for internal API client)