Actions9
Overview
The Zalo Group node for n8n allows you to manage Zalo chat groups programmatically. Specifically, the Thêm Phó Nhóm (Add Deputy Group Leader) operation lets you assign a user as a deputy leader in a specified Zalo group. This is useful for automating group management tasks, such as delegating administrative responsibilities within large or active Zalo communities.
Practical Example:
You might use this node in an automation workflow where, after certain criteria are met (e.g., a user completes onboarding), they are automatically promoted to a deputy leader role in a Zalo group.
Properties
Name | Type | Meaning |
---|---|---|
ID Nhóm | String | The unique identifier of the Zalo group where the deputy will be added. |
ID Người Dùng | String | The unique identifier of the user to be assigned as deputy leader. |
Output
The output is a JSON object with the following structure:
{
"status": "Thành công",
"response": { /* API response from Zalo */ }
}
- status: Always set to
"Thành công"
(Success) if the operation completes without error. - response: Contains the raw response returned by the Zalo API for the add deputy action.
If an error occurs and "Continue On Fail" is enabled, the output will instead be:
{
"error": "Error message"
}
Dependencies
- External Service: Requires access to the Zalo platform via the
zca-js
library. - Credentials: Needs valid Zalo credentials configured in n8n (
zaloApi
), including:- Cookie
- IMEI
- User Agent
Troubleshooting
Common Issues:
Invalid Credentials: If the provided Zalo credentials (cookie, IMEI, or user agent) are missing or incorrect, the node will throw an error:
"No API instance found. Please make sure to provide valid credentials."
- Resolution: Double-check your Zalo credentials in n8n and ensure they are up-to-date.
User or Group Not Found: If the provided group or user IDs are invalid, the Zalo API may return an error in the
response
field.- Resolution: Verify that both the group and user IDs exist and are correct.
Permission Denied: The authenticated Zalo account must have sufficient permissions to add deputies to the group.
Error Handling:
- If "Continue On Fail" is enabled, errors are reported in the output under the
error
key for each failed item.
Links and References
- Zalo Official Website
- n8n Documentation: Credentials
- n8n Documentation: Error Handling
- zca-js GitHub Repository (replace with actual link if available)