n8n Integration
Set up self-hosted automation workflows with n8n and Chattlebot webhooks. Full control over your data with powerful processing nodes.
What you'll learn
- What you'll build
- Create an n8n workflow
- Copy the production URL
- Set up the webhook in Chattlebot
- Test the connection
- Add processing nodes
- Activate the workflow
What you'll build
By the end of this guide, you'll have a fully functional automation pipeline between Chattlebot and n8n โ either self-hosted on your own server or using n8n Cloud. n8n gives you complete control over your automation infrastructure and data. When a lead comes in through your chatbot, n8n will receive the data via webhook, and you can filter, transform, enrich, and route it to any destination โ your CRM, database, email platform, or internal tools. Unlike cloud-only platforms, n8n lets you keep everything on your own infrastructure if needed.
Chattlebot
Sends data
n8n Webhook
Receives POST
Process
Filter & route
Your tools
CRM, DB, API
Self-hosted or Cloud
Full control over your automation infrastructure and data
Create an n8n workflow
Open your n8n instance (either your self-hosted installation or n8n Cloud at app.n8n.cloud). Click 'New Workflow' to create a blank workflow. In the workflow canvas, click the '+' button to add your first node. Search for 'Webhook' and select the Webhook node. In the node settings, set the HTTP Method to POST โ this is the method Chattlebot uses to send data. Leave the path as the auto-generated value, or set a custom one for easier identification. The Webhook node will display two URLs: a Test URL and a Production URL. You'll need the Production URL for the next step.
New Workflow
n8n workflow editor
Webhook Node
HTTP Method: POST
Add your processing nodes...
Copy the production URL
This is the most important distinction in n8n webhook setup: always use the Production URL, not the Test URL. The Production URL works when your workflow is activated and running. It follows the format: https://your-n8n.example.com/webhook/YOUR_WEBHOOK_ID. The Test URL (which contains '/webhook-test/' in the path) only works while the workflow editor is open and you've clicked 'Listen for test event'. If you use the Test URL in Chattlebot, your webhook will stop working as soon as you close the n8n editor. Copy the Production URL โ you'll paste it into Chattlebot next.
https://your-n8n.example.com/webhook/abc123https://your-n8n.example.com/webhook-test/abc123Test URL only works while the editor is open
๐กPro Tip
- If you're using n8n Cloud, your production URL will look like https://your-name.app.n8n.cloud/webhook/YOUR_ID. For self-hosted, it will use your server's domain.
Set up the webhook in Chattlebot
In your Chattlebot dashboard, go to your bot's Actions page and click 'Custom Webhooks' โ 'Add Webhook'. Select the n8n template from the template picker โ this pre-configures the correct settings for n8n's webhook format. Paste the Production URL you copied from n8n into the URL field. Give it a descriptive name like 'Lead to n8n' or 'n8n Lead Pipeline'. The n8n template automatically sets the HTTP method to POST and configures the default payload template. Enable the triggers you want โ typically 'Trigger on Lead Capture' for sending new leads to your n8n workflow.


Test the connection
Before testing, make sure your n8n workflow is activated (the toggle in the top-right of the workflow editor should be on). In Chattlebot, click 'Send Test Webhook' to send sample data. You should see a success response (200 OK). In n8n, check the execution log (click 'Executions' in the left sidebar) โ you should see a new execution with the test data. Click on it to inspect the payload and verify all the lead fields came through correctly: email, name, phone, urgency, conversation summary, and more. If the test fails, verify you used the Production URL (not the Test URL) and that the workflow is activated.


Add processing nodes
This is where n8n really shines โ add processing nodes after the Webhook node to filter, transform, and route your lead data. Filter node: only process leads above a certain urgency threshold, or filter by category (e.g., only 'pricing' inquiries go to sales). Set node: transform and map fields to match your CRM's expected format โ rename fields, combine values, or add computed fields. IF node: create branching logic โ route high-urgency leads to one path and low-urgency to another. Then connect to destination nodes: HTTP Request (call any API), MySQL/Postgres (write to your database), HubSpot/Salesforce (create CRM contacts), or Send Email (notify your team). You can chain as many nodes as needed to build complex workflows.
Filter
High urgency only
Transform
Map fields to CRM format
Route
Branch by lead category
CRM
Create or update contact

Activate the workflow
Once you've added and configured your processing nodes, toggle the workflow to active using the switch in the top-right corner of the n8n editor. The workflow is now running and will process incoming webhooks automatically. Back in Chattlebot, ensure your webhook is enabled. Your pipeline is live! To verify end-to-end, submit a test lead through your chatbot widget and check n8n's execution history to confirm the data flowed through all your nodes correctly and reached the final destination.
๐กPro Tip
- n8n workflows can be versioned and exported as JSON. Keep backups of your workflows, especially before making major changes.
Related Guides
Payload Reference
Complete reference for all available webhook variables, templates, and payload structure. Learn how variable substitution works and customize payloads for your integrations.
Read guideTroubleshooting
Solve common webhook issues โ error codes, retry configuration, timeout tuning, success conditions, and frequently asked questions for reliable automation.
Read guideReady to get started?
Create your free account and start building your chatbot today.
Start Free Trial