Actions10
Overview
This node allows interaction with Zalo user accounts, specifically enabling management of friend relationships and user information on the Zalo platform. The "Gửi lời mời kết bạn" (Send Friend Request) operation sends a friend request to a specified Zalo user along with a custom message.
Common scenarios where this node is beneficial include automating social engagement workflows, such as:
- Automatically sending friend requests to new contacts collected from other sources.
- Managing friend lists by programmatically accepting or blocking users.
- Updating user profile settings or retrieving user information for CRM or marketing purposes.
For example, you could use this node to send personalized friend requests to a list of potential customers, including a welcoming message to increase connection acceptance rates.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Zalo user to whom the friend request will be sent. |
| Message | The accompanying message that will be sent along with the friend request invitation. |
Output
The output JSON contains:
status: A string indicating the result of the operation, typically"Thành công"meaning "Success".response: The raw response object returned from the Zalo API after sending the friend request. This may include details about the request status or any metadata provided by the API.
Example output structure:
{
"status": "Thành công",
"response": {
// API response details here
}
}
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including an API key credential with cookie, device IMEI, and user agent information.
- Uses the external
zca-jslibrary to interact with the Zalo API. - The node expects these credentials to be configured in n8n prior to execution.
Troubleshooting
- Invalid Credentials: If the node throws an error stating no API instance was found, verify that the Zalo API credentials are correctly set up and contain valid cookie, IMEI, and user agent values.
- User ID Errors: Ensure the
User IDprovided exists and is correct; invalid IDs will cause the API call to fail. - Message Requirements: The message must be non-empty; empty messages might cause rejection by the API.
- API Rate Limits: Sending too many friend requests in a short time may trigger rate limiting or temporary blocks by Zalo.
- Continue On Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error details in the output.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (for the underlying Zalo API client used)
- n8n Documentation on Creating Custom Nodes