Zalo User icon

Zalo User

Quản lý người dùng Zalo

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 the authenticated user's friends from Zalo.

Common scenarios where this node is beneficial include:

  • Synchronizing a user's Zalo friend list with another system or database.
  • Analyzing or processing friend data for marketing or communication purposes.
  • Automating workflows that depend on the user's social connections on Zalo.

For example, you could use this node to fetch up to 50 friends and then send personalized messages or invitations based on that list.

Properties

Name Meaning
Limit The maximum number of friends to retrieve. You specify how many friends you want to get back, e.g., 10, 50, 100, etc.

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 snippet:

{
  "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 authentication cookies, device IMEI, and user agent strings.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured in n8n before execution.

Troubleshooting

  • No API instance found error: This indicates invalid or missing credentials. Ensure your Zalo API credentials are correctly set up with valid cookie, IMEI, and user agent values.
  • Empty friend list: If the returned friend list is empty, verify that the authenticated account actually has friends and that the API permissions allow access to friend data.
  • Limit parameter issues: Providing a non-numeric or negative value for the limit may cause unexpected behavior. Always provide a positive integer.
  • API rate limits or connectivity issues: Network problems or API throttling can cause errors. Check your network connection and consider retrying after some time.

Links and References

Discussion