Mtai Zalo User icon

Mtai Zalo User

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

Overview

This node integrates with the Zalo platform to manage and interact with Zalo users. Specifically, the "Tìm kiếm người dùng" (Find User) operation allows searching for Zalo users 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 import Zalo user profiles into your CRM by phone number.
  • Validate if a phone number corresponds to an active Zalo user before sending messages.
  • Use the found user data to trigger further workflows like sending friend requests or notifications.

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.

Output

The output JSON contains the user data returned by the Zalo API for the searched phone number. It typically includes user profile details such as user ID, name, avatar, and other public information available via the API.

Example output structure (simplified):

{
  "userId": "string",
  "name": "string",
  "avatar": "string",
  "phoneNumber": "string",
  ...
}

No binary data output is produced by this operation.

Dependencies

  • Requires a valid Zalo API credential with authentication details including cookie, device IMEI, and user agent.
  • The node uses an external library (zca-js) to handle Zalo API interactions.
  • Proper configuration of the Zalo API credential in n8n is necessary to authenticate requests.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause authentication failures.
    • Missing or incorrect phone number input will result in no user found or errors.
    • Network connectivity problems can prevent API calls from succeeding.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not authenticate with Zalo API. Check that the API key/credential is correctly set up and valid.
    • Errors related to invalid phone numbers or empty results indicate the phone number might not be registered on Zalo or was mistyped.
    • If the node throws errors about missing parameters, ensure all required inputs are provided.
  • Resolution tips:

    • Verify and refresh your Zalo API credentials.
    • Double-check the phone number format and correctness.
    • Enable "Continue On Fail" in the node settings to handle individual item errors gracefully.

Links and References

Discussion