Actions12
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.
Typical use cases include automating social media management tasks such as:
- Automatically accepting friend requests from users.
- Integrating Zalo friend management into broader workflows.
- Streamlining community or customer engagement by managing connections without manual intervention.
For example, when a new user sends a friend request, this node can be triggered to accept that request automatically, enabling immediate communication or content sharing.
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 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 accepting the friend request. This may contain details about the accepted request or confirmation data.
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, IMEI, and user agent information.
- The node uses an external Zalo SDK (
zca-js) to interact with the Zalo platform. - Proper configuration of these credentials in n8n is necessary for authentication and successful API calls.
Troubleshooting
Common issues:
- Invalid or expired credentials will cause authentication failures.
- Missing or incorrect User ID input will prevent the acceptance of friend requests.
- Network or API downtime may cause request failures.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node could not authenticate with Zalo due to missing or invalid credentials. Verify your API key and related settings.- Errors thrown during execution will include the error message from the Zalo API or network layer. If
continueOnFailis enabled, errors for individual items will be returned in the output JSON under theerrorfield.
Resolution tips:
- Double-check the API credentials and ensure they are up to date.
- Confirm the User ID is correct and corresponds to a pending friend request.
- Enable
continueOnFailif you want the workflow to proceed despite some errors.
Links and References
- Zalo Official Developer Documentation
- Zalo SDK (zca-js) GitHub Repository (for reference on API methods)
- n8n Documentation on Credentials and Creating Custom Nodes