Actions9
Overview
This node allows you to manage Zalo users within n8n workflows. Specifically, for the "Chấp nhận lời mời kết bạn" (Accept Friend Request) operation, it enables you to programmatically accept incoming friend requests on behalf of a Zalo account. This is useful in automation scenarios where you want to auto-accept friend requests, such as onboarding new contacts, integrating with CRM systems, or managing community/group accounts.
Example use cases:
- Automatically accepting all friend requests received by a business Zalo account.
- Integrating Zalo user management into customer support or sales pipelines.
- Building bots that handle social interactions on Zalo.
Properties
| Name | Type | Meaning |
|---|---|---|
| User ID | String | ID của người dùng cần chấp nhận lời mời kết bạn (User ID to accept the friend request from). |
Output
The output for each processed item will be a JSON object with the following structure:
{
"status": "Thành công",
"response": { /* API response from Zalo */ }
}
- status: Always set to
"Thành công"(Success) if the operation completes without error. - response: The raw response returned by the Zalo API after accepting the friend request. The exact structure depends on the Zalo API but typically includes confirmation details.
If an error occurs and "Continue On Fail" is enabled, the output will instead include:
{
"error": "Error message"
}
Dependencies
- Zalo API credentials: You must provide valid Zalo credentials (cookie, IMEI, user agent) via the
zaloApicredential in n8n. - zca-js: This node uses the
zca-jslibrary to interact with Zalo. - n8n configuration: Ensure the custom credential type
zaloApiis configured and available.
Troubleshooting
Common issues:
- Invalid Credentials: If the provided cookie, IMEI, or user agent are incorrect or expired, the node will throw:
No API instance found. Please make sure to provide valid credentials.
Resolution: Update your Zalo credentials in n8n. - Missing Required Property: If "User ID" is not provided, the node may fail before making the API call.
- API Rate Limits or Blocks: Excessive automated actions may trigger Zalo's anti-bot protections.
Error Handling:
- If "Continue On Fail" is enabled, errors for individual items will be output in the
errorfield of the result. - Otherwise, the workflow will stop on the first encountered error.