Actions9
Overview
The Zalo User node with the Tìm kiếm người dùng (Find User) operation allows you to search for a Zalo user by their phone number. This is useful in scenarios where you need to look up user information based on contact details, such as verifying if a user exists on Zalo or retrieving their public profile data for further automation steps.
Practical examples:
- Automatically checking if a customer’s phone number is registered on Zalo before sending them a message.
- Enriching CRM records with Zalo user information.
- Validating user identities during onboarding processes.
Properties
| Name | Type | Meaning |
|---|---|---|
| Phone Number | String | Số điện thoại cần tìm kiếm (Phone number to search for). Required. |
| Limit | Number | Số lượng kết quả tối đa (Maximum number of results). Required. |
Output
The output will be the result of the Zalo user search. The structure of the json field typically contains the user information returned by the Zalo API for the given phone number. The exact fields depend on the Zalo API response, but may include:
{
"userId": "string",
"displayName": "string",
"avatar": "string",
// ...other user profile fields
}
If an error occurs and "Continue On Fail" is enabled, the output will contain:
{
"error": "Error message"
}
Dependencies
- External Service: Requires access to the Zalo API via the
zca-jslibrary. - Credentials: You must provide valid Zalo credentials (
zaloApi) including:- Cookie
- IMEI
- User Agent
These are configured in n8n as a credential named "Zalo Credential to connect with".
Troubleshooting
Common issues:
- Invalid Credentials: If the provided cookie, IMEI, or user agent are incorrect or expired, the node will throw an error:
"No API instance found. Please make sure to provide valid credentials."
Resolution: Update your Zalo credentials in n8n. - User Not Found: If the phone number does not correspond to any Zalo user, the output may be empty or contain an error message from the API.
- API Rate Limits: Excessive requests may trigger rate limiting by Zalo; ensure you respect their usage policies.
Error Handling:
- If "Continue On Fail" is enabled, errors for individual items will be output in the
errorfield of the JSON.