Actions10
Overview
This node manages interactions with Zalo users, specifically allowing operations such as accepting friend requests, sending friend requests, blocking/unblocking users, changing alias names, retrieving user info, and more. It is useful for automating social interactions on the Zalo platform, such as managing contacts or moderating friend lists.
A practical example is automatically accepting incoming friend requests from a list of user IDs, which can help streamline community management or customer engagement workflows.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Zalo user to perform the operation on. |
For the "Chấp nhận lời mời kết bạn" (Accept Friend Request) operation, only the User ID property is required.
Output
The output JSON structure typically contains:
status: A string indicating the result status, e.g.,"Thành công"meaning "Success".response: The raw response data returned by the Zalo API for the performed operation.
Example output JSON for accepting a friend request:
{
"status": "Thành công",
"response": { /* API response object */ }
}
If an error occurs and the node is configured to continue on failure, the output will contain an error field with the error message.
Dependencies
- Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent strings.
- The node uses an external Zalo API client library (
zca-js) to interact with the Zalo platform. - Credentials must be configured in n8n with appropriate API keys and session information.
Troubleshooting
Common issues:
- Invalid or expired credentials may cause login failures.
- Missing or incorrect User ID input will prevent the operation from succeeding.
- Network or API rate limiting errors from Zalo may interrupt execution.
Error messages:
"No API instance found. Please make sure to provide valid credentials."indicates missing or invalid authentication details.- Errors thrown by the Zalo API client are passed through; check the error message for specifics.
Resolutions:
- Verify that the Zalo API credentials are correctly set up and not expired.
- Ensure all required input properties are provided and valid.
- Enable "Continue On Fail" if you want the workflow to proceed despite individual item errors.
Links and References
- Zalo Official Developer Documentation
- n8n Documentation
- zca-js GitHub Repository (for the Zalo API client used)