Actions9
Overview
This node interacts with the Zalo social platform to manage user friend requests. Specifically, for the "Zalo User" resource and the operation "Chấp nhận lời mời kết bạn" (Accept Friend Request), it accepts incoming friend requests from other users on behalf of the authenticated account.
Common scenarios where this node is beneficial include automating the management of friend requests in a Zalo account, such as automatically accepting friend requests from specific users or bulk processing multiple requests without manual intervention.
Practical example: A business using Zalo for customer engagement can automate accepting friend requests from customers who have sent them connection requests, streamlining communication setup.
Properties
| Name | Meaning |
|---|---|
| User ID | The ID of the user whose friend request you want to accept |
Output
The node outputs JSON data containing:
status: A string indicating the success status of the operation, typically"success".response: The response object returned by the Zalo API after attempting to accept the friend request. This may contain details about the accepted friend or confirmation information.
The output is paired with the input item index to maintain correspondence when processing multiple items.
No binary data output is involved in this operation.
Example output JSON structure:
{
"status": "success",
"response": {
/* API response details */
}
}
Dependencies
- Requires valid Zalo API credentials configured in n8n to authenticate API calls.
- Uses an external Zalo API client library (
zca-js) to perform operations. - The node expects to retrieve authentication cookies, device identifiers, and user agent strings from stored credentials or previous node executions to initialize the API client properly.
Troubleshooting
Common issues:
- Invalid or expired API credentials leading to authentication failures.
- Missing or malformed user ID input causing the API call to fail.
- Network connectivity problems preventing access to the Zalo API.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Indicates that the node could not initialize the Zalo API client due to missing or invalid credentials. To resolve, verify that the API key or authentication token is correctly set up in n8n credentials.- Errors related to invalid user IDs or failed API calls will be returned in the output JSON under an
errorfield if "Continue On Fail" is enabled; otherwise, they will cause the node execution to stop with an error.
Links and References
- Zalo Official Developer Documentation (for API reference)
- n8n Documentation (for general node usage and credential setup)