Actions9
Overview
This node manages interactions with Zalo users, specifically allowing operations such as sending friend requests, accepting friend requests, blocking/unblocking users, changing account settings or avatar, retrieving user info, and finding users by phone number. It is useful for automating social interactions on the Zalo platform, for example:
- Automatically sending personalized friend requests to a list of user IDs.
- Managing friend requests and user blocks programmatically.
- Updating user profile settings or avatars in bulk.
- Retrieving detailed user information for CRM or marketing purposes.
In the context of the "Gửi lời mời kết bạn" (Send Friend Request) operation, the node sends a friend request to a specified user ID along with a custom message.
Properties
| Name | Meaning |
|---|---|
| User ID | The ID of the Zalo user to whom the friend request will be sent. |
| Message | The message that accompanies the friend request. |
Output
The output JSON contains at least two fields:
status: A string indicating the result status, e.g.,"Thành công"meaning "Success".response: The raw response from the Zalo API for the friend request operation, which may include details about the request status or any returned data.
Each output item corresponds to an input item, paired by index.
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including cookie, IMEI, and user agent information.
- Uses an external library (
zca-js) to interact with the Zalo API. - The node expects these credentials to be configured in n8n under a generic API key credential with necessary authentication tokens.
Troubleshooting
Common issues:
- Invalid or expired credentials leading to failure to instantiate the API client.
- Missing required parameters like User ID or Message.
- Network or API errors from Zalo service.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node could not authenticate with Zalo API. Check your credentials and ensure they are current and correctly configured.- Errors thrown during execution will include the error message from the API or internal exceptions. If "Continue On Fail" is enabled, errors will be returned in the output JSON under the
errorfield.
Links and References
- Zalo Official Developer Documentation
- n8n Documentation on Credentials
- zca-js GitHub Repository (for the underlying Zalo API wrapper used)