An n8n webhook gives you two URLs, and only one of them works after you close the editor. The test URL listens for 120 seconds. The production URL doesn't exist until you publish the workflow.
Mix them up and your form, payment app or script sends data to an address nobody is listening on.
Here's the catch most tutorials skip. After you publish, production runs the version you published, not the edits you made afterwards. You can fix a bug, test it, see it pass, and still ship the old behaviour.
This guide sets up the Webhook node step by step: test vs production URLs, authentication, and the right way to send a response back. Then the limits that cause timeouts. New to the idea itself? Start with how a webhook works under the hood.
Every setting below comes from n8n's official docs. Some links here are affiliate links. They don't change your price.

What does the n8n Webhook node do?
The Webhook node is a trigger. It gives your workflow a URL, and any app that sends an HTTP request to that URL starts a run with the request data. n8n's docs pitch it for services "that don't have a dedicated app trigger node".
It can also answer. The node can return data from the end of the workflow, so a workflow can behave like a small API endpoint. If the request and response idea is fuzzy, my explainer on what an API is and how it works covers it in plain English.
Five settings decide almost everything:
| Setting | What it controls | Options (per n8n docs) |
|---|---|---|
| Webhook URLs | Where callers send requests | Test URL and Production URL |
| HTTP Method | Which request type it accepts | DELETE, GET, HEAD, PATCH, POST, PUT |
| Path | The end of the URL | Random by default, or your own, with route parameters |
| Authentication | Who is allowed to call it | None, Basic auth, Header auth, JWT auth |
| Respond | What the caller gets back, and when | Immediately, When Last Node Finishes, Using Respond to Webhook node, Streaming |
My take: the URL and the Respond setting cause most of the trouble. Authentication is the one people skip, and it's the one that costs money later.
What's the difference between the test and production webhook URL?
The test URL is for building. The production URL is for real traffic. They are different addresses, they register at different moments, and they show their data in different places.
| Test URL | Production URL | |
|---|---|---|
| Default path segment (self-hosted) | /webhook-test/ | /webhook/ |
| How it starts listening | Click Listen for test event (or Execute workflow) | Publish the workflow |
| How long it listens | 120 seconds | Until you unpublish the workflow |
| Where you see the data | Live in the editor | In the workflow's Executions tab |
| Use it for | Building and debugging | Real callers |
The path segments come from n8n's endpoint settings, where the defaults are webhook for production and webhook-test for testing. Copy the URL from the node itself rather than typing it, because the toggle at the top of the node panel decides which one you're looking at.

Why does the production URL keep running old logic?
Because publishing locks a version. n8n's docs say it directly: "Production executions will use this published version, not your latest edits." Your edits auto-save, but they stay in draft until you publish again.
So the workflow can be published and still out of date. n8n's Publish button shows this state as "Published, has changes". If a fix works on the test URL but not in production, look at that button before you touch anything else.
How do you set up a webhook in n8n, step by step?
Here's the setup for a typical job: a website form or app posts JSON to n8n, and n8n replies with a small confirmation.
Step 1: Add the Webhook node and pick the method
Create a workflow and add the Webhook node as the trigger. Set HTTP Method to POST for anything that sends data, because the data travels in the request body.
Need one URL to accept both GET and POST? Open the node's Settings and turn on Allow Multiple HTTP Methods. The node then gets one output per method, so each method can take its own branch.
Step 2: Give it a readable path
By default the Path is a random string, which n8n uses "to avoid conflicts with other webhook nodes". Replace it with something you'll recognise in six months, like new-lead.
Paths can carry route parameters, such as /orders/:orderId. n8n allows only one webhook per path and method combination, so two workflows can't both listen on POST /new-lead. If n8n says the path is in use, change the path or unpublish the other workflow.
Step 3: Turn on authentication
Set Authentication to Header auth and create the credential with a header name and a long random value. The caller then sends that header with every request. Anything without it is rejected before your workflow runs.
Skip this step only for throwaway tests. A public URL with no auth will run your workflow for anyone who finds it, and every run counts against your plan.
Step 4: Choose how n8n responds
For this job, set Respond to Using 'Respond to Webhook' Node. That lets you choose the exact JSON and status code later in the flow. The next section explains when the other options are a better fit.
Step 5: Send a test request
Click Listen for test event, then send a request within 120 seconds. From a terminal:
The header name and value must match your Header auth credential. The request appears in the editor, and every later node can read it. Your data sits under body, so the email is available with this expression:
Headers, query strings and route parameters work the same way, under $json.headers, $json.query and $json.params.
Step 6: Publish and switch to the production URL
Add the rest of the workflow, end it with a Respond to Webhook node, and test again. Then click Publish, flip the node's URL toggle to Production URL, and paste that URL into the app that will call it.
Send one real request and open it in the Executions tab. Production data never shows up live in the editor, so that tab is where you confirm the run.
Which Respond option should you pick?
The Respond setting decides when the caller gets an answer and what's in it. Pick it based on who is calling and how long the workflow takes.
| Respond option | What the caller gets | Pick it when |
|---|---|---|
| Immediately | Your response code and the message "Workflow got started" | The sender only needs a quick acknowledgement, like most app event webhooks |
| When Last Node Finishes | Data from the last node that ran | A simple workflow should return its final result as-is |
| Using Respond to Webhook node | Exactly what that node sends, at the point it runs | You need custom JSON, a status code, headers or a redirect |
| Streaming response | Data streamed as the workflow runs | An AI Agent or another streaming node is answering a chat-style request |
My rule: app-to-app event webhooks get Immediately, and anything that needs an answer gets Respond to Webhook. When Last Node Finishes is fine for quick prototypes, but it couples your response to whichever node happens to run last.

