Actions9
Overview
This node manages Zalo user interactions, specifically for the "Zalo User" resource. The operation "Chấp nhận lời mời kết bạn" (Accept Friend Request) allows you to programmatically accept incoming friend requests on a Zalo account.
Common scenarios where this node is useful include automating social media management tasks such as:
- Automatically accepting friend requests from users who meet certain criteria.
- Integrating Zalo friend management into CRM or marketing workflows.
- Streamlining community building by handling friend requests without manual intervention.
For example, a business could use this node to automatically accept friend requests from customers who have submitted their contact details through a form, enabling faster communication via Zalo.
Properties
| Name | Meaning |
|---|---|
| User ID | The ID of the user whose friend request you want to accept. This is a required string input. |
Output
The node outputs an array of JSON objects, each corresponding to one input item processed. For the "acceptFriendRequest" operation, the output JSON contains:
status: A string indicating success, typically"Thành công"(Success).response: The raw response object returned by the Zalo API after accepting the friend request.
Example output JSON 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 authentication cookies, device IMEI, and user agent strings.
- These credentials must be configured in n8n prior to using the node.
- Internally uses the
zca-jslibrary to interact with the Zalo API.
Troubleshooting
- Invalid Credentials: If the node throws an error about missing or invalid API instance, verify that the Zalo API credentials are correctly set up and contain valid cookie, IMEI, and user agent information.
- User ID Errors: Ensure the provided User ID corresponds to a valid Zalo user who has sent a friend request; otherwise, the API call may fail.
- API Rate Limits or Restrictions: The Zalo API might impose limits or restrictions; if errors occur, check API usage policies.
- Continue On Fail: If enabled, the node will continue processing subsequent items even if some fail, returning error messages in the output JSON under the
errorfield.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (for the underlying Zalo API client used)
- n8n Documentation on Creating Custom Nodes