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 authenticated user's friends from Zalo.
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 and then send personalized messages or invitations based on that list.
Properties
| Name | Meaning |
|---|---|
| Limit | The maximum number of friends to retrieve. You specify how many friends you want to get back, e.g., 10, 50, 100, etc. |
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 a friend (the exact structure depends on the Zalo API response).
Example output snippet:
{
"friends": [
{
"id": "123456789",
"name": "Friend Name",
"avatar": "https://...",
...
},
...
]
}
No binary data is output by this operation.
Dependencies
- Requires valid Zalo API credentials including an authentication cookie, device IMEI, and user agent string.
- The node uses an external Zalo SDK library (
zca-js) to interact with the Zalo API. - Credentials must be configured in n8n with appropriate API keys and session information.
Troubleshooting
- No API instance found: This error indicates invalid or missing credentials. Ensure your Zalo API credential contains a valid cookie, IMEI, and user agent.
- Empty friend list: If the returned friend list is empty, verify that the authenticated account has friends and that the API permissions allow access.
- Limit parameter issues: Providing a non-numeric or negative limit may cause unexpected behavior. Always provide a positive integer.
- API rate limits or network errors: These can cause failures; check your network connection and Zalo API usage policies.
If the node fails but "Continue On Fail" is enabled, it will return an error message per item instead of stopping execution.
Links and References
- Zalo Official Developer Documentation
- Zalo SDK (zca-js) GitHub Repository (replace with actual link if available)