Actions10
Overview
This node manages Zalo user interactions, specifically allowing automation of friend-related actions on the Zalo platform. The "Chấp nhận lời mời kết bạn" (Accept Friend Request) operation enables users to programmatically accept incoming friend requests by specifying the user ID of the requester.
Common scenarios include:
- Automatically accepting friend requests from specific users or under certain conditions.
- Integrating Zalo friend management into broader workflows, such as CRM systems or marketing automation.
- Streamlining social network management without manual intervention.
Example use case:
- A business receives multiple friend requests daily and wants to automatically accept requests from verified contacts by their user IDs.
Properties
| Name | Meaning |
|---|---|
| User ID | The ID of the Zalo user whose friend request you want to accept. This is a required string input. |
Output
The node outputs JSON data with the following structure:
{
"status": "Thành công",
"response": { /* response object from Zalo API */ }
}
status: A string indicating success ("Thành công" means "Success").response: Contains the detailed response returned by the Zalo API after accepting the friend request. The exact structure depends on the API but typically includes confirmation details.
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including an API key credential that provides cookie, IMEI, and user agent information.
- The node uses the external
zca-jslibrary to interact with the Zalo API. - Proper configuration of the Zalo API credentials in n8n is necessary for authentication and successful API calls.
Troubleshooting
Common issues:
- Invalid or expired credentials may cause login failure.
- Incorrect or missing User ID will result in errors when attempting to accept a friend request.
- Network or API downtime can lead to request failures.
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 correctly configured.- Errors related to invalid user IDs or permissions will be thrown by the API and surfaced by the node. Verify the user ID exists and the authenticated account has permission to accept the request.
Resolution tips:
- Double-check the API credentials and refresh them if needed.
- Validate the User ID input before running the node.
- Enable "Continue On Fail" in the node settings to handle individual item errors gracefully in batch operations.
Links and References
- Zalo Official Developer Documentation
- n8n Documentation on Credentials
- zca-js GitHub Repository (for the underlying Zalo API client used)