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. It supports various operations such as accepting or sending friend requests, blocking/unblocking users, changing account avatars, updating account settings, retrieving user info, listing friends, and finding users by phone number.

The "Thay đổi cài đặt tài khoản" (Change Account Setting) operation specifically allows updating a user's profile details including display name, date of birth, gender, and language preference.

Practical examples:

  • Automatically update user profile information in bulk based on external data.
  • Synchronize user details from another system to Zalo accounts.
  • Customize user profiles for marketing or personalization purposes.

Properties

Name Meaning
Name Display name of the Zalo user account.
Date of Birth User's birth date in the format YYYY-MM-DD.
Gender User's gender. Options: Male (1), Female (2), Other (3).
Language Preferred language code, e.g., "vi" for Vietnamese, "en" for English. Optional property.

Output

The output JSON contains:

  • status: A string indicating the result of the operation, typically "Thành công" meaning "Success".
  • response: The raw response object returned from the Zalo API after attempting to change the account settings.

Example output structure:

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

No binary data is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including authentication 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 successful login and API calls.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials causing login failure.
    • Incorrect date format for the Date of Birth field.
    • Missing required fields like Name, Date of Birth, or Gender.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node failed to authenticate with Zalo API. Check your credentials and ensure they are up to date.
    • Errors related to invalid parameters will usually include messages from the Zalo API. Verify that all required inputs are correctly formatted.
  • Resolution tips:

    • Double-check credential configuration and refresh tokens if necessary.
    • Validate input formats before running the node.
    • Use the "Continue On Fail" option to handle errors gracefully during batch processing.

Links and References

Discussion