Zalo User icon

Zalo User

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

Overview

This node interacts with the Zalo social platform, specifically focusing on user-related operations. The "Lấy danh sách bạn bè" (Get Friends List) operation retrieves a list of friends for a given Zalo user account. This is useful in scenarios where you want to automate social interactions, analyze friend networks, or integrate Zalo contacts into other workflows.

For example, you might use this node to:

  • Automatically fetch and process a user's friend list for marketing campaigns.
  • Sync Zalo friends with another CRM or contact management system.
  • Analyze social connections for insights or reporting.

Properties

Name Meaning
Limit Maximum number of friends to retrieve.

The "Limit" property controls how many friends are fetched from the user's friend list, allowing you to limit the data volume.

Output

The output is an array of JSON objects, each representing the result of the operation per input item. For the "Lấy danh sách bạn bè" operation, the output JSON contains:

  • friends: An array of friend objects retrieved from the Zalo API, limited by the specified "Limit".
  • status: A string indicating success ("Thành công").
  • response: The raw response data from the API call (in some cases).

Each output item is paired with its corresponding input item index.

No binary data output is indicated in the code.

Dependencies

  • Requires valid Zalo user credentials including authentication cookies, IMEI, and user agent strings.
  • Uses an external helper class (imported as I) that handles API requests to Zalo.
  • Requires an API key credential configured in n8n for authentication with Zalo services.
  • The node depends on proper configuration of these credentials to successfully communicate with the Zalo API.

Troubleshooting

  • Common issues:

    • Invalid or expired authentication cookies or tokens will cause failures in fetching friend lists.
    • Incorrect or missing credentials will throw errors preventing API calls.
    • Exceeding API rate limits or requesting too many friends at once may lead to errors or partial data.
  • Error messages:

    • Throws a generic error if the API client instance cannot be created due to missing credentials.
    • If an API call fails, the node either continues with error details attached to the output (if "continue on fail" is enabled) or throws a detailed operation error specifying the item index.
  • Resolutions:

    • Ensure all required credentials (cookie, IMEI, user agent) are correctly set and valid.
    • Use the "Limit" property to restrict the number of friends requested to avoid overloading the API.
    • Enable "Continue on Fail" in the node settings to handle partial failures gracefully.

Links and References

Discussion