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 information, listing friends, and finding users by phone number.

The specific operation "Thay đổi cài đặt tài khoản" (Change Account Setting) 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 sources.
  • Customize user account settings programmatically after onboarding or during profile updates.
  • Integrate Zalo user management into broader CRM or marketing automation workflows.

Properties

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

Output

The output JSON contains:

  • status: A string indicating success, typically "Thành công" ("Success").
  • response: The raw response from the Zalo API for the change account setting operation, which may include updated user details or confirmation data.

Example output structure:

{
  "status": "Thành công",
  "response": {
    // API response fields related to the updated account settings
  }
}

No binary data is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent strings.
  • Uses an external Zalo API client library (zca-js) to perform API calls.
  • The node expects these credentials to be configured in n8n under a generic API key credential with cookie, IMEI, and user agent details.

Troubleshooting

  • Common issues:

    • Invalid or expired authentication cookies can cause login failures.
    • Missing or incorrect IMEI or user agent values may lead to API rejection.
    • Incorrect date format for the Date of Birth property will likely cause errors.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials." indicates failure to authenticate with Zalo API. Verify credentials and their completeness.
    • Errors returned from the API (e.g., invalid parameters) will be thrown and can be caught if "Continue On Fail" is enabled.
  • Resolution tips:

    • Ensure all required properties are provided and correctly formatted.
    • Refresh or re-enter API credentials if authentication fails.
    • Use the exact date format YYYY-MM-DD for the Date of Birth field.
    • Check network connectivity and API availability.

Links and References

Discussion