Actions9
Overview
This node interacts with the Zalo social platform API to manage user-related data and actions. 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 friends associated with a Zalo user account.
Common scenarios where this node is beneficial include:
- Synchronizing a user's Zalo friend list into another system or database.
- Automating marketing or communication workflows by accessing friend data.
- Analyzing social connections or building custom reports based on friend lists.
Practical example:
- A marketing automation workflow that fetches up to 50 friends of a Zalo user to send personalized messages or offers.
Properties
| Name | Meaning |
|---|---|
| Limit | The maximum number of friends to retrieve from the user's friend list. |
Output
The output JSON contains a field named friends which is an array of friend objects. Each object represents a friend in the user's Zalo friend list. The exact structure of each friend object depends on the Zalo API response but typically includes identifiers and profile information.
Example output structure:
{
"friends": [
{
"id": "friend_id_1",
"name": "Friend Name 1",
...
},
{
"id": "friend_id_2",
"name": "Friend Name 2",
...
}
]
}
No binary data output is produced by this operation.
Dependencies
- Requires valid credentials for the Zalo API, including authentication tokens or cookies.
- Uses an external Zalo API client library (
zca-js) to communicate with the Zalo service. - The node expects the user to provide these credentials via n8n's credential management system.
- No additional environment variables are explicitly required beyond the API credentials.
Troubleshooting
Common Issues
- Invalid or expired credentials: If the API authentication token or cookie is invalid or expired, the node will fail to connect to the Zalo API.
- API rate limits: Excessive requests may trigger rate limiting by Zalo, causing errors or incomplete data retrieval.
- Incorrect property values: Providing a non-numeric or negative value for the "Limit" property may cause unexpected behavior or errors.
Error Messages
"No API instance found. Please make sure to provide valid credentials."
This indicates missing or invalid API credentials. Verify that the correct API key or authentication token is configured in n8n.Errors related to network issues or API response failures will be thrown as exceptions. Enabling "Continue On Fail" allows the workflow to proceed while logging error details per item.
Links and References
- Zalo Official Developer Documentation (for API details)
- n8n Documentation on Credentials (for setting up API credentials)
- zca-js GitHub Repository (Zalo client library used internally)
If you need further details about other operations or resources, please provide their names.