Actions3
- Zalo User Actions
Overview
The "Zalo User" node allows interaction with Zalo's user-related features via its API. Specifically, the Find User operation enables you to search for a Zalo user by their phone number. This is useful in scenarios where you want to retrieve user details based on contact information, such as verifying if a phone number is registered on Zalo or fetching associated user data.
Practical examples include:
- Enriching customer records by validating phone numbers against Zalo users.
- Automating marketing workflows that target users found via their phone numbers.
- Integrating Zalo user lookup into CRM or support systems to quickly access user profiles.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The phone number used to find the corresponding Zalo user. Must be provided as a string. |
| Limit | Maximum number of results to return (number). Although defined, this property is not used in the Find User operation in the code. |
Output
The output JSON contains the user data returned from the Zalo API for the given phone number. The structure depends on the API response but typically includes user profile details such as user ID, name, avatar, and other public information available via Zalo.
Example output structure (simplified):
{
"userId": "123456789",
"name": "John Doe",
"avatar": "https://example.com/avatar.jpg",
...
}
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including an authentication cookie, device IMEI, and user agent string.
- The node uses an external library (
zca-js) to interact with the Zalo API. - Credentials must be configured properly in n8n to provide these authentication details.
Troubleshooting
Common issues:
- Invalid or expired credentials may cause login failure.
- Missing or malformed phone number input will prevent successful user lookup.
- Network or API errors can interrupt the request.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Indicates failure to authenticate with Zalo API. Verify your credentials and ensure they are correctly set up.- Errors returned from the API during user lookup will be shown in the output if "Continue On Fail" is enabled; otherwise, execution stops with an error.
Links and References
- Zalo Official Developer Documentation (for general API reference)
- n8n Documentation (for configuring credentials and using nodes)