n8n

Workflow automations and AI agents

BotChap connects your website chat widget directly to n8n via a Chat Trigger URL or Webhook URL. You build the conversation logic in n8n — BotChap handles the branded widget and visitor experience on the front end.

BotChap reads the reply from the output, text, or response field of your n8n response — in that order. Return one of these fields from your workflow.
Session IDs are stable per browser session. If your workflow uses an n8n Memory node, pass sessionId as the session identifier to maintain conversation history.

Why use this integration

Use this integration when your chatbot needs business logic, CRM actions, lead routing, booking, notifications, or AI agent orchestration inside n8n. It works with both n8n Chat Trigger nodes and standard Webhook nodes.

How it works

  1. 1
    Visitor sends a message in the BotChap widget
  2. 2
    BotChap POSTs the message, session ID, and metadata to your n8n webhook or Chat Trigger URL
  3. 3
    n8n processes the message through your workflow or AI Agent
  4. 4
    n8n returns a response in the output, text, or response field
  5. 5
    BotChap displays the reply in the chat window

Required fields

Webhook URL
Your n8n Chat Trigger URL or Webhook URL. Must be publicly accessible.
Basic Auth (optional)
Username and password if your n8n webhook requires HTTP Basic authentication.

What BotChap sends

BotChap sends a POST request with this exact body:

{
  "chatInput":  "<visitor message>",
  "sessionId":  "<session identifier>",
  "chatbotId":  "<your widget ID>",
  "metadata":   { "source": "widget" }
}

Sample request

POST https://your-n8n-instance.com/webhook/abc123
Content-Type: application/json

{
  "chatInput": "I want to book a demo",
  "sessionId": "bc_7f3a9d",
  "chatbotId": "456a6dd3-3cf2-461f-9a69-f66148b2cda7",
  "metadata": { "source": "widget" }
}

Sample response

{
  "output": "Sure! What day works best for you?"
}

Best use cases

  • Lead qualification and CRM enrichment
  • Booking and intake flows
  • Customer support with n8n AI Agent
  • Product recommendation workflows
  • Notification and escalation pipelines

Frequently asked questions

Does BotChap work with n8n AI Agent nodes?
Yes. Connect the AI Agent node to a Chat Trigger or Webhook node, and return the output field. BotChap will display it.
Can I use Basic Auth on my n8n webhook?
Yes. Enable webhook authentication in n8n and enter the same username and password in BotChap's Backend settings.
What if my workflow returns an array?
BotChap checks for output, text, and response keys. If your workflow returns an array, BotChap reads the output field from the first item.
Does BotChap keep my n8n webhook URL private?
Yes. With Managed auth, BotChap proxies all requests through its servers — your webhook URL and any credentials are never exposed to the browser.

Related integrations

Ready to connect n8n to BotChap?

Create a free widget, configure the integration, and embed it on your site in minutes.

View all integrations