Skip to product information

Replay-Safe Webhook Dedupe in n8n: First Event Only

Replay-Safe Webhook Dedupe in n8n: First Event Only

 (200+Reviews)
Regular price £26.99
Regular price £26.99 Sale price
SAVE Sold out
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Replay-Safe Webhook Dedupe in n8n: First Event Only

Replay-Safe Webhook Dedupe in n8n: First Event Only

Regular price £26.99
Regular price £26.99 Sale price
SAVE Sold out

Replay-safe event ingestion for n8n webhooks—accept only the first delivery

This n8n automation workflow receives HTTP POST events, validates their event envelope, and deduplicates them using a source:event_id key so replayed or duplicated deliveries are safely rejected while the first one is accepted.

What this workflow does

  • Receives POST webhooks at an n8n webhook endpoint using the “Receive Event” trigger.
  • Validates the JSON body: it checks required fields such as event_id (or eventId) and source (or origin), then normalizes them.
  • Builds a deduplication key in the format source:event_id.
  • Handles invalid requests safely: if validation fails, it returns HTTP 422 with an invalid_event_envelope error payload.
  • Deduplicates using n8n history: it checks whether the dedupe key has been seen in prior executions.
  • Accepts only the first event: for first-seen keys, it returns HTTP 202 confirming acceptance and includes event_id, source, and dedupe_key.

Use cases

  • SaaS operators ingesting third-party webhook events that may be retried or replayed during network issues.
  • Automation engineers building reliable webhook consumers where idempotency is required.
  • Event-driven systems that need predictable behavior across retries within a replay window.

Technical details

  • Nodes/logic: webhook, if, code, remove duplicates, respond to webhook, plus a sticky note for guidance.
  • Dedupe method: relies on n8n’s built-in deduplication history (configured size is currently 10,000 keys).
  • Setup: copy the webhook URL from the “Receive Event” trigger, ensure stable event_id/eventId and source/origin, and adjust endpoint path/method/response codes if needed.
View full details