Actions10
Overview
This node interacts with Zalo User services, allowing users to manage and query Zalo user information programmatically. Specifically, the "Tìm kiếm người dùng" (Find User) operation enables searching for a Zalo user by their phone number. This is useful in scenarios where you want to verify if a phone number corresponds to a Zalo account or retrieve basic user details associated with that number.
Practical examples include:
- Verifying customer phone numbers against Zalo accounts before sending messages.
- Enriching contact data with Zalo user information.
- Automating friend requests or user management based on phone number lookups.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The phone number to search for in the Zalo user database. Must be provided as a string. |
| Limit | The maximum number of results to return from the search. Must be a number. |
Output
The output JSON contains the result of the user search by phone number. It typically includes user details returned by the Zalo API for the matched phone number(s). The exact structure depends on the API response but generally includes user identifiers and profile information.
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 an active Zalo API credential with valid authentication tokens (cookie, IMEI, user agent).
- The node uses the
zca-jslibrary internally to interact with the Zalo API. - Proper configuration of the Zalo API credentials in n8n is necessary to authenticate requests.
Troubleshooting
Common issues:
- Invalid or expired credentials may cause authentication failures.
- Providing an incorrectly formatted phone number might lead to no results 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 your credentials and ensure they are correctly set up.- Errors related to invalid parameters usually indicate missing or malformed input properties like phone number.
- If the node throws errors during execution, enabling "Continue On Fail" can help process other items without stopping the workflow.
Links and References
- Zalo Official Developer Documentation
- n8n Documentation on Credentials
- zca-js GitHub Repository (for the underlying Zalo API client used)