The Webhook node: receiving events and answering like an API
The Webhook node opens an HTTP endpoint inside n8n. When an external system calls that URL the workflow runs, and the request's body, headers and query parameters arrive as data.
There are two main uses:
- Receiving events — a system with no dedicated trigger node notifies you (a payment provider, a CRM, your own product)
- Using n8n as an API — a request arrives, the workflow processes it and returns a response
The Webhook node supports the standard HTTP methods: GET, POST, PUT, PATCH, DELETE and HEAD.
| Parameter | What it does | Practical note |
|---|---|---|
| Test URL / Production URL | Two separate addresses: one while building, one after publishing | The test URL only responds while "Listen for test event" is armed |
| HTTP Method | Which method it accepts | Check what the sender actually sends — a mismatch produces a 404 |
| Path | The last part of the URL; randomly generated by default | Route parameters in the form `/:variable` are supported |
| Authentication | Basic auth, header auth, JWT auth or none | A webhook exposed on the open internet must require authentication |
| Respond | Immediately / when the last node finishes / via the Respond to Webhook node / streaming | Choose "immediately" for long processing so the caller does not time out |
| Response Code | The HTTP status code returned | Accepted but not yet processed → `202` |
The most common mistake is handing the test URL to an external system. The test URL only listens while you have pressed "Listen for test event" on the canvas — a published workflow does not serve it. In production you always hand over the Production URL, and the workflow must be published.
The Respond choice is an architectural decision. Most calling systems wait only a few seconds for a webhook response and resend the request if it is slow. When the processing is long (an AI call, several APIs, a file upload):
- Choose Respond: Immediately — n8n returns
200/202straight away - Let the processing continue behind it
- Report the result through a separate channel (a callback, a message, a database)
Otherwise the caller times out and resends the same event several times — and you end up with duplicated data.
📚 Sources and documentation
- Webhook nodeofficialdocs.n8n.io
The official list of every parameter, authentication method and response option.
- Webhook workflow developmentofficialdocs.n8n.io
The steps for moving from the test URL to the production URL.
- Respond to Webhook nodeofficialdocs.n8n.io