Tutorials7 min read

n8n Webhook Tutorial — Trigger Automations from Any App or Form

S

SNBD Host Team

July 13, 2026

Most automation triggers are either scheduled (run at a set time) or poll-based (check for changes every few minutes). Webhooks are different: they fire instantly the moment something happens, because the source app pushes data to your n8n URL rather than n8n having to go and check.

If you want automations that respond in real-time — a customer submits a form, a payment is received, a new message arrives — webhooks are how you do it. This tutorial explains exactly how webhooks work in n8n and walks through five practical examples.

What Is a Webhook?

A webhook is simply an HTTP POST request that one application sends to another when something happens. Think of it as an automatic notification system built on top of standard web requests.

When you create a Webhook node in n8n, n8n gives you a URL that looks like:

https://your-n8n.snbdhost.com/webhook/abc123xyz

You copy this URL and paste it into the source app (your website, your payment gateway, your form builder) as the "webhook URL" or "callback URL". From that point on, whenever the triggering event happens in that app, it sends the event data to your n8n URL, and your workflow runs immediately.

Creating a Webhook Node in n8n

In any new n8n workflow, start by adding a Webhook node. You'll see options for:

  • HTTP Method: Usually POST for webhooks (some services send GET for verification)
  • Path: The random ID part of the URL — you can change this to something readable, but keep it non-guessable for security
  • Response Mode: "Last Node" (respond with the final node's output), "When Last Node Finishes", or "Immediately" (acknowledge immediately and process in background). For most webhooks, "Immediately" is best practice — it prevents timeout errors if your workflow takes more than a few seconds.
  • Response Code: 200 for success. Some services require specific codes.

Click "Listen for Test Event" to activate the webhook temporarily for testing. Send a test request to the URL and n8n will capture it so you can see the data structure and build the rest of your workflow around it.

Example 1: Contact Form → CRM + Email

Your website has a contact form. Currently, submissions go to your email and someone manually adds them to a spreadsheet or CRM. With an n8n webhook, submissions trigger an immediate automation.

HTML form action URL: Set your form's action attribute to your n8n webhook URL. For most form builders (Elementor, WPForms, Contact Form 7), there's a "webhook" or "custom action" setting where you paste the URL.

Data received: n8n gets a POST request with form fields as the body. Extract them in a Set node:

  • {{ $json.body.name }}
  • {{ $json.body.email }}
  • {{ $json.body.message }}
  • {{ $json.body.phone }}

Workflow actions:

  1. Add to Google Sheet: Name, Email, Phone, Message, Date
  2. Send Telegram notification to sales team
  3. Send automated reply email to the customer: "We received your message and will reply within 2 hours."
  4. If phone number is present and starts with "+88" → send WhatsApp greeting

Example 2: WooCommerce Order Webhook

WooCommerce has built-in webhook support. Go to WooCommerce > Settings > Advanced > Webhooks > Add Webhook. Set:

  • Topic: Order Created
  • Delivery URL: Your n8n webhook URL
  • Secret: A random string (n8n will use this to verify the signature)

Now every new WooCommerce order instantly triggers your n8n workflow. The payload includes the full order object: customer details, line items, totals, shipping address, payment method.

Use this to trigger your order processing flow, send WhatsApp confirmations, update inventory, notify your fulfillment team — all within seconds of the order being placed.

Example 3: Stripe/Payment Gateway Webhook

If you're accepting card payments through Stripe or another gateway, webhooks are how you reliably know a payment succeeded. Never rely on the user being redirected back to a success page — connections drop, users close tabs. The webhook fires from the payment processor's server directly to yours, regardless of what the customer's browser does.

In Stripe's dashboard, go to Developers > Webhooks > Add Endpoint. Paste your n8n URL and select the events you want: payment_intent.succeeded, payment_intent.payment_failed.

In your n8n workflow, after the webhook trigger, verify the Stripe signature (the Webhook node has a "Header Auth" option — use the Stripe webhook signing secret here, or add a Code node to verify the stripe-signature header manually). Then extract the payment amount, customer email, and metadata from the payload to trigger your fulfillment workflow.

Example 4: GitHub → Deployment Notification

For developers or agencies using GitHub: when a pull request is merged to main, trigger an n8n workflow that:

  1. Sends a Telegram/Slack message: "New deployment triggered for [repo] by [author]"
  2. Calls your server's deployment script via SSH
  3. Waits for the deployment to complete (using a Wait node + polling)
  4. Runs a smoke test via HTTP Request to your site's health endpoint
  5. Reports success or failure to Telegram

In GitHub, go to your repo > Settings > Webhooks > Add Webhook. Paste your n8n URL and select "Pull requests" and "Push" events.

Example 5: Typeform/Google Form → Lead Processing

Typeform has native webhook support (under Connect > Webhooks). Google Forms doesn't, but you can use Google Apps Script to push submissions to an n8n webhook — or just watch the connected Google Sheet with n8n's Sheet trigger.

For Typeform: paste your n8n webhook URL. When someone submits the form, n8n instantly receives all responses. Build a lead scoring workflow:

  1. Score the lead based on answers (budget size, timeline, company size)
  2. If score > 70 → hot lead: immediately notify sales team via phone call trigger or urgent Telegram message
  3. If score 40-70 → warm lead: add to email nurture sequence, notify sales team via regular Telegram
  4. If score < 40 → add to newsletter list only

Handling Webhook Failures

Webhooks can fail if your n8n instance is down when a source app sends a notification. Most webhook providers will retry failed deliveries — typically 3-5 times over several hours. But you can't rely on this for critical flows.

Best practices:

  • Set your webhook response mode to "Immediately" so n8n acknowledges receipt before processing. This prevents the source app from timing out and retrying just because your workflow took 10 seconds.
  • Keep your n8n instance running reliably. On SNBD HOST's n8n hosting, the instance is monitored and restarted automatically if it goes down.
  • For critical webhooks (payment processors, order systems), set up a "dead letter" flow: if the main processing fails, log the raw webhook data to a fallback Google Sheet so you can manually process it later.

Testing Webhooks Without a Source App

During development, you need to send test data to your webhook without waiting for real events. Two tools:

  • n8n's built-in test mode: Click "Listen for Test Event" on the Webhook node, then manually send a POST request using a tool like Postman or curl.
  • curl from terminal: curl -X POST https://your-n8n-url/webhook/test -H "Content-Type: application/json" -d '{"name":"Test User","email":"test@example.com"}'

n8n will capture this test request and show you the data structure, which you can then reference when building the rest of your workflow.

Your Webhook Checklist

  • Webhook URL copied correctly (no trailing spaces)
  • Response mode set to "Immediately" for long-running workflows
  • Signature verification enabled for services that support it
  • Error handling configured (fallback workflow or logging)
  • Webhook path is non-guessable (not /webhook/orders)
  • Workflow activated (test mode webhooks don't work in production)

Webhooks are the foundation of real-time automation. Once you understand how they work, you'll find connection points everywhere — in your website, your payment tools, your shipping partners. Every one of those is a potential trigger for an n8n workflow.

To get started with webhook-based automations, you need a publicly accessible n8n instance. SNBD HOST's n8n hosting provides a pre-configured instance with a public HTTPS URL, so your webhooks work from day one. Plans start from ৳499/month.

n8nwebhookstutorialautomationapibangladesh
S

Written by

SNBD Host Team

The SNBD Host team shares hosting guides, automation tips, and business growth strategies for Bangladeshi entrepreneurs.

Share Article