How does the Respond to Webhook node work?
Add it after the nodes whose data you want to return. Respond With offers All Incoming Items, Binary File, First Incoming Item, JSON, JWT Token, No Data, Redirect and Text. Text sends HTML by default, with Content-Type text/html. Under Add Option you can set the Response Code and Response Headers.
A JSON response for the form example might look like this:
Four behaviours from n8n's docs are worth knowing before you go live:
| What happens | What the caller gets |
|---|---|
| The workflow finishes without reaching Respond to Webhook | A standard message with status 200 |
| The workflow errors before Respond to Webhook runs | An error message with status 500 |
| A second Respond to Webhook node runs | Nothing new. n8n ignores it |
| The node runs once with many items | Only the first item, unless you pick All Incoming Items |
The node runs once, using the first item. To return a list, choose All Incoming Items, or put an Aggregate node set to All Item Data (Into a Single List) in front of it.
One more trap. Since n8n 1.103.0, HTML responses are wrapped in a sandboxed iframe. Scripts can't reach the parent window or local storage, and relative links like a form posting to / stop working. Use absolute URLs.
How do you secure an n8n webhook?
Start with authentication on the node, then narrow who can call it. n8n gives you four layers, and they stack.
| Layer | What it checks | Good for |
|---|---|---|
| Header auth | A secret header name and value | Your own apps, scripts and websites' back ends |
| Basic auth | A username and password | Tools that only support basic auth |
| JWT auth | A signed JSON Web Token (Passphrase or PEM Key) | Callers that already issue JWTs |
| IP(s) Allowlist option | The caller's IP address. Others get a 403 | Senders that publish fixed IP ranges |
Behind a reverse proxy, the allowlist only sees the proxy's IP unless N8N_PROXY_HOPS is set to the number of proxies in front of n8n. n8n's common-issues page calls this out.

