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 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 a user's social connections on Zalo.
  • Automating workflows that depend on the user's social graph, such as sending messages or invitations to friends.

Practical example:

  • A marketing automation workflow could use this node to fetch up to 50 friends of a user and then send personalized promotional messages to each friend.

Properties

Name Meaning
Limit The maximum number of friends to retrieve. This limits how many friends are returned by the operation. Default is 50.

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

{
  "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 cookie, IMEI, and user agent information.
  • 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 "No API instance found," it means the provided credentials are invalid or incomplete. Ensure the API key credential includes a valid cookie, IMEI, and user agent.
  • 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.
  • Limit Parameter Issues: Setting the limit too high might cause performance issues or API rate limiting. Use reasonable values.
  • API Errors: Any errors from the Zalo API will be surfaced as node errors unless "Continue On Fail" is enabled, in which case error details appear in the output JSON.

Links and References

Discussion