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 for this node include automating profile updates for multiple Zalo users, managing user avatars in bulk, or integrating avatar changes into broader workflows such as onboarding or marketing campaigns.
For example, a social media manager could use this node to programmatically update the profile pictures of several Zalo accounts based on seasonal themes or promotional events without manual intervention.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Zalo user whose avatar will be changed. |
| File Path | The local file path pointing to the new avatar image to upload and set for the user. |
Output
The node outputs a JSON object containing:
status: A string indicating the success of the operation, typically"Thành công"(meaning "Success").response: The raw response from the Zalo API after attempting to change the avatar. This may include details about the updated avatar or confirmation data.
Example output JSON structure:
{
"status": "Thành công",
"response": {
// API response details here
}
}
No binary data is output by this node.
Dependencies
- Requires valid Zalo API credentials including authentication tokens such as cookies, device IMEI, 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 within n8n is necessary to authenticate requests.
Troubleshooting
- Invalid Credentials: If the node throws an error stating no API instance was found, verify that the provided Zalo API credentials are correct and active.
- File Path Issues: Ensure the file path to the avatar image is accessible and correctly specified; otherwise, the upload will fail.
- API Errors: Any errors returned by the Zalo API (e.g., invalid user ID, permission denied) will be surfaced as node errors. Check the error message for details.
- Continue On Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error messages in the output JSON.
Links and References
- Zalo Official Developer Documentation
- n8n Documentation - Creating Custom Nodes
- zca-js GitHub Repository (for the underlying Zalo API client library)