Actions10
Overview
This node interacts with Zalo's user-related functionalities, allowing you to manage and retrieve information about Zalo users. It is useful for automating tasks such as fetching user details, managing friend requests, blocking or unblocking users, and updating user profile settings on the Zalo platform.
Practical examples include:
- Automatically retrieving detailed information about a specific Zalo user by their ID.
- Accepting or sending friend requests programmatically.
- Blocking or unblocking users based on certain criteria.
- Changing a friend's alias name for easier identification.
- Undoing sent messages in conversations.
This node is beneficial in scenarios where integration with Zalo's social features is needed, such as customer support automation, social media management, or CRM systems that incorporate Zalo contacts.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Zalo user to perform operations on (e.g., get info, block). |
Note: For the "Lấy thông tin người dùng" (Get user info) operation, only the User ID property is required.
Output
The output JSON structure varies depending on the operation:
For getUserInfo operation:
Outputs the full user information object retrieved from Zalo, containing detailed user data fields.For operations like acceptFriendRequest, sendFriendRequest, blockUser, unblockUser, changeAliasName:
Outputs a JSON object with astatusfield indicating success ("Thành công") and aresponsefield containing the API response details.For other user-related operations, the output includes relevant response data or status messages paired with the input item index.
No binary data output is produced by this node.
Dependencies
- Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent strings.
- Uses an external Zalo API client library (
zca-js) to interact with Zalo services. - The node expects these credentials to be configured properly in n8n before execution.
Troubleshooting
Common issues:
- Invalid or expired credentials may cause login failures.
- Missing or incorrect User ID parameter will result in errors when performing user-specific operations.
- Network connectivity problems can prevent API calls from succeeding.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Indicates failure to authenticate with Zalo API. Verify that the API key credential and related parameters (cookie, IMEI, user agent) are correctly set.- Errors returned from Zalo API calls will be propagated unless "Continue On Fail" is enabled, in which case error messages are included in the output JSON under an
errorfield.
Links and References
- Zalo Official Developer Documentation (for general API reference)
- n8n Documentation (for configuring credentials and using custom nodes)