workflows.fit
Back to n8n workflows
n8n templateFreeBy Nesho Neshev

Prevent duplicate webhook executions with AARI idempotency gate

Who this template is for This template is for anyone running n8n workflows that receive webhooks and perform side effects such as payments, emails, database inserts, or API calls. Webhook providers commonly use at-lea...

DevelopmentCore NodesSticky NoteWebhookHttp RequestIf
Loading interactive preview...

Template notes

Who this template is for

This template is for anyone running n8n workflows that receive webhooks and perform side effects such as payments, emails, database inserts, or API calls.

Webhook providers commonly use at-least-once delivery. If a webhook request times out or fails, the provider retries the same event. From n8n’s perspective this appears as a new trigger, which can cause the workflow to execute twice.

How it works

This workflow adds an idempotency check before any side effect runs.

When the first event arrives, the workflow records its idempotency key and proceeds normally. If the same event arrives again within 24 hours, the gate returns a BLOCK decision and the workflow stops before any side effects execute.

The webhook responds immediately with a 200 OK response., so providers do not retry due to workflow execution time. The idempotency gate then decides whether the workflow should proceed or stop.

This prevents duplicate executions such as: