Zalo User icon

Zalo User

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

Zalo User → Chấp nhận lời mời kết bạn

AI-generated

Overview

This node manages Zalo user interactions, specifically for the "Zalo User" resource. The operation Chấp nhận lời mời kết bạn (Accept Friend Request) allows you to programmatically accept a friend request from another Zalo user by specifying their user ID.

Common scenarios where this node is useful include automating social media management tasks such as:

  • Automatically accepting friend requests from specific users or after certain triggers.
  • Integrating Zalo user management into broader workflows that involve customer engagement or community building.

For example, a business could use this node to automatically accept friend requests from customers who have submitted a form on their website, streamlining communication setup.

Properties

Name Meaning
User ID The ID of the Zalo user whose friend request you want to accept. This must be provided as a string.

Output

The output JSON contains:

  • status: A string indicating the result of the operation, typically "Thành công" meaning "Success".
  • response: The raw response object returned by the Zalo API after accepting the friend request. This may contain additional details about the accepted request.

Example output JSON structure:

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

No binary data is output by this node.

Dependencies

  • Requires an API key credential for Zalo with valid authentication details including cookie, IMEI, and user agent.
  • Uses the external zca-js library to interact with the Zalo API.
  • The node expects these credentials to be configured in n8n under a generic API authentication token for Zalo.

Troubleshooting

  • No API instance found error: This occurs if the node cannot create a valid API client instance, usually due to missing or invalid credentials. Ensure your Zalo API credentials are correctly set up with valid cookie, IMEI, and user agent values.
  • Operation failures: If the friend request acceptance fails, check that the provided User ID is correct and that the user has actually sent a friend request.
  • Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning error messages in the output JSON for failed items.

Links and References

Discussion