Actions9
Overview
This n8n node allows you to interact with Zalo user accounts. Specifically, for the "Lấy danh sách bạn bè" (Get All Friends) operation under the "Zalo User" resource, the node retrieves a list of friends from a Zalo account. This is useful in scenarios where you need to automate workflows involving your Zalo social network, such as syncing contacts, analyzing your friend list, or integrating Zalo data with other systems.
Practical examples:
- Exporting your Zalo friends to a CRM or spreadsheet.
- Triggering notifications or actions based on changes in your Zalo friend list.
- Analyzing your Zalo social graph for marketing or engagement purposes.
Properties
| Name | Type | Meaning |
|---|---|---|
| Limit | Number | Số lượng bạn bè tối đa cần lấy (Maximum number of friends to retrieve). |
Output
The output will be a JSON object with the following structure:
{
"friends": [
// Array of friend objects as returned by the Zalo API
]
}
- The
friendsfield contains an array of friend objects, each representing a Zalo friend. The exact structure of each friend object depends on the Zalo API response but typically includes details like user ID, name, and profile information.
Dependencies
- External Service: Requires access to the Zalo platform via the
zca-jslibrary. - Credentials: You must provide valid Zalo credentials (
zaloApi) including cookie, IMEI, and user agent. - n8n Configuration: Ensure that the Zalo credential is set up in n8n and assigned to this node.
Troubleshooting
Common Issues:
Invalid Credentials: If the provided Zalo credentials (cookie, IMEI, user agent) are incorrect or expired, the node will throw an error:
"No API instance found. Please make sure to provide valid credentials."
Resolution: Double-check your Zalo credentials in n8n and ensure they are up-to-date.API Changes or Rate Limits: If Zalo changes their API or imposes rate limits, you may receive unexpected errors or incomplete data.
Resolution: Monitor for any updates from Zalo regarding their API and adjust your usage accordingly.Limit Exceeds Friend Count: If the specified limit exceeds the actual number of friends, the node will simply return all available friends without error.
Error Handling: If an error occurs during execution and "Continue On Fail" is enabled, the node will output an error message in the
errorfield of the JSON output for the affected item.
Links and References
For more details on setting up Zalo credentials in n8n, refer to the n8n documentation or your organization's integration guidelines.