Zalo User icon

Zalo User

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

Overview

This node manages Zalo user interactions, specifically for handling friend requests and user-related actions on the Zalo platform. It is useful in scenarios where you want to automate social interactions such as accepting friend requests, sending friend requests with messages, blocking or unblocking users, updating account settings or avatar, retrieving user information, and managing friends list.

A practical example is automating the acceptance of incoming friend requests to grow a network without manual intervention, or sending personalized friend requests programmatically.

For the selected operation "Chấp nhận lời mời kết bạn" (Accept Friend Request), the node accepts a pending friend request from a specified user ID.

Properties

Name Meaning
User ID The ID of the Zalo user whose friend request you want to accept

Output

The output JSON contains:

  • status: A string indicating the success status, e.g., "Thành công" ("Success").
  • response: The raw response object returned by the Zalo API after accepting the friend request.

The output is paired with the input item index to maintain data consistency.

No binary data output is produced by this operation.

Example output JSON structure:

{
  "status": "Thành công",
  "response": {
    /* API response details */
  }
}

Dependencies

  • Requires an API key credential to connect to the Zalo platform.
  • Uses stored credentials including cookie, device IMEI, and user agent strings for authentication.
  • Depends on the external zca-js library to interact with the Zalo API.
  • Requires proper configuration of the Zalo API credentials within n8n.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause login failure.
    • Missing or incorrect User ID parameter will prevent the operation from executing.
    • Network connectivity problems can interrupt API calls.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      This indicates that authentication failed due to invalid or missing credentials. Verify your API key and related authentication details.
    • Errors thrown during execution include the error message from the API; enabling "Continue On Fail" allows processing subsequent items even if one fails.

Links and References

Discussion