Actions9
Overview
This node, named "Zalo User," manages interactions with Zalo user accounts through various operations such as managing friend requests, blocking/unblocking users, changing account settings, and retrieving user information. Specifically, the operation "Lấy danh sách bạn bè" (Get all friends) fetches a list of friends from a Zalo user account.
Common scenarios where this node is useful include:
- Automating social media management tasks on Zalo.
- Integrating Zalo user data into CRM or marketing workflows.
- Managing friend lists programmatically for outreach or analysis.
- Synchronizing contacts between Zalo and other platforms.
For example, you can use the "Lấy danh sách bạn bè" operation to retrieve up to a specified number of friends from a Zalo account and then process or analyze that list in subsequent workflow steps.
Properties
| Name | Meaning |
|---|---|
| Limit | The maximum number of friends to retrieve from the Zalo user's friend list. Default is 50. |
Output
The output JSON contains a single field:
friends: An array of friend objects representing the retrieved friends from the Zalo account. Each object typically 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://...",
...
},
...
]
}
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.
- Uses the external
zca-jslibrary to interact with the Zalo API. - The node expects these credentials to be configured properly in n8n before execution.
Troubleshooting
- Invalid Credentials or Authentication Failure: If the node throws an error indicating no API instance was found, verify that the provided Zalo API credentials are correct and contain valid cookie, IMEI, and user agent values.
- Empty Friend List: If the returned friend list is empty, ensure the authenticated user actually has friends and that the API limits or permissions allow access.
- API Rate Limits or Network Issues: Temporary failures may occur due to network problems or API rate limiting; retrying after some time may resolve these.
- Error Handling: If an error occurs during execution, the node can continue on fail if enabled, returning the error message in the output JSON under the
errorfield.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (for the underlying Zalo API client used)
- n8n Documentation on Creating Custom Nodes