Zalo User icon

Zalo User

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

Overview

This node interacts with the Zalo User API to perform various user-related operations. Specifically, for the "Zalo User" resource and the "Thay đổi cài đặt tài khoản" (Change Account Setting) operation, it allows updating a user's account settings such as display name, date of birth, gender, and language preferences.

Common scenarios where this node is beneficial include:

  • Automating profile updates for Zalo users in bulk.
  • Synchronizing user information from other systems into Zalo accounts.
  • Managing user demographic data programmatically.

Practical example:

  • A marketing automation workflow that updates user profiles on Zalo based on collected customer data, ensuring that names, birthdates, and preferred languages are always current.

Properties

Name Meaning
Name Display name of the user to set in the account settings.
Date of Birth User's date of birth in the format YYYY-MM-DD.
Gender User's gender; options are: Male (1), Female (2), Other (3).
Language Optional language preference code, e.g., "vi" for Vietnamese or "en" for English.

Output

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

  • status: A string indicating success, typically "success".
  • response: The response object returned by the Zalo API after attempting to change the account settings.

Example output JSON structure:

{
  "status": "success",
  "response": {
    // API response details about the updated account settings
  }
}

No binary data output is produced by this node.

Dependencies

  • Requires valid credentials for accessing the Zalo API, provided via an API key or token configured in n8n.
  • Uses an external library (zca-js) to interact with the Zalo API.
  • The node expects proper authentication cookies, IMEI, and user agent strings to be managed internally or passed through credentials.

Troubleshooting

  • Common issues:

    • Invalid or expired API credentials will cause authentication failures.
    • Incorrectly formatted date of birth (not matching YYYY-MM-DD) may result in API errors.
    • Missing required fields like Name, Date of Birth, or Gender will prevent successful execution.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not initialize the API client due to missing or invalid credentials. Verify your API key/token setup.
    • Errors related to individual items will be reported per item if "Continue On Fail" is enabled, allowing partial processing.
  • Resolution tips:

    • Double-check all required input properties are correctly filled.
    • Ensure the API credentials are up-to-date and have necessary permissions.
    • Validate date formats before running the node.

Links and References

Discussion