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 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 useful include:

  • Synchronizing a user's Zalo friend list with another system.
  • Analyzing or processing a user's social connections on Zalo.
  • Automating workflows that depend on a user's social graph.

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

Properties

Name Meaning
Limit The maximum number of friends to retrieve 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 corresponds to one friend’s data as returned by the Zalo API.

Example output structure:

{
  "friends": [
    {
      // Friend details here (e.g., id, name, avatar, etc.)
    },
    ...
  ]
}

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 beforehand.

Troubleshooting

  • Invalid Credentials: If the node throws an error about no API instance found, ensure that the provided Zalo API credentials are correct and contain valid cookie, IMEI, and user agent information.
  • 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.
  • API Errors: Any errors from the Zalo API will be surfaced as node errors unless "Continue On Fail" is enabled, in which case the error message will be included in the output JSON under error.

Links and References

Discussion