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 accounts in bulk, or integrating avatar changes into larger workflows such as onboarding or marketing campaigns.
For example, you could use this node to automatically update the profile pictures of customer support agents' Zalo accounts based on new branding guidelines or seasonal themes.
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 image file that will be set as the new avatar. |
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 avatar. This may include details about the updated user or confirmation data.
Example output 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-js
library to interact with the Zalo API. - Proper configuration of the Zalo credential in n8n is necessary to provide these authentication details.
Troubleshooting
Common issues:
- Invalid or expired credentials can cause login failures.
- Incorrect file paths or unsupported image formats may result in errors when uploading the avatar.
- Network connectivity problems can prevent communication with the Zalo API.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node failed to authenticate with Zalo. Verify your API credentials and ensure they are correctly configured.- Errors related to file access or upload failure usually indicate the file path is incorrect or the file is inaccessible. Check the file path and permissions.
- API errors returned from Zalo will be included in the error message; consult Zalo API documentation for specific error codes.
To continue processing other items even if one fails, enable the "Continue On Fail" option in the node settings.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (library used for Zalo API interaction)