n8n Webhooks
Webhooks are the foundation of real-time automation. Rather than polling services on a schedule, webhooks push data to your workflow the moment something happens. n8n's webhook nodes receive these events and immediately trigger your automation — enabling real-time responses to customer actions, sales events, support tickets, and any other event that happens in your connected systems.
Understanding Webhooks
A webhook is an HTTP request sent from one system to another when an event occurs. When a new contact is created in HubSpot, HubSpot sends a POST request to your webhook URL with the contact data. Your n8n webhook receives this request and triggers your workflow.
The webhook model is better than polling (checking periodically if anything changed) because it's real-time, it's more efficient (no unnecessary API calls), and it's more reliable (you don't miss events that happen between polling intervals).
n8n's Webhook node provides a URL that any system can call. The URL is unique to your workflow and available as soon as you activate it.
Setting Up Your First Webhook
- In your n8n workflow, add a "Webhook" node from the Trigger nodes section
- The node will show a "Webhook URL" — this is the URL other systems send data to
- Set the HTTP method (POST is most common for webhooks)
- Set the response mode: "Last node" (respond with the final workflow output) or "When last node finishes" (respond immediately with 200 OK, run workflow asynchronously)
- Copy the webhook URL
Two URLs: n8n provides a "Test URL" (active only when you're testing) and a "Production URL" (active only when the workflow is activated). Use the Test URL during development; switch to the Production URL when activating.
Connecting Services to Your n8n Webhook
Most SaaS services allow configuring webhook destinations in their settings.
HubSpot: Settings → Integrations → Webhooks → Create webhook. Paste your n8n webhook URL. Select the events to send (contact.creation, deal.creation, etc.)
Stripe: Dashboard → Developers → Webhooks → Add endpoint. Paste your n8n URL. Select events to listen for.
Shopify: Apps → Custom Data → Webhooks. Set the event, format, and your n8n URL.
Form tools (Typeform, Tally): Each form has a webhook setting. Add your n8n URL to receive submissions instantly.
Slack: Create a Slack app, enable incoming webhooks or event subscriptions, and point events to your n8n URL.
For services without native webhook support, check if they support Zapier (you can use Zapier to receive events and forward to your n8n webhook) or if the Make.com integration can bridge the gap.
Processing Webhook Data
Webhook payloads vary by service. After receiving a webhook in n8n, use the execution view to see exactly what data was received.
Accessing webhook data in subsequent nodes: The webhook body is available as $json in all nodes after the webhook. If the payload is {"email": "user@example.com", "type": "contact_created"}, you access it as {{$json.email}} and {{$json.type}} in subsequent nodes.
Filtering events: Many services send all events to the same webhook URL. Use an If or Switch node after the webhook to filter to the specific events you want to process. "If $json.type equals contact_created" routes only contact creation events through your workflow.
Signature verification: Most services include a signature in the webhook headers to verify the request came from them (not from an attacker). Verify this signature using a Code node for security-sensitive workflows.
Real-Time Automation Patterns with Webhooks
Real-time lead processing: HubSpot webhook fires when a new contact is created → n8n receives the data → Claude assesses lead quality → enrichment API adds company data → CRM record is updated with score and enrichment → Slack notification to sales rep. From form submission to sales rep notification: 10-15 seconds.
Instant order processing: Stripe webhook fires when payment succeeds → n8n processes the order → sends confirmation email → creates fulfillment task → updates customer record in CRM → notifies operations team. Customer receives confirmation within seconds of payment.
Real-time support routing: Support email webhook fires → Claude classifies issue type and urgency → workflow routes to appropriate team in Zendesk → auto-reply is sent to customer → Slack notification for urgent issues. Response happens before a human even sees the email.
Webhook Security
Webhooks expose a URL that can receive data from anyone. Secure your webhooks:
Signature verification: Always verify the webhook signature when the sending service provides one. This confirms the request came from the legitimate service.
Secret tokens: Some services include a secret token in the payload that you verify in your workflow. Add an If node that checks for the expected token and stops the workflow if it doesn't match.
IP allowlisting: For self-hosted n8n, configure your firewall to only accept webhook traffic from the sending service's IP range.
Recommended Tools
- n8n — Webhook receiver and workflow automation
- HubSpot — CRM with webhook events for contacts and deals
- Stripe — Payment webhooks for e-commerce automation
- Typeform — Form webhooks for lead capture automation
- Claude API — AI processing triggered by webhook events
“Webhooks make automation real-time. The difference between 15-second lead response and 15-minute lead response is the difference between webhook and polling.”
Related articles
n8n vs Make.com vs Zapier: a 2026 honest comparison
No affiliate fluff — where each tool wins, where it breaks, and what we actually run.
Self-hosting n8n: a production-grade setup guide
Queue mode, workers, backups, and the security defaults you should never skip.
Complete n8n Guide: Everything You Need to Build Powerful Automations
The definitive n8n guide — nodes, credentials, triggers, and production-grade patterns.