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 "Lấy danh sách bạn bè" (Get All Friends) operation fetches a list of friends for the authenticated Zalo user.
Typical use cases include:
- Automating social interactions on Zalo by managing friend lists.
- Integrating Zalo user data into workflows for marketing or customer engagement.
- Synchronizing contacts from Zalo to other systems.
- Monitoring and managing friend requests programmatically.
For example, you can use this node to retrieve up to a specified number of friends and then process or export that list for further analysis or messaging campaigns.
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, limited by the specified "Limit" property.
Example output structure:
{
"friends": [
{
"id": "123456789",
"name": "Friend Name",
"avatar": "https://example.com/avatar.jpg",
...
},
...
]
}
Each friend object includes details about the friend, such as their ID, name, avatar URL, and potentially other profile information as provided by the Zalo API.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for Zalo API authentication, including cookie, device IMEI, and user agent information.
- Uses the external library
zca-jsto interact with the Zalo API. - The node expects valid credentials configured in n8n to establish a session with Zalo.
Troubleshooting
- Invalid Credentials or Session Expiry: If the node throws an error indicating no API instance found or login failure, verify that the provided credentials (cookie, IMEI, user agent) are correct and have not expired.
- Limit Exceeds Available Friends: Specifying a limit higher than the actual number of friends will simply return all available friends without error.
- Network or API Errors: Temporary network issues or API rate limits may cause failures; enabling "Continue On Fail" allows partial processing.
- Error Messages: Errors thrown during execution include descriptive messages; ensure to check these for clues on misconfiguration or invalid parameters.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (for the underlying Zalo API client used)
- n8n Documentation on Creating Custom Nodes