Zalo User icon

Zalo User

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

Overview

This node interacts with Zalo User accounts, providing various user management operations through the Zalo API. Specifically, the "Tìm Kiếm Người Dùng" (Find User) operation allows searching for a Zalo user by their phone number. This is useful in scenarios where you want to retrieve user details based on a known phone number, such as verifying user identity, syncing contacts, or automating friend requests.

Practical examples:

  • Automatically find and add users from a list of phone numbers.
  • Verify if a phone number corresponds to an existing Zalo user before sending messages.
  • Integrate Zalo user search into CRM or customer support workflows.

Properties

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

Output

The output JSON contains the data returned by the Zalo API's user search method. It typically includes user information matching the searched phone number. The exact structure depends on the API response but generally includes user identifiers and profile details.

Example output snippet (conceptual):

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

No binary data output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including authentication tokens such as cookies, device IMEI, and user agent strings.
  • The node uses an external Zalo API client library to perform operations.
  • Proper configuration of the Zalo API credential in n8n is necessary to authenticate requests.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials causing authentication failures.
    • Network connectivity problems preventing API calls.
    • Searching with an incorrect or improperly formatted phone number returning no results.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not authenticate with the Zalo API. Check that the API credentials are correctly set up and valid.
    • Errors related to rate limits or API restrictions may occur if too many requests are made in a short time.
    • If the node returns empty results, verify the phone number format and existence on Zalo.
  • Resolution tips:

    • Re-authenticate or update the stored credentials.
    • Validate input phone numbers before running the node.
    • Use the "Continue On Fail" option to handle individual item errors gracefully.

Links and References

Discussion