Actions3
- Zalo User Actions
Overview
The "Zalo User" node allows interaction with Zalo user data through various operations. Specifically, the "List Friends" operation retrieves a list of friends associated with the authenticated Zalo user account. This node is useful for scenarios where you want to automate or analyze social connections on Zalo, such as syncing contacts, sending batch messages, or integrating friend data into other workflows.
For example, you could use this node to fetch up to a specified number of friends and then process their information in subsequent workflow steps, like filtering by certain criteria or exporting to a CRM system.
Properties
| Name | Meaning |
|---|---|
| Limit | Max number of results to return. Specifies how many friends to retrieve from the 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 (the exact structure depends on the Zalo API response).
Example output structure:
{
"friends": [
{
"id": "123456789",
"name": "Friend Name",
"avatar": "https://...",
...
},
...
]
}
No binary data output is produced by this operation.
Dependencies
- Requires valid Zalo API credentials including 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 access tokens or cookies to authenticate requests.
Troubleshooting
Common issues:
- Invalid or expired credentials may cause authentication failures.
- Missing or incorrect cookie, IMEI, or user agent values can prevent successful login.
- Requesting more friends than available will simply return fewer results without error.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Indicates failure to authenticate with Zalo API. Verify that the credential fields are correctly set and not expired.- Errors during API calls will be reported per item if "Continue On Fail" is enabled; otherwise, execution stops at the first error.
Links and References
- Zalo Official Developer Documentation
- Zalo SDK (zca-js) GitHub Repository (for reference on API methods used)