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 social connections for marketing or CRM purposes.
  • Automating workflows that depend on a user's social graph on Zalo.

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 and includes their details as provided by the Zalo API.

Example output structure:

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

No binary data is output 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 under a generic API authentication token setup.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause login failures.
    • Missing or malformed cookie, IMEI, or user agent information can prevent successful API calls.
    • Requesting more friends than available will simply return fewer results without error.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      This indicates failure to authenticate with Zalo API. Verify that the API key credential is correctly set up and contains valid cookie, IMEI, and user agent values.
    • Errors during API calls will be reported per item unless "Continue On Fail" is enabled, in which case errors are returned in the output JSON under an error field.

Links and References

Discussion