Zalo User icon

Zalo User

Quản lý người dùng Zalo

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 for each input item processed, structured as follows:

{
  "status": "Thành công",
  "response": { /* response data from the Zalo API */ }
}
  • 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 avatar.

The node does not output binary data directly; it expects the avatar image to be provided via a file path.

Dependencies

  • Requires valid Zalo API credentials including authentication tokens such as cookies, device IMEI, 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

  • No API instance found error: Indicates invalid or missing credentials. Ensure that the Zalo API credential is correctly configured with valid cookie, IMEI, and user agent values.
  • File path issues: If the avatar image file path is incorrect or inaccessible, the operation will fail. Verify the file path is correct and accessible by n8n.
  • API errors from Zalo: Errors returned by the Zalo API (e.g., invalid user ID, permission denied) will be surfaced. Check the error message for specifics and verify the user ID and permissions.
  • Continue on Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error messages per failed item.

Links and References

Discussion