Zalo User icon

Zalo User

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

Overview

This node integrates with the Zalo social platform to manage user-related actions. 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 social connections for marketing or CRM purposes.
  • Automating workflows that require access to a user's social graph on Zalo.

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

Properties

Name Meaning
Limit The maximum number of friends to retrieve. For example, setting this to 50 will return up to 50 friends from the user's friend list.

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 such as their user ID, name, and other profile information (the exact structure depends on the Zalo API response).

No binary data output is produced by this operation.

Example output structure:

{
  "friends": [
    {
      "id": "123456789",
      "name": "Friend Name",
      "avatar": "https://example.com/avatar.jpg",
      ...
    },
    ...
  ]
}

Dependencies

  • Requires valid Zalo API credentials including an API key credential that provides 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 to authenticate requests.

Troubleshooting

  • No API instance found error: This indicates invalid or missing credentials. Ensure that the Zalo API credentials are correctly configured and contain valid cookie, IMEI, and user agent values.
  • Empty friend list: If the returned friend list is empty, verify that the authenticated user actually has friends on Zalo and that the API permissions allow access to friend data.
  • Limit parameter issues: Setting the limit too high might cause performance issues or API rate limiting. Use reasonable limits according to your needs.
  • Network or API errors: Check network connectivity and Zalo API status if requests fail unexpectedly.

If the node is set to continue on failure, errors for individual items will be included in the output under an error field.

Links and References

Discussion