What about services that sign their webhooks?
Many senders don't send a header you choose. They sign each delivery instead. GitHub, for example, sends an X-Hub-Signature-256 header holding an HMAC hex digest of the payload, made with your shared secret and prefixed with sha256=.
The Webhook node's auth options don't include signature checks, but n8n's Crypto node has an Hmac action with SHA256 and HEX encoding. The pattern is: turn on the Webhook node's Raw Body option so you hash the exact bytes the sender signed, compute the HMAC with the Crypto node, then compare it with the header in an If node and stop the run on a mismatch.
Test that chain against a real delivery from the sender before you trust it. GitHub also recommends a constant-time comparison, which a plain If node equality check isn't. For most small workflows that trade-off is acceptable. For payment data, I'd put the check in your own code instead.
Can n8n ignore junk requests for free?
Yes. The Only Run If option, under Add Option, runs an expression against the incoming request. If it returns false, n8n answers with a 200 and doesn't create an execution. On n8n Cloud, where you pay per execution, that's the cheapest filter you have.
It runs after the IP allowlist and authentication checks. One caveat from the docs: if the expression fails to evaluate, n8n logs a warning and lets the request through. Keep the expression simple, and don't treat it as a security control.
Two smaller options round this out. Ignore Bots drops link previewers and crawlers, which matters when someone pastes your URL into a chat app. Allowed Origins (CORS) defaults to *, so set it to your own domain if a browser calls the webhook directly.
What limits should you know before going live?
These are the numbers that decide whether a webhook works under real traffic. All come from n8n's docs and pricing page, as of 25 October 2026.
| Limit | Value | What to do about it |
|---|---|---|
| Max payload | 16 MB | Self-hosted: raise N8N_PAYLOAD_SIZE_MAX (in MiB) and restart, at the cost of more memory and CPU |
| Files in form-data payloads | 200 MiB default | Self-hosted: N8N_FORMDATA_FILE_SIZE_MAX |
| n8n Cloud response timeout | 100 seconds, then a 524 error | Respond early, or split into a start webhook and a status webhook |
| Max execution duration | 5 min on Starter, 40 min on Pro | Respond early and keep runs short, or self-host |
| Test URL listening window | 120 seconds | Click Listen for test event again |
| Webhooks per path and method | One | Change the path or method, or unpublish the clash |
Senders have their own clocks too. GitHub expects a 2XX response within 10 seconds and treats anything slower as a failed delivery. That's why Immediately is the safe choice for event webhooks: acknowledge first, then do the slow work in the same run.
How much does a webhook cost on n8n Cloud?
Each request that starts a run is one execution, however many nodes the workflow has. n8n prices Cloud by executions: Starter is €20 a month billed annually for 2,500 executions, and Pro is €50 a month for 10,000.
So a form getting 100 submissions a day uses about 3,000 executions a month, which is already past Starter. Filter junk with Only Run If, and compare plans in my n8n Cloud vs self-hosted pricing breakdown before you wire up a busy sender.
Retries can double-count. Most senders resend when they don't get a 2XX in time, so the same event can arrive twice. n8n's Remove Duplicates node, set to Remove Items Processed in Previous Executions with Value Is New on the event ID, drops repeats before they create a second record.
What usually goes wrong with n8n webhooks?
Most failures fall into a handful of patterns. Here's the symptom, the usual cause and the fix.
| Symptom | Likely cause | Fix |
|---|---|---|
| Test request does nothing | The 120-second listener expired | Click Listen for test event, then send again |
| Production URL returns an error | The workflow isn't published | Publish it and check the button state |
| Fix works in test, not in production | Production runs the last published version | Publish again. Look for "Published, has changes" |
| No data visible after a real request | Production runs only show in Executions | Open the Executions tab |
| Caller gets a 524 on n8n Cloud | Response took over 100 seconds | Respond Immediately or use a Respond to Webhook node early |
| Caller gets a 500 | The workflow errored before Respond to Webhook ran | Fix the failing node and add an error workflow |
| Allowlisted IP gets a 403 | n8n sees the proxy's IP | Set N8N_PROXY_HOPS |
| URL shows localhost | Missing public base URL | Set N8N_WEBHOOK_URL |
For the 500 case, add an error workflow with the Error Trigger node, so a failed run sends you an alert instead of failing silently.
Building on your own laptop? n8n's docs offer a tunnel mode for local webhooks, and they're clear that it's for development only and "isn't safe to use it in production".
For real traffic, run n8n on Cloud or on a server. My walkthrough on how to self-host n8n on a VPS with Docker covers the domain, SSL and webhook URL settings. If you go that route, I recommend a Hostinger KVM VPS for self-hosting tools like n8n.
What can you build once the webhook works?
Almost every useful n8n workflow starts with a trigger, and a webhook is the most flexible one. Common jobs: form submissions into a CRM, payment events into a spreadsheet, a Slack slash command that returns data, or an AI agent behind your own chat box.
That last one combines everything above: Header auth, a Respond to Webhook node and a session ID. I walk through it in how to build an AI agent in n8n. For more ideas, my list of n8n workflow examples that actually ship has thirty.
Frequently asked questions
Start with Header auth and a Respond to Webhook node, even for a small workflow. Adding them later means changing every app that already calls the URL. If you don't want to run a server, n8n Cloud hosts the webhook URL for you, so there's no domain, SSL or proxy to manage.


