npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-chat-confirmation

v0.1.5

Published

n8n community node for requesting user confirmation in AI agent workflows via webhook

Readme

n8n-nodes-chat-confirmation

This is an n8n community node that requests user confirmation before executing HTTP requests. Perfect for AI agent workflows where you need explicit user approval before performing write operations.

n8n is a fair-code licensed workflow automation platform.

Installation | Operations | Usage | Custom Chat UI Integration | Compatibility | Resources

Installation

Follow the installation guide in the n8n community nodes documentation.

Operations

  • Request Confirmation: Request user confirmation via webhook, then execute an HTTP request if confirmed. The node waits for user authorization before proceeding.

Usage

How It Works

  1. AI Agent calls the tool with variables (filled using $fromAI())
  2. Node creates a webhook URL and waits for confirmation
  3. Your custom UI displays the confirmation request to the user
  4. User approves/rejects → Your UI calls the webhook
  5. If approved: Node executes the HTTP request automatically
  6. Returns result to the AI Agent

Configuration

Option 1: Import from cURL (Recommended)

  1. Enable "Import from cURL"
  2. Paste your cURL command in the "cURL Command" field
  3. The node will automatically extract:
    • HTTP method (or defaults to POST if data is present)
    • URL
    • Headers (from -H or --header flags)
    • Request body (from -d, --data, --data-raw, or --data-binary flags)

Example cURL:

curl -X POST https://api.example.com/send-email \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer token123" \
  -d '{"to": "[email protected]", "subject": "Hello"}'

Option 2: Manual Configuration

  1. Confirmation Message: Message to show the user (e.g., "Do you want to send this email?")
  2. Variables: Variables the AI fills using $fromAI()
  3. HTTP Method: GET, POST, PUT, PATCH, or DELETE
  4. Action URL: The URL to call when confirmed
  5. Request Body: Body for POST/PUT/PATCH (use {{ $json.variables }} to pass variables)
  6. Headers: Optional HTTP headers
  7. Timeout: How long to wait for confirmation (default: 300 seconds)

Variables Setup

Add variables that the AI will fill:

| Name | Value | Description | |------|-------|-------------| | recipient | $fromAI() | Email recipient | | subject | $fromAI() | Email subject | | body | $fromAI() | Email body |

Example Configurations

Using cURL Import:

Import from cURL: ✓ Enabled
cURL Command: 
curl -X POST https://api.example.com/send-email \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {{ $json.variables.apiKey }}" \
  -d '{"to": "{{ $json.variables.recipient }}", "subject": "{{ $json.variables.subject }}"}'

Manual Configuration:

Confirmation Message: "Do you want to send an email?"
HTTP Method: POST
Action URL: https://api.example.com/send-email
Request Body: {{ JSON.stringify($json.variables) }}
Variables:
  - Name: "recipient", Value: $fromAI()
  - Name: "subject", Value: $fromAI()
  - Name: "body", Value: $fromAI()

Webhook Response

Simple Usage: Just POST to the webhook URL with a JSON body containing confirmed:

POST to webhookUrl with:

{
  "confirmed": true
}

Or to reject:

{
  "confirmed": false
}

Optional Fields:

  • confirmed (boolean): true to approve and execute, false to reject. Defaults to true if not provided.
  • responseData (object, optional): Additional data to pass back to the workflow

Flexible Formats: The webhook accepts various formats:

  • {"confirmed": true} - Standard format
  • {"confirmed": false} - Reject
  • {"action": "reject"} - Alternative reject format
  • {} - Empty body defaults to confirmed
  • Any POST request - Defaults to confirmed

The node automatically identifies the correct confirmation request from the webhook URL path, so you don't need to include any special keys or headers.

Output

The node outputs:

  • confirmed: Boolean indicating if the action was confirmed
  • message: The confirmation message
  • variables: Object containing all the variables with their resolved values
  • variablesMetadata: Metadata about each variable
  • webhookUrl: The webhook URL to call for confirmation (just POST to this URL)
  • webhookKey: Internal key (optional - the webhook identifies requests automatically)
  • actionExecuted: Boolean indicating if the HTTP request was executed
  • actionResult: The full HTTP response from the executed request (if executed successfully)
  • actionError: Error message (if execution failed)
  • actionUrl: The URL that was called
  • actionMethod: The HTTP method that was used
  • timestamp: ISO timestamp

Note: If the HTTP response is a JSON object, its properties are also merged directly into the output for easier access. The full response is always available in actionResult.

Example Workflow

As a Tool in AI Agent:

  1. AI Agent Node → Uses Chat Confirmation as a tool
  2. Chat Confirmation Node
    • Outputs webhookUrl and webhookKey
    • Waits for confirmation
    • Executes HTTP request if confirmed
    • Returns result to AI Agent

Your Custom UI Flow:

  1. Receive confirmation request with webhookUrl and webhookKey
  2. Display confirmation dialog to user
  3. User clicks Approve/Reject
  4. Call webhook: POST webhookUrl with { "confirmed": true/false, "webhookKey": "..." }
  5. Node executes HTTP request (if approved) and returns result

Use Cases

  • Send Emails: Confirm before sending emails via API
  • Create Records: Confirm before creating database records
  • Update Data: Confirm before updating user data
  • API Calls: Confirm before executing any write operation
  • Financial Transactions: Get approval before processing payments

Custom Chat UI Integration

For detailed implementation instructions, see the Complete Implementation Guide.

Quick Integration

// When you receive a confirmation request from n8n:
const confirmation = {
  webhookUrl: "...",
  webhookKey: "exec_12345_1234567890", // REQUIRED!
  message: "Do you want to send this email?",
  variables: { recipient: "...", subject: "..." }
};

// User approves:
await fetch(confirmation.webhookUrl, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    confirmed: true,
    webhookKey: confirmation.webhookKey // REQUIRED!
  })
});

Compatibility

Compatible with [email protected] or later

Publishing

To publish this package to npm, use:

npm run release

This will handle versioning, building, and publishing automatically. Do not use npm publish directly as it will be blocked by the prepublishOnly hook.

Resources