Zalo User icon

Zalo User

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

Overview

This node manages Zalo user accounts, specifically allowing you to change a user's profile avatar image. It is useful in scenarios where you want to automate updating the profile picture of a Zalo user programmatically, for example:

  • Automatically updating avatars based on external events or triggers.
  • Bulk updating user profile pictures from a database or file system.
  • Integrating with other systems that manage user profiles and need to sync avatar images.

The operation "Đổi ảnh đại diện" (Change Account Avatar) takes a user ID and a file path to an image, then updates the specified user's avatar on Zalo.

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.

Output

The node outputs JSON data containing the status and response from the Zalo API after attempting to change the avatar. The structure typically looks like:

{
  "status": "success",
  "response": { /* details returned by Zalo API */ }
}

If an error occurs, the output JSON will contain an error field describing the issue.

The node does not output binary data.

Dependencies

  • Requires valid Zalo API credentials including authentication cookies, IMEI, and user agent strings.
  • The node internally uses a Zalo API client library to perform login and avatar update operations.
  • You must configure the node with appropriate Zalo API credentials before use.

Troubleshooting

  • Common issues:

    • Invalid or expired authentication credentials can cause login failures.
    • Incorrect user ID or file path may result in errors from the Zalo API.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • "Login failed": Indicates the node could not authenticate with Zalo using provided credentials. Verify your API key/credentials.
    • Errors related to file access: Ensure the file path is correct and accessible by n8n.
    • API response errors: Check the response message for details; it might indicate invalid parameters or permission issues.
  • Resolution tips:

    • Double-check credential validity and refresh if necessary.
    • Confirm the user ID exists and is correct.
    • Verify the file path points to a valid image file accessible by the workflow environment.
    • Enable error handling in the node settings to capture and manage errors gracefully.

Links and References

Discussion