Actions10
Overview
This node interacts with the Zalo social platform to manage user-related operations. Specifically, for the "Zalo User" resource and the "Lấy danh sách bạn bè" (Get all friends) operation, it retrieves a list of the user's friends from their Zalo account.
Common scenarios where this node is beneficial include:
- Synchronizing a user's Zalo friend list with another system.
- Analyzing or processing friend data for marketing or engagement purposes.
- Automating workflows that depend on the user's social connections.
For example, you could use this node to fetch up to 50 friends (or any specified limit) and then send personalized messages or invitations based on that list.
Properties
| Name | Meaning |
|---|---|
| Limit | The maximum number of friends to retrieve from the user's Zalo friend list. |
Output
The output JSON contains a single field:
friends: An array of friend objects representing the user's friends on Zalo. Each object includes details about an individual friend as returned by the Zalo API.
Example output structure:
{
"friends": [
{
"id": "123456789",
"name": "Friend Name",
"avatar": "https://example.com/avatar.jpg",
...
},
...
]
}
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent strings.
- The node uses an external Zalo SDK library (
zca-js) to interact with the Zalo API. - Proper configuration of the Zalo credential in n8n is necessary to authenticate requests.
Troubleshooting
- Invalid Credentials: If the node throws an error indicating no API instance found, verify that the provided Zalo credentials (cookie, IMEI, user agent) are correct and have not expired.
- Empty Friend List: If the returned friend list is empty, ensure the authenticated user actually has friends on Zalo and that the API permissions allow access.
- Limit Parameter Issues: Setting the limit too high may cause performance issues or API rate limiting; try reducing the limit if errors occur.
- API Errors: Network issues or changes in the Zalo API might cause failures; check connectivity and update credentials if needed.
Links and References
- Zalo Official Developer Documentation
- Zalo SDK (zca-js) GitHub Repository (replace with actual link if available)