Sparround

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.

ParameterWhat it doesPractical note
Test URL / Production URLTwo separate addresses: one while building, one after publishingThe test URL only responds while "Listen for test event" is armed
HTTP MethodWhich method it acceptsCheck what the sender actually sends — a mismatch produces a 404
PathThe last part of the URL; randomly generated by defaultRoute parameters in the form `/:variable` are supported
AuthenticationBasic auth, header auth, JWT auth or noneA webhook exposed on the open internet must require authentication
RespondImmediately / when the last node finishes / via the Respond to Webhook node / streamingChoose "immediately" for long processing so the caller does not time out
Response CodeThe HTTP status code returnedAccepted 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/202 straight 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