Actions16
Overview
This node manages Zalo groups by interacting with the Zalo API to perform various group-related operations. 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 trusted members as deputies to help moderate and manage group activities.
- Automating group role assignments in workflows that handle group membership changes.
- Integrating group management into broader automation processes involving Zalo groups.
Example: Automatically add a user as a deputy when they join a group or based on external triggers.
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 status, e.g.,"Thành công"meaning "Success".response: The raw response from the Zalo API after attempting to add the deputy user.
Example output JSON:
{
"status": "Thành công",
"response": {
// API response details about the deputy addition
}
}
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 with Zalo.
- Proper configuration of these credentials in n8n is necessary for successful API calls.
Troubleshooting
Common issues:
- Invalid or expired credentials may cause authentication failures.
- Incorrect group ID or user ID can lead to errors or no effect.
- Network connectivity problems can prevent API communication.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node could not initialize the Zalo API client due to missing or invalid credentials.
Resolution: Verify and re-enter the API credentials.Errors related to invalid parameters typically indicate wrong or missing input values.
Resolution: Double-check the group ID and user ID inputs.
Enabling "Continue On Fail" allows the workflow to proceed even if some items fail, returning error details in the output.
Links and References
- Zalo Official API Documentation (for detailed API capabilities)
- n8n Documentation on Creating Custom Nodes