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 user 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 violate community guidelines or send personalized friend requests with custom messages.
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, e.g.,"Thành công"meaning "Success".response: The raw response from the Zalo API related to the block user action, which may include details about the blocked user or confirmation data.
The output is paired with the input item index to maintain correspondence between inputs and outputs.
Dependencies
- Requires an API key credential to authenticate with the Zalo platform.
- Uses stored credentials including cookie, device IMEI, and user agent strings to establish a session.
- Depends on the external
zca-jslibrary for interacting with the Zalo API. - Requires proper configuration of the Zalo API credentials in n8n, including valid authentication tokens and session cookies.
Troubleshooting
- No API instance found error: This indicates invalid or missing credentials. Ensure that the API key and session information are correctly configured and up to date.
- Operation failures: If blocking a user fails, verify that the provided User ID is correct and that the authenticated account has permission to perform the block.
- Continue on Fail: If enabled, errors for individual items will be returned in the output JSON under an
errorfield instead of stopping execution. - Network issues or expired sessions can cause authentication failures; refreshing credentials or re-authenticating may resolve these.
Links and References
- Zalo Official Developer Documentation
- n8n Documentation
- zca-js GitHub Repository (for the Zalo API client library used)