Actions10
Overview
This node manages Zalo user interactions through various operations such as blocking or unblocking users, managing friend requests, updating profile settings, and retrieving user information. It is particularly useful for automating social management tasks on the Zalo platform, such as moderating contacts by blocking unwanted users, sending or accepting friend requests programmatically, or fetching user details for integration with other systems.
A practical example is using the "Chặn người dùng" (Block User) operation to automatically block specific users based on certain criteria, helping maintain a clean contact list without manual intervention.
Properties
| Name | Meaning |
|---|---|
| User ID | The ID of the user to be blocked |
Output
The output JSON object contains:
status: A string indicating the success status, typically"Thành công"meaning "Success".response: The raw response from the Zalo API related to the block user action, which may include confirmation details or metadata about the blocked user.
Example output JSON:
{
"status": "Thành công",
"response": {
/* API response details */
}
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential to authenticate with the Zalo platform.
- Uses stored credentials including cookie, IMEI, and user agent strings to establish a session.
- Depends on the external
zca-jslibrary to interact with the Zalo API. - Proper configuration of the Zalo API credentials in n8n is necessary before use.
Troubleshooting
Common issues:
- Invalid or expired credentials can cause authentication failures.
- Missing or incorrect User ID input will result in errors when attempting to block a user.
- Network connectivity problems may prevent successful API calls.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
This indicates that the node could not establish a connection to the Zalo API due to missing or invalid credentials. Verify that the API key and associated session data are correctly configured.- Errors thrown during execution will include the message from the underlying API call. If
continueOnFailis enabled, these errors will be returned in the output JSON under theerrorfield for each failed item.
Links and References
- Zalo Official Developer Documentation
- n8n Documentation on Credentials
- zca-js GitHub Repository (replace with actual link if available)