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. 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, enriching contact information, or automating friend requests.

Practical examples:

  • Automatically find and add users to your Zalo friend list by their phone numbers.
  • Retrieve user profile information for customer support or CRM integration.
  • Filter or segment users based on phone number searches within automated workflows.

Properties

Name Meaning
Phone Number The phone number of the Zalo user to search for. This is a required string input.
Limit The maximum number of results to return. This is a required numeric input (default 50).

Output

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

If an error occurs during execution, the output will contain an error field with the error message.

No binary data output is produced by this operation.

Example output snippet (simplified):

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

Dependencies

  • Requires a valid Zalo API credential with authentication details including cookie, IMEI, and user agent.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured in n8n beforehand.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause login failure.
    • Missing or incorrect phone number input will prevent successful user search.
    • Network or API errors can interrupt the request.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node failed to authenticate with Zalo API. Check your API credentials and ensure they are correct and active.
    • Errors returned from the API will appear in the output under the error field if "Continue On Fail" is enabled.
  • Resolution tips:

    • Verify that the API key/credential is correctly set up and has necessary permissions.
    • Ensure the phone number format matches expected input.
    • Enable "Continue On Fail" to handle partial failures gracefully in batch executions.

Links and References

Discussion