Zalo User icon

Zalo User

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

Overview

The Zalo User node allows interaction with Zalo user accounts through various operations such as managing friend requests, blocking/unblocking users, updating profile settings, retrieving user information, and searching for users by phone number. Specifically, the "Tìm kiếm người dùng" (Find User) operation enables searching for a Zalo user by their phone number.

This node is beneficial in scenarios where you need to automate user management tasks on Zalo, such as integrating Zalo user data into your CRM, automating friend request handling, or verifying user identities by phone number.

Practical example:
You can use this node to find a Zalo user by their phone number to retrieve their profile details before sending a friend request or to verify if a user exists on Zalo based on contact information collected from another system.


Properties

Name Meaning
Phone Number The phone number of the user you want to search for on Zalo.
Limit The maximum number of results to return when searching for users.

Output

  • The output JSON contains the result of the user search operation.
  • For the findUser operation, the output JSON structure corresponds to the user data returned by the Zalo API's findUser method. This typically includes user profile information associated with the searched phone number.
  • The output is paired with the input item index to maintain traceability.
  • No binary data output is produced by this operation.

Example output snippet (conceptual):

{
  "userId": "123456789",
  "name": "Nguyen Van A",
  "phoneNumber": "0123456789",
  "avatarUrl": "https://...",
  ...
}

Dependencies

  • Requires an API key credential for Zalo API access, including authentication cookies, device IMEI, and user agent strings.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects valid credentials configured in n8n to establish a session with Zalo.
  • No additional environment variables are explicitly required beyond the credential setup.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause login failures.
    • Missing or incorrect phone number input will prevent successful user search.
    • Network connectivity issues can disrupt API calls.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Indicates failure to authenticate with Zalo API. Verify that the API key credential is correctly set up and not expired.
    • Errors related to invalid parameters (e.g., missing phone number) will be thrown by the node and should be corrected by providing all required inputs.
    • If the node is set to continue on fail, errors for individual items will be included in the output JSON under an error field.

Links and References

Discussion