Add Friend
AI-generatedOverview
The node "Zalo User Interact" enables advanced interactions with the Zalo messaging platform's user API. It allows users to perform social actions such as sending friend requests, blocking or unblocking users, retrieving friend lists, searching for users, and reacting to messages.
This node is beneficial in scenarios where automation of social interactions on Zalo is needed, such as managing contacts, moderating conversations, or integrating Zalo user engagement into workflows.
Practical example:
- Automatically send friend requests to a list of user IDs imported from another system.
- Block or unblock users based on certain criteria detected in your workflow.
- Search for users by name or keyword and process their information further.
- React to specific messages automatically based on sentiment analysis results.
Properties
| Name | Meaning |
|---|---|
| Operation | The action to perform. Options: Add Friend, Block User, Unblock User, Get Friend List, Search User, React Message |
| User ID | ID of the target user (required for Add Friend, Block User, Unblock User operations) |
Output
The output is an array of JSON objects, each representing the response from the Zalo API for the performed operation. The structure varies depending on the operation:
- Add Friend / Block User / Unblock User / React Message: Returns the API response confirming success or failure of the action.
- Get Friend List: Returns a list of friends associated with the authenticated user.
- Search User: Returns search results matching the query.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Zalo User API. This credential must provide necessary cookies and user-agent headers.
- Uses the Axios HTTP client library to make REST API calls to Zalo endpoints.
- Network access to
https://chat.zalo.me/api/social/andhttps://chat.zalo.me/api/message/endpoints is required.
Troubleshooting
Common issues:
- Invalid or expired authentication credentials may cause authorization failures.
- Incorrect or missing User ID when required will result in errors.
- Network connectivity problems can prevent API calls from succeeding.
Error messages:
"Unknown operation: <operation>": Indicates an unsupported operation was requested; verify the operation parameter.- API error responses are passed through in the output JSON under an
errorfield if "Continue On Fail" is enabled.
Resolutions:
- Ensure valid and up-to-date API credentials are configured.
- Provide all required parameters for the selected operation.
- Check network connectivity and firewall settings allowing access to Zalo API endpoints.
Links and References
- Zalo Official API Documentation (for detailed API usage and capabilities)
- Axios GitHub Repository (HTTP client used internally)