Actions9
Overview
This node manages Zalo groups, specifically allowing operations such as creating groups, retrieving group info, managing members and deputies, changing group avatars or names, and more. The "Đổi Avatar Nhóm" (Change Group Avatar) operation updates the avatar image of a specified Zalo group by providing a new image URL.
Practical scenarios include:
- Automatically updating group avatars based on events or schedules.
- Managing multiple Zalo groups programmatically.
- Integrating Zalo group management into broader workflows for team collaboration or marketing.
Example: You can use this node to change the avatar of a Zalo group whenever a new campaign starts, ensuring the group visually reflects the current theme.
Properties
| Name | Meaning |
|---|---|
| ID Nhóm | The unique identifier of the Zalo group whose avatar you want to change. |
| URL Ảnh | The URL of the new avatar image to set for the group. |
Output
The output JSON contains:
status: A string indicating success, e.g.,"Thành công"("Success").response: The raw response from the Zalo API after attempting to change the group avatar. This typically includes details about the update operation.
No binary data is output by this operation.
Example output JSON:
{
"status": "Thành công",
"response": {
// API response details here
}
}
Dependencies
- Requires an API key credential for Zalo with appropriate permissions.
- Uses stored credentials including cookie, IMEI, and user agent strings to authenticate API requests.
- Depends on the external
zca-jslibrary for interacting with the Zalo API.
Troubleshooting
- Invalid Credentials: If authentication fails, ensure that the provided API key credential is valid and includes necessary cookies, IMEI, and user agent information.
- Invalid Group ID: Errors may occur if the specified group ID does not exist or the authenticated user lacks permission to modify it.
- Invalid Image URL: The image URL must be accessible and point to a valid image; otherwise, the API may reject the request.
- API Rate Limits: Frequent changes might hit Zalo API rate limits; consider adding delays or error handling for rate limit responses.
- Error Messages: The node throws errors with messages from the API. Use these messages to diagnose issues like permission problems or invalid parameters.
To resolve errors, verify input parameters, check network connectivity, and confirm that the Zalo account has rights to manage the target group.
Links and References
- Zalo Official API Documentation
- n8n Documentation on Creating Custom Nodes
- zca-js GitHub Repository (for the underlying Zalo API client)