Zalo User icon

Zalo User

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

Overview

This node manages Zalo user interactions, specifically for the Vietnamese messaging platform Zalo. It allows automating various user-related operations such as managing friend requests, blocking/unblocking users, updating profile settings, retrieving user info, and changing friend alias names.

The "Đổi tên gợi nhớ" (Change Alias Name) operation lets you set or update a custom display name (alias) for a specific Zalo user in your contacts. This is useful when you want to personalize how certain contacts appear in your Zalo app, making it easier to recognize them with nicknames or meaningful labels.

Practical example:
You have a list of friends on Zalo and want to assign memorable nicknames to some of them automatically based on your CRM data or other external sources. Using this node, you can input the user ID and desired alias name, and the node will update the contact's alias accordingly.


Properties

Name Meaning
User ID The unique identifier of the Zalo user whose alias name you want to change.
Alias Name The new alias (nickname) to assign to the specified user.

Output

The node outputs an array of JSON objects corresponding to each input item processed. For the "changeAliasName" operation, each output JSON contains:

  • status: A string indicating the result, typically "Thành công" meaning "Success".
  • response: The raw response from the Zalo API after attempting to change the alias name. This may include details about the updated alias or confirmation data.

Example output JSON snippet:

{
  "status": "Thành công",
  "response": {
    // API response details here
  }
}

No binary data output is produced by this node.


Dependencies

  • Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent strings.
  • The node uses an external Zalo API client library (zca-js) to perform actions.
  • Credentials must be configured in n8n with appropriate access tokens or cookies to authenticate API calls.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials leading to failed login attempts.
    • Incorrect or missing User ID causing API errors.
    • Network connectivity problems preventing communication with Zalo servers.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not authenticate with Zalo API. Check that your credentials are correctly set and not expired.
    • Errors related to invalid parameters (e.g., userId or aliasName missing) will cause the node to throw exceptions. Ensure all required fields are provided.
    • If the node is set to continue on fail, errors for individual items will be returned in the output JSON under an error field.
  • Resolution tips:

    • Verify and refresh your Zalo API credentials.
    • Double-check input values for correctness.
    • Enable "Continue On Fail" if processing multiple items to avoid complete workflow failure on single errors.

Links and References

Discussion