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 or database.
- Analyzing or processing social connections for marketing or engagement purposes.
- Automating workflows that require access to a user's social graph on Zalo.
For example, a marketing automation workflow could use this node to fetch up to 50 friends of a user and then send personalized messages or offers to those contacts.
Properties
| Name | Meaning |
|---|---|
| Limit | The maximum number of friends to retrieve. For example, setting this to 50 will return up to 50 friends from the user's 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 in this array corresponds to one friend and includes details as provided 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 an API key credential that provides cookie, IMEI, and user agent information.
- The node uses an external Zalo SDK library (
zca-js) to interact with the Zalo API. - Proper configuration of the Zalo API credentials within n8n is necessary to authenticate requests.
Troubleshooting
- No API instance found error: This indicates invalid or missing credentials. Ensure that the Zalo API credentials are correctly configured and contain valid cookie, IMEI, and user agent values.
- Empty or incomplete friend list: Could be due to API rate limits or permission issues. Verify that the authenticated user has granted access to their friend list.
- NodeOperationError with specific messages: These errors usually come from failed API calls. Check network connectivity, credential validity, and API quota limits.
- If the node fails but "Continue On Fail" is enabled, errors will be returned in the output JSON under the
errorfield for each item.
Links and References
- Zalo Official Developer Documentation
- Zalo SDK (zca-js) GitHub Repository (for reference on API methods used)
- n8n Documentation on Creating Credentials