/n8n-tutorials

How to create a webhook in n8n?

Learn how to create a webhook in n8n with a simple step-by-step guide that helps you automate workflows and connect apps effortlessly.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free consultation

How to create a webhook in n8n?

To create a webhook in n8n, you drag a Webhook node into a workflow, set its HTTP method (GET, POST, etc.), set the path (like /new-lead), save the workflow, and then copy the generated URL that n8n gives you. When that URL receives an HTTP request, n8n will start the workflow and pass the incoming data into the next nodes. That is the entire core idea: the Webhook node listens, the rest of the workflow reacts.

 

What a Webhook Is (in n8n terms)

 

A webhook is simply a public URL that n8n exposes so an external service can send data into a workflow. When the URL receives a request, it triggers the workflow instantly. In n8n, this is done using the Webhook node, which is a special “trigger” node — meaning it starts the workflow, not just processes data inside it.

  • Trigger node = starts the workflow
  • JSON input = the request body, query params, and headers arrive as JSON into the next node
  • Method = HTTP method (most commonly POST)
  • Path = the part after /webhook/ or /webhook-test/ in the URL

 

Step-by-step: Creating a webhook in n8n

 

This is the real, production-valid way to do it.

  • Add a Webhook node as the first node. Webhooks must be the first node unless you explicitly allow “did not start workflow” mode.
  • Set the HTTP Method to what your external service expects. Most external services send POST.
  • Set the Path to something clean and predictable, like new-lead or github-push. No slashes. n8n will add them.
  • Decide how you want to return a response:
    • Respond immediately: external system gets the confirmation instantly.
    • Respond with data returned from the last node: workflow fully runs before replying.
  • Save the workflow. Until you save, the webhook URL is not active.
  • Copy the webhook URL. n8n generates something like:
    • https://your-n8n-domain/webhook/new-lead (Production)
    • https://your-n8n-domain/webhook-test/new-lead (Test mode)
  • Use a tool like curl, Postman, or an external service to send a test request to the URL.

 

Example: Testing a webhook with curl

 

curl -X POST https://your-n8n-domain/webhook/new-lead \
  -H "Content-Type: application/json" \
  -d '{"name": "John Doe", "email": "[email protected]"}'

 

What happens inside n8n when the webhook fires

 

When the request hits the URL, n8n does something very predictable:

  • The Webhook node receives request data (body, headers, query params).
  • It outputs a JSON item that the next node can use via expressions like {{$json.name}}.
  • The next nodes run in order until the workflow ends.

The Webhook node output structure is extremely stable and looks like this:

{
  "body": {
    "name": "John Doe",
    "email": "[email protected]"
  },
  "headers": {
    "content-type": "application/json"
  },
  "query": {}
}

 

Important production tips

 

  • Do not build long-running logic inside the webhook response path. If your workflow takes longer than your external service’s timeout (often 5–10 sec), switch the Webhook node to “Respond Immediately”.
  • If you use n8n cloud or any load-balanced setup: always test with the /webhook URL (not /webhook-test) before committing the workflow to production.
  • If the webhook must be secret, add a header check in the next node or use n8n’s built‑in authentication fields in the Webhook node.
  • Always save the workflow after editing the Webhook node. n8n only activates the webhook when the workflow is saved and active.

 

Quick mental model to keep

 

A webhook in n8n is simply: “n8n listens at URL → request comes in → n8n turns it into JSON → your workflow runs.” Once you understand that, most webhook-based integrations become simple wiring: you configure the Webhook node, and n8n handles the rest.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022