Actions10
Overview
This node integrates with the Zalo platform to manage and interact with Zalo users. It supports various user-related operations such as searching for users by phone number, managing friend requests, blocking/unblocking users, updating profile settings, retrieving user information, and handling friends lists.
A common use case is automating user management tasks on Zalo, for example:
- Searching for a user by their phone number to verify or retrieve their details.
- Automatically accepting or sending friend requests.
- Fetching a list of all friends up to a specified limit.
- Changing alias names for friends to organize contacts better.
These capabilities are useful for businesses or services that rely on Zalo for communication and want to automate user interactions or data retrieval.
Properties
| Name | Meaning |
|---|---|
| Limit | The maximum number of results to return when fetching multiple users or friends. |
| Phone Number | The phone number used to search for a specific Zalo user. |
Output
The output JSON structure varies depending on the operation:
- For findUser (searching by phone number), the output contains the found user's details in JSON format.
- For getAllFriends, the output includes a
friendsarray containing user objects up to the specified limit. - For operations like acceptFriendRequest, sendFriendRequest, blockUser, unblockUser, changeAliasName, and undoMessage, the output JSON includes a
statusfield indicating success and aresponsefield with the API response. - For getUserInfo, the output directly returns the user's information JSON.
- In case of errors (if "Continue On Fail" is enabled), the output JSON will contain an
errorfield with the error message.
No binary data output is produced by this node.
Dependencies
- Requires valid Zalo API credentials including authentication tokens such as cookies, device IMEI, and user agent strings.
- The node uses an external Zalo API client library (
zca-js) to perform API calls. - Credentials must be configured properly in n8n to allow authenticated access to Zalo services.
Troubleshooting
- Invalid or expired credentials: If the node cannot create an API instance, it throws an error indicating no API instance was found. Ensure that the provided credentials (cookie, IMEI, user agent) are valid and up to date.
- API call failures: Errors from the Zalo API (e.g., invalid user ID, blocked actions) will cause the node to throw errors unless "Continue On Fail" is enabled, in which case errors are returned in the output JSON.
- Missing required parameters: Operations require certain parameters (e.g., phone number for findUser). Omitting these will result in errors.
- Rate limits or API restrictions: Frequent or bulk operations may hit Zalo API limits; handle such errors gracefully.
Links and References
- Zalo Official Developer Documentation
- Zalo API Client Library (zca-js) (used internally by the node)