Actions12
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 friends from a Zalo user account.
Common scenarios where this node is beneficial include:
- Synchronizing a user's Zalo friend list with another system.
- Analyzing or processing a user's social connections on Zalo.
- Automating workflows that depend on the user's social graph, such as sending messages or invitations to friends.
Practical example:
- A marketing automation workflow could use this node to fetch up to 50 friends of a user and then send personalized promotional messages to each friend.
Properties
| Name | Meaning |
|---|---|
| Limit | The maximum number of friends to retrieve from the user's friend list. Default is 50. |
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 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 authentication via 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 in n8n is necessary before using this node.
Troubleshooting
Common issues:
- Invalid or expired credentials may cause authentication failures.
- If the cookie, IMEI, or user agent values are missing or incorrect, the node will fail to establish a connection.
- Requesting more friends than allowed or available may result in fewer results returned.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
This indicates that the node could not authenticate with the Zalo API. Verify that the API credentials are correctly set and valid.- Errors related to network connectivity or API limits may also occur; ensure stable internet connection and respect any rate limits imposed by Zalo.
Resolution tips:
- Double-check the API credentials and refresh them if needed.
- Ensure that the input properties like "Limit" are within acceptable ranges.
- Enable "Continue On Fail" in the node settings to handle errors gracefully during batch processing.
Links and References
- Zalo Official Developer Documentation
- Zalo SDK (zca-js) GitHub Repository (for reference on API methods)
- n8n Documentation on Creating Credentials