Mtai Zalo User icon

Mtai Zalo User

Quản lý người dùng Zalo

Overview

This node manages Zalo user-related operations via the Zalo API, focusing on user interactions such as managing friends and account settings. Specifically, the "Lấy danh sách bạn bè" (Get all friends) operation retrieves a list of friends for the authenticated Zalo user.

Common scenarios where this node is useful include:

  • Automating friend management workflows on Zalo.
  • Integrating Zalo social data into CRM or marketing platforms.
  • Fetching friend lists to analyze social connections or send targeted messages.

For example, you can use this node to fetch up to 50 friends of a Zalo user and then process that list in subsequent workflow steps.

Properties

Name Meaning
Limit The maximum number of friends to retrieve. For example, setting it 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",
      ...
    },
    ...
  ]
}

No binary data is output by this operation.

Dependencies

  • Requires an API key credential to authenticate with the Zalo API.
  • The node uses stored credentials including a cookie, device IMEI, and user agent string to establish a session.
  • The external dependency is the zca-js library which handles communication with the Zalo API.

Troubleshooting

  • No API instance found: This error indicates invalid or missing credentials. Ensure that the API key credential is correctly configured with valid cookie, IMEI, and user agent values.
  • API request failures: Network issues or expired authentication tokens may cause requests to fail. Refresh credentials or check network connectivity.
  • Limit parameter issues: Providing a non-numeric or negative value for the limit property may cause unexpected behavior. Always provide a positive integer.

If the node is set to continue on failure, errors for individual items will be returned in the output JSON under an error field.

Links and References

Discussion