LeadRails
Docs navigation

n8n Webhook

Send leads into your self-hosted or cloud n8n workflows via a Webhook trigger node. The Webhook URL is your authentication.

What this is

n8n is a low-code workflow automation platform. LeadRails posts each lead event as JSON to an n8n Webhook trigger node, which then routes the data through whatever workflow you've built (Google Sheets, HubSpot, custom scripts, etc.). Self-host or use n8n.cloud — either works.

Where to find your webhook URL

On n8n.cloud (managed)

  1. Sign in to your n8n cloud workspace.
  2. Create a new workflow (or open an existing one).
  3. Add a "Webhook" trigger node as the workflow's first step.
  4. Click the Webhook node — "Production URL" is what you want (NOT the Test URL — that only fires once).
  5. Copy the URL — looks like https://<your-workspace>.app.n8n.cloud/webhook/<workflow-uuid>.

On self-hosted n8n

  1. Open your n8n instance (e.g. https://n8n.yourcompany.com).
  2. Create a workflow and add a Webhook trigger node.
  3. The Production URL is on your domain: https://n8n.yourcompany.com/webhook/<workflow-uuid>.
  4. Make sure your n8n is publicly reachable (LeadRails posts from intake.leadrails.dev outbound).

Don't use the Test URL

The Webhook node shows BOTH a Test URL and a Production URL. The Test URL only fires once after you click "Listen for test event" in n8n. Use the Production URL for LeadRails so events flow continuously.

Set up your destination in LeadRails

  1. Sign in → Destinations → New.
  2. Adapter type: n8n Webhook.
  3. Webhook URL: paste the Production URL from n8n.
  4. Click Create.

Activate the n8n workflow

By default, n8n workflows are inactive. They won't process Production URL hits until you flip the toggle in the top-right of the n8n editor.

If LeadRails is firing successfully but nothing happens in n8n: check the workflow is active.

Test connection

The destination's "Test connection" check sends a GET to your Webhook URL — never a POST — so it confirms the wiring without firing your workflow or creating a real execution. It reports:

  • Reachable and registered → the workflow is wired up correctly.
  • "Workflow exists but is not active" → n8n returned its characteristic "webhook not registered" response. Activate the workflow (see below).
  • Unreachable or an unsafe_url → see Common issues.

A passing connection test confirms the URL is live, not that a POST will succeed downstream — some n8n webhook nodes only accept POST, so a live check that a workflow node processes the body still needs a real test event (below).

Verify it works end to end

  1. Sources → your source → Settings → ensure a route exists to your n8n destination.
  2. Click "Send test event".
  3. n8n's workflow should fire — check the workflow's "Executions" tab for the inbound event.

Request shape

  • POST with application/json body.
  • Default (no per-route mapping): the raw lead event is forwarded verbatim — the same JSON your source sent, e.g. { schema_version, event_type, source: {...}, lead: {...}, submitted_at }. This preserves every field your source included so your n8n nodes have the full payload to work with.
  • Customize with per-route mapping if you want a specific shape for your n8n nodes downstream.
  • Every request carries an X-Idempotency-Key header derived from the delivery job id. n8n does not deduplicate on it automatically, but a workflow branch can read it to filter replays.

Common issues

"Webhook not registered"
The n8n workflow is inactive. Activate it.
404
Wrong URL — you're using the Test URL or the workflow was deleted. Use the Production URL.
No execution shows in n8n but LeadRails says 2xx
Workflow received the event but the execution failed downstream. Check n8n's Execution log.
unsafe_url
Your self-hosted n8n resolved to a private IP. Expose it via Cloudflare Tunnel or another public-routable path.

Where your data goes

Once an event leaves LeadRails for n8n, it's in your n8n environment. If you're on n8n.cloud, n8n hosts the data; on self-hosted, you do.

n8n doesn't sign requests outbound to LeadRails — there's no automatic ack flow. We rely on HTTP 2xx for delivery confirmation.

← All destination guides