Actions9
Overview
This node manages Zalo user accounts by interacting with the Zalo platform through an API. It supports various user-related operations such as accepting or sending friend requests, blocking/unblocking users, changing account settings including the avatar, retrieving user information, and searching for users.
The specific operation "Đổi ảnh đại diện" (Change Account Avatar) allows you to update a user's profile picture on Zalo by providing the user ID and the file path of the new avatar image.
Practical examples:
- Automatically update profile pictures for multiple Zalo users in bulk.
- Integrate with other systems to synchronize user avatars from external sources.
- Manage user profiles programmatically within workflows that involve Zalo user data.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Zalo user whose avatar will be changed. |
| File Path | The local or accessible file path pointing to the new avatar image to upload. |
Output
The output JSON contains two main fields:
status: A string indicating the success status, typically"Thành công"meaning "Success".response: The raw response object returned from the API call to change the avatar, which may include details about the updated user or confirmation of the change.
Example output structure:
{
"status": "Thành công",
"response": {
// API response details about the avatar change
}
}
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 uses an external library (
zca-js) to interact with the Zalo API. - Credentials must be configured properly in n8n to allow authenticated API calls.
Troubleshooting
Common issues:
- Invalid or expired credentials leading to failed login attempts.
- Incorrect file paths causing failure to locate the avatar image.
- API rate limits or permission restrictions from Zalo.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
This indicates missing or invalid credentials; verify your API key and authentication details.- Errors related to file access or upload failures usually mean the specified file path is incorrect or inaccessible.
- API errors returned in the
responsefield should be checked for more detailed diagnostics.
Resolution tips:
- Ensure credentials are up-to-date and correctly entered.
- Verify the file path is correct and the file is accessible by n8n.
- Check Zalo API documentation for any changes in permissions or usage limits.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (replace with actual link if available)