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.
  • Analyzing or processing friend data for marketing or communication purposes.
  • Automating workflows that depend on the user's social connections.

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. 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 user's friends retrieved from Zalo. Each object typically includes details about a friend (such as user ID, name, etc., depending on the API response).

Example output structure:

{
  "friends": [
    {
      "id": "123456789",
      "name": "Friend Name",
      // other friend details...
    },
    // more friends...
  ]
}

No binary data is output by this operation.

Dependencies

  • Requires valid Zalo API credentials including an API key credential that provides authentication via 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 these credentials in n8n is necessary for successful API calls.

Troubleshooting

  • No API instance found: This error indicates invalid or missing credentials. Ensure that the Zalo API credentials are correctly configured and contain valid cookie, IMEI, and user agent values.
  • Empty or incomplete friend list: If fewer friends than expected are returned, verify the Limit parameter and confirm that the authenticated account actually has that many friends.
  • API rate limits or connectivity issues: Network problems or API restrictions may cause failures. Check network connectivity and Zalo API status.
  • Continue on Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error messages in the output JSON under the error field.

Links and References

Discussion