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 marketing or customer service accounts, managing multiple user profiles programmatically, or integrating avatar changes into broader workflows such as onboarding or user data synchronization.
For example, a business could use this node to automatically update the profile pictures of their Zalo support agents based on seasonal campaigns or events by providing the user ID and the path to the new avatar image file.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Zalo user whose avatar will be changed. |
| File Path | The local file system path to the new avatar image file that will replace the old one. |
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 user 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 in n8n is necessary to authenticate requests.
- The file path provided must point to a valid image file accessible by the n8n instance.
Troubleshooting
- Invalid Credentials: If the node throws an error about missing or invalid API instances, verify that the Zalo API credentials are correctly configured and valid.
- File Not Found: Ensure the file path points to an existing image file accessible by the workflow environment; otherwise, the avatar change will fail.
- API Errors: The node may throw errors if the user ID is invalid or if the API rejects the avatar update due to size, format, or permission issues. Check the API response in the
responsefield for more details. - Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning error messages in the output JSON under the
errorkey.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (for the underlying API client used)
- n8n Documentation on Creating Custom Nodes