Actions16
Overview
This node manages Zalo groups, allowing users to perform various group-related operations via the Zalo API. Specifically, the "Đổi Avatar Nhóm" (Change Group Avatar) operation updates the avatar image of a specified Zalo group.
Common scenarios for this node include:
- Automating group management tasks such as updating group avatars based on events or schedules.
- Integrating with other systems to dynamically change group visuals.
- Managing multiple groups programmatically without manual intervention.
For example, you could use this node to automatically update a group's avatar when a new campaign starts, reflecting the current theme or event.
Properties
| Name | Meaning |
|---|---|
| ID Nhóm | The unique identifier (ID) of the Zalo group whose avatar will be changed. This is required. |
| URL Ảnh | The URL of the new avatar image to set for the group. This must be a valid image URL and is required. |
Output
The output JSON contains:
status: A string indicating the success status, typically"Thành công"meaning "Success".response: The raw response from the Zalo API after attempting to change the group avatar. This may include details about the updated group or confirmation data.
Example output JSON structure:
{
"status": "Thành công",
"response": {
// API response details here
}
}
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the Zalo API using valid credentials that include authentication tokens such as cookies, device identifiers, and user agent strings.
- The node depends on the external
zca-jslibrary to interact with the Zalo API. - Proper configuration of the Zalo API credential in n8n is necessary, including providing a valid cookie, IMEI, and user agent.
Troubleshooting
- Invalid Credentials: If the node throws an error like "No API instance found," it usually means the provided credentials are invalid or expired. Ensure your API key/credential includes a valid cookie, IMEI, and user agent.
- Invalid Group ID: Providing an incorrect or non-existent group ID will cause the API call to fail. Verify the group ID before running the node.
- Invalid Image URL: The image URL must point to a valid and accessible image. If the URL is broken or inaccessible, the avatar change will fail.
- API Rate Limits or Restrictions: The Zalo API might impose rate limits or restrictions on certain operations. If you encounter errors related to limits, consider adding delays or checking API usage policies.
- Network Issues: Connectivity problems can cause failures. Ensure the server running n8n has internet access and can reach the Zalo API endpoints.
Links and References
- Zalo Official API Documentation
- zca-js GitHub Repository (for the underlying Zalo API client used)
- n8n Documentation on Creating Custom Nodes