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 searching users, managing friend requests, blocking/unblocking users, updating profile settings, and retrieving user information. 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 syncing user profiles. For example, you can use it to find a user by phone number and then send them a friend request automatically.

Properties

Name Meaning
Phone Number The phone number of the Zalo user you want to search for.
Limit The maximum number of results to return from the search operation.

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.
  • The exact fields depend on the API response but typically include user details matching the searched phone number.
  • No binary data output is produced by this node.

Example output snippet (conceptual):

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

Dependencies

  • Requires an API key credential to authenticate with the Zalo API.
  • The node uses stored credentials including a cookie, device IMEI, and user agent string to establish a session.
  • The external dependency is the zca-js library which handles communication with the Zalo API.
  • Proper configuration of the Zalo API credentials within n8n is necessary before using this node.

Troubleshooting

  • No API instance found error: This occurs if the node cannot establish a valid session with the Zalo API. Ensure that the provided credentials (cookie, IMEI, user agent) are correct and active.
  • Invalid phone number input: Make sure the phone number is correctly formatted and includes country code if required.
  • API rate limits or restrictions: If many requests are made in a short time, the Zalo API might throttle or block requests. Implement delays or handle errors gracefully.
  • Credential expiration: Cookies or tokens may expire; refresh credentials regularly to maintain connectivity.

Links and References

Discussion