Actions10
Overview
This node manages Zalo user interactions by connecting to the Zalo platform via an API. It allows users to perform various operations on Zalo user accounts, such as blocking or unblocking users, sending or accepting friend requests, changing account settings, retrieving user information, and more.
The "Chặn người dùng" (Block User) operation specifically blocks a given Zalo user by their user ID. This is useful in scenarios where you want to prevent certain users from interacting with your Zalo account, for example, to avoid spam or unwanted contacts.
Practical example:
- Automatically block users who send inappropriate messages by feeding their user IDs into this node.
- Manage your Zalo contact list programmatically by blocking or unblocking users based on custom business logic.
Properties
| Name | Meaning |
|---|---|
| User ID | The ID of the Zalo user to block |
Output
The output JSON contains two main fields:
status: A string indicating the result of the operation, typically"Thành công"which means "Success".response: The raw response returned from the Zalo API after attempting to block the user. This may include details about the blocked user or confirmation of the action.
Example output JSON:
{
"status": "Thành công",
"response": {
/* API response details */
}
}
The node does not output binary data.
Dependencies
- Requires a valid Zalo API credential containing authentication details such as cookies, device IMEI, and user agent.
- Uses the external
zca-jslibrary to interact with the Zalo API. - The node expects these credentials to be configured properly in n8n before execution.
Troubleshooting
Common issues:
- Invalid or expired credentials can cause login failure to the Zalo API.
- Missing or incorrect User ID parameter will cause the operation to fail.
- Network connectivity problems may prevent communication with the Zalo service.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node could not authenticate with Zalo. Check that the API key/credential is correctly set up and valid.- Errors thrown during the block operation will be reported with the specific message from the API. If
Continue On Failis enabled, the node will continue processing other items despite errors.
Resolution tips:
- Verify and refresh your Zalo API credentials.
- Ensure the User ID is correct and corresponds to an existing Zalo user.
- Enable
Continue On Failif you want the workflow to proceed even when some items fail.
Links and References
- Zalo Official Developer Documentation (for API details and authentication)
- n8n Documentation (for general node usage and credential setup)