Actions10
Overview
The Zalo User node allows interaction with Zalo user accounts through various operations such as searching users, managing friend requests, blocking/unblocking users, updating profile settings, and retrieving user information. It is particularly useful for automating workflows involving Zalo social interactions, customer engagement, or contact management.
The "Tìm kiếm người dùng" (Find User) operation enables searching for a Zalo user by their phone number. This can be used in scenarios like verifying if a phone number is registered on Zalo, fetching user details for CRM enrichment, or automating outreach campaigns based on phone contacts.
Example use case:
You have a list of phone numbers and want to check which ones correspond to active Zalo users. Using this node’s find user operation, you can automate the lookup and retrieve user profiles for further processing.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The phone number to search for a Zalo user. Must be provided as a string. |
| Limit | The maximum number of results to return. A numeric value specifying how many matches to fetch. |
Output
- The output JSON contains the result of the user search operation.
- For the "findUser" operation, the output JSON structure corresponds to the user data returned by the Zalo API's
findUsermethod. - The exact fields depend on the API response but typically include user identifiers and profile information.
- No binary data output is produced by this operation.
Example output snippet (conceptual):
{
"userId": "123456789",
"name": "Nguyen Van A",
"phoneNumber": "0123456789",
"avatarUrl": "https://...",
...
}
Dependencies
- Requires valid Zalo API credentials including an API key credential that provides cookie, IMEI, and user agent information.
- The node uses the
zca-jslibrary to interact with the Zalo API. - Proper configuration of the Zalo API credentials in n8n is necessary for authentication.
- The node expects these credentials to be available and valid to perform any operation.
Troubleshooting
Common issues:
- Invalid or expired credentials leading to failure in obtaining an API instance.
- Missing required parameters such as phone number or limit.
- Network connectivity problems when calling the Zalo API.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node could not authenticate with Zalo API. Check your API credentials and ensure they are correctly configured and not expired.- Errors related to missing parameters will occur if required inputs like phone number are not provided.
- API errors from Zalo may be passed through; review the error message for details.
Resolution tips:
- Verify and refresh your Zalo API credentials.
- Ensure all required input properties are set.
- Check network access and firewall settings.
- Use the "Continue On Fail" option to handle individual item errors gracefully in batch executions.
Links and References
- Zalo Official Developer Documentation (for API details and authentication)
- n8n Documentation (for general node usage and credential setup)
- zca-js GitHub Repository (library used internally for Zalo API calls) (Note: Replace with actual repo if known)