Actions10
Overview
This node manages Zalo users by interacting with the Zalo platform through its API. It supports various user-related operations such as blocking or unblocking a user, accepting friend requests, sending friend requests, changing alias names, and retrieving user information.
Common scenarios where this node is beneficial include automating user management tasks in Zalo-based marketing campaigns, customer support workflows, or social engagement automation. For example, you can automatically block users who violate community guidelines, accept incoming friend requests to grow your network, or fetch detailed user info for personalized messaging.
Practical example: Automatically block a user by their User ID when they send inappropriate messages, or send a friend request with a custom message to potential leads.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Zalo user to perform the operation on (e.g., block user). |
Output
The output JSON structure varies depending on the operation but generally includes:
status: A string indicating success, typically "Thành công" (meaning "Success").response: The raw response object returned from the Zalo API for the performed action.- For
getUserInfo, the output is the full user information JSON object. - For
getAllFriends, the output contains afriendsarray listing friend details. - For error cases (if continuing on fail), an
errorfield with the error message is included.
No binary data output is produced by this node.
Dependencies
- Requires valid Zalo API credentials including cookie, IMEI, and user agent strings.
- Uses an external Zalo API client library (
zca-js) to interact with the Zalo platform. - The node expects these credentials to be configured in n8n under a generic API key credential setup.
- No additional environment variables are explicitly required beyond the credentials.
Troubleshooting
Common issues:
- Invalid or expired credentials leading to failure in obtaining an API instance.
- Missing or incorrect User ID parameter causing API calls to fail.
- Network or API rate limiting errors from Zalo.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Resolution: Verify that the Zalo API credentials are correctly set up and not expired.- Errors thrown during API calls will propagate unless "Continue On Fail" is enabled, in which case the error message is returned in the output JSON under
error. - If operations fail silently, ensure all required parameters (like User ID) are provided and valid.
Links and References
- Zalo Official Developer Documentation
- n8n Documentation on Credentials
- Zalo API Client Library (zca-js) - GitHub (Note: This is inferred from the import name)