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 CRM or marketing workflows.
- Streamlining user engagement by handling friend requests without manual intervention.
For example, when a new friend request arrives, this node can be triggered to accept it immediately, ensuring timely connection and communication.
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 status, 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 an API key credential to authenticate with the Zalo platform.
- The node uses stored credentials including cookie, IMEI, and user agent strings to establish a session with Zalo's API.
- The external library
zca-jsis used internally to interact with the Zalo API.
Ensure that the Zalo API credentials are correctly configured in n8n before using this node.
Troubleshooting
Common issues:
- Invalid or expired credentials may cause login failure.
- Missing or incorrect User ID will prevent the acceptance of the friend request.
- Network or API rate limits could cause intermittent failures.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node failed to authenticate with Zalo. Verify your API credentials and ensure they are up to date.- Errors thrown during execution will include the message from the underlying API call. If
continueOnFailis enabled, errors will be returned in the output JSON under theerrorfield.
Resolution tips:
- Double-check the User ID input for correctness.
- Refresh or re-enter API credentials if authentication fails.
- Enable
continueOnFailto handle 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 library)