Actions9
Overview
This node manages Zalo user accounts by interacting with the Zalo platform through an API. Specifically, the "Đổi ảnh đại diện" (Change Account Avatar) operation allows users to update the profile picture of a specified Zalo user account.
Common scenarios where this node is useful include:
- Automating profile updates for multiple Zalo users in bulk.
- Integrating avatar changes into workflows triggered by external events or schedules.
- Managing user profiles programmatically without manual intervention.
For example, a marketing team could use this node to update avatars for several Zalo accounts before launching a campaign, ensuring consistent branding.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Zalo user whose avatar will be changed. |
| File Path | The local file path to the new avatar image that will replace the current profile photo. |
Output
The node outputs a JSON object for each input item processed, structured as follows:
{
"status": "Thành công",
"response": { /* response data from the API call */ }
}
status: A string indicating success ("Thành công" means "Success").response: Contains the raw response returned by the Zalo API after attempting to change the avatar. This may include confirmation details or metadata about the updated profile.
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including authentication tokens such as cookies, device identifiers, and user agent strings.
- The node depends on an external Zalo API client library (
zca-js) to perform operations. - Proper configuration of these credentials within n8n is necessary for successful API communication.
Troubleshooting
Common Issues:
- Invalid or expired credentials can cause login failures.
- Incorrect file paths may lead to errors when uploading the avatar image.
- Network issues or API rate limits might interrupt the operation.
Error Messages:
"No API instance found. Please make sure to provide valid credentials."
Indicates missing or invalid authentication details. Verify and update your Zalo API credentials.- Errors related to file access usually mean the specified image path is incorrect or inaccessible. Confirm the file exists and the path is correct.
- API errors returned in the
responsefield should be reviewed for specific causes like permission issues or invalid user IDs.
To handle errors gracefully, enable the node's "Continue On Fail" option to process subsequent items even if some fail.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (for the underlying API client used)
- n8n Documentation on Credentials and Error Handling