Actions12
Overview
This node manages Zalo user interactions through various operations such as blocking or unblocking users, sending or accepting friend requests, changing account settings, retrieving user info, and managing messages. Specifically, the "Chặn Người Dùng" (Block User) operation allows you to block a specified Zalo user by their user ID.
Common scenarios for this node include automating social media management tasks on Zalo, such as moderating contacts by blocking unwanted users, updating profile information, or handling friend requests programmatically. For example, a business could automatically block users who send spam messages or manage friend lists based on certain criteria.
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"meaning "Success".response: The raw response from the Zalo API after attempting to block the user. This may contain additional details about the action performed.
Example output JSON:
{
"status": "Thành công",
"response": { /* API response object */ }
}
No binary data is output by this operation.
Dependencies
- Requires valid Zalo API credentials including an API key credential with cookie, device IMEI, and user agent information.
- Uses the external
zca-jslibrary to interact with the Zalo API. - The node expects these credentials to be configured in n8n beforehand.
Troubleshooting
- Invalid Credentials: If the node throws an error stating no API instance was found, verify that the provided Zalo API credentials are correct and include valid cookie, IMEI, and user agent values.
- User Not Found or Cannot Block: If the user ID does not exist or cannot be blocked, the API response in
responsewill indicate the failure. Check the user ID input for correctness. - Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning error messages in the output JSON under the
errorfield. - Network Issues: Ensure network connectivity to the Zalo API endpoints is stable.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (for the underlying Zalo API client used)