n8n webhook tutorial — this guide shows you how to trigger Claude AI workflows from literally anything: a form submission, a Stripe payment, a Slack message, or your own custom app. Webhooks are the most powerful and most underused feature in n8n, and once you understand them, your automation possibilities expand dramatically.
This guide explains exactly how webhooks work in n8n, how to connect them to Claude, and walks through four real business use cases you can build today.
What Is a Webhook (and Why It’s Better Than Polling)
Most n8n triggers work by polling — checking a service every X minutes for new data. A Gmail trigger set to poll every 15 minutes checks your inbox 96 times per day, consuming operations even when there’s nothing new.
A webhook is the opposite: instead of n8n asking “is there anything new?”, the external service pushes data to n8n the moment something happens. It’s instant, efficient, and far more reliable for time-sensitive workflows.
When to use polling: checking for new emails, RSS feeds, or any service that doesn’t support webhooks
When to use webhooks: contact form submissions, payment events, CRM updates, app notifications, any custom integration where you control the sender
How n8n Webhook Triggers Work with Claude
Every n8n webhook trigger generates a unique URL that looks like this:
https://your-n8n-instance.com/webhook/your-unique-id
Any service that can send an HTTP POST request can trigger your workflow by calling that URL. When it does, n8n receives the data, passes it to the next node, and your automation runs — usually in under a second.
Step 1 — Create a Webhook Trigger in n8n
Open n8n and create a new workflow. Add your first node and search for “Webhook”.
Configure the Webhook node:
- HTTP Method: POST (most common) or GET depending on your use case
- Path: give it a descriptive name like
contact-formorstripe-payment - Authentication: for production workflows, add a secret header to prevent unauthorized triggers
In the Webhook node, set the Response Mode to control when n8n replies: “On Received” sends an immediate 200 OK response then processes the workflow. “Last Node” waits for the entire workflow to complete before responding. “Using Respond to Webhook Node” gives you full control over response timing and content. Getpassionfruit
For most business workflows, use “On Received” — it responds immediately to the sender while processing continues in the background.
Step 2 — Connect Claude to the Webhook
After the Webhook trigger, add an Anthropic Chat Model node connected to an AI Agent or LLM Chain node.
Pass the webhook data to Claude using n8n expressions:
{{ $json.body.message }}
{{ $json.body.customer_name }}
{{ $json.body.email }}
These pull specific fields from the incoming webhook payload and feed them directly into Claude’s prompt.
Example system prompt for a support webhook:
You are a customer support assistant. A customer has submitted a support request.
Analyze the request and:
1. Categorize it (billing, technical, general)
2. Assess urgency (low, medium, high)
3. Draft a response
Customer name: {{ $json.body.customer_name }}
Message: {{ $json.body.message }}
Step 3 — Send the Webhook URL to Your Trigger Source
Once your workflow is built, copy the webhook URL from the Webhook node and configure your external service to send POST requests to it.
Common integrations:
Contact forms (WPForms, Typeform, Gravity Forms): paste the webhook URL in the form’s webhook/notification settings
Stripe: in the Stripe dashboard, go to Developers → Webhooks → Add endpoint and paste your n8n URL
Slack: use Slack’s Outgoing Webhooks or Slash Commands to POST to your n8n webhook when a specific trigger word is used
Custom apps: any Python script or application monitoring system can POST data to your n8n webhook URL using a simple HTTP request. Getpassionfruit
4 Real Business Workflows Using Webhooks + Claude
1. AI Lead Scoring from Contact Forms
When a contact form is submitted, the webhook triggers n8n to run an enrichment chain — company lookup, LinkedIn data, AI intent scoring — then routes the lead to the right outreach sequence based on score. Shrey Kajaria
Nodes: Webhook → HTTP Request (enrichment) → Claude AI Agent (score 1-10) → IF node (hot vs nurture) → CRM update
2. Intelligent Support Ticket Routing
When a customer submits a support ticket via your website, Claude analyzes the message, categorizes the issue, assesses urgency, and routes it to the right team — all before a human ever looks at it.
Nodes: Webhook → Claude LLM Chain (categorize + draft response) → IF node (by category) → Gmail or Slack
3. Stripe Payment → Automated Onboarding
When a new payment is processed, the Stripe webhook triggers a full onboarding sequence: Claude personalizes the welcome email based on the product purchased, creates the account in your CRM, and sends a Slack notification to your team.
Nodes: Webhook (Stripe) → Claude Chat Model (personalize email) → Gmail (send welcome) → HubSpot (create contact) → Slack (notify team)
4. Server Alert → AI Diagnosis
A monitoring system sends alerts to n8n webhooks, which use Claude to analyze logs and suggest remediation steps. Your team gets a Slack message with the alert summary and Claude’s recommended fix — not just a raw error dump. Getpassionfruit
Nodes: Webhook (monitoring system) → Claude AI Agent (analyze + suggest fix) → Slack (formatted alert)
Testing Webhooks During Development
Testing webhooks locally requires your n8n instance to have a public URL. If you don’t have a domain, grab a free subdomain from DuckDNS or No-IP, or use ngrok to tunnel your local n8n instance to a public URL during development. Dust
For n8n Cloud users, your webhook URL is already public — no tunneling needed.
n8n also has a built-in “Listen for test event” button in the Webhook node that puts it in listening mode for 120 seconds, so you can trigger it manually from your browser or Postman to see the incoming data before building the rest of the workflow.
Security Best Practices
Never leave production webhooks completely open. Anyone who discovers your webhook URL can trigger your workflow and potentially consume API credits.
Add a header authentication check as the first step after your Webhook node:
- In your Webhook node, enable “Header Auth”
- Set a custom header name (e.g.
X-Webhook-Secret) and a secret value - Configure your external service to send that header with every request
If the header doesn’t match, n8n rejects the request before it reaches Claude.
n8n Webhook Tutorial: What’s Next
Webhooks combined with Claude are the foundation of most advanced AI automation architectures. Once you’re comfortable with this pattern, the next step is building multi-step AI agents that can call external tools, make decisions, and complete complex tasks autonomously.
Last updated: June 2026