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 User resource and the operation Lấy danh sách bạn bè (Get all friends), it retrieves a list of the user's friends from Zalo.

Common scenarios where this node is beneficial include:

  • Synchronizing a contact list from Zalo into another system.
  • Analyzing or processing a user's friend network.
  • Building integrations that require access to a user's social connections on Zalo.

For example, you can use this node to fetch up to a specified number of friends and then send them targeted messages or analyze their profiles.

Properties

Name Meaning
Limit The maximum number of friend results to retrieve. For example, setting 50 returns up to 50 friends.

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

{
  "friends": [
    {
      "id": "123456",
      "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 with cookie, device IMEI, and user agent information.
  • The node uses the zca-js library to interact with the Zalo API.
  • Proper configuration of these credentials in n8n is necessary for successful authentication and API calls.

Troubleshooting

  • No API instance found error: This indicates invalid or missing credentials. Ensure that the Zalo API credentials are correctly set up with valid cookie, IMEI, and user agent values.
  • Empty or incomplete friend list: Check if the Limit parameter is set appropriately and that the authenticated user actually has friends on Zalo.
  • API rate limits or permission errors: These may occur if the Zalo account has restrictions or if the API usage exceeds allowed quotas.
  • If the node fails but Continue On Fail is enabled, errors will be returned in the output JSON under the error field for each failed item.

Links and References

Discussion