Zalo User icon

Zalo User

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

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 incoming friend requests on Zalo.
  • Integrating Zalo user management into broader workflows that involve customer engagement or community building.
  • Streamlining user relationship management in marketing or support automation.

For example, if you receive multiple friend requests and want to accept them automatically based on certain criteria, this node can be used within an n8n workflow to process each request efficiently.

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" which means "Success".
  • response: The raw response object returned from 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 output is produced by this operation.

Dependencies

  • Requires valid Zalo API credentials including authentication cookies, device IMEI, and user agent strings.
  • These credentials must be configured in n8n beforehand to allow the node to authenticate with the Zalo service.
  • The node uses an external library (zca-js) to interact with the Zalo API.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials will cause authentication failures.
    • Missing or incorrect User ID input will prevent the friend request from being accepted.
    • Network connectivity problems can interrupt communication with the Zalo API.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not authenticate with Zalo. Check your API credentials and ensure they are correctly set up.
    • Errors related to invalid user IDs or permissions will be returned from the API and surfaced in the node's error output.
  • To handle errors gracefully, enable the "Continue On Fail" option in the node settings to allow processing of subsequent items even if one fails.

Links and References

Discussion