I Build Dollar logoI BUILD DOLLARAI · BUSINESS · TECHNOLOGY
AI Automation Tutorials

Prevent Duplicate Work in n8n: Request IDs and Idempotency

Use stable request IDs to make retries safer and repeated events easier to diagnose.

Published by I Build Dollar · 2026-10-13 · Practical guides and transparent planning examples

Get the AI Starter Kit — $19One-time USD purchase · Applicable tax shown at checkout · Downloadable guides, prompts and worksheets
On this page
  1. Understand why duplicates happen
  2. Choose a key and durable state
  3. Decide how repeated requests should respond
  4. Test repetition and partial failure
  5. Preserve the downstream reference

Understand why duplicates happen

Forms are submitted twice, networks time out, and event senders retry when they do not receive a response. A duplicate is not always a user mistake. The important question is whether repeating the request repeats the business action. Idempotency means a repeated operation with the same identity has the same intended effect rather than performing that effect again. A draft-only exercise has lower consequences than charging a customer or sending messages, but it is still worth learning the pattern. Start with a fictional event such as inquiry-004 and define which repeated requests count as the same event.

Choose a key and durable state

Prefer the event ID supplied by the source system when one exists and is trustworthy. If you create your own key, document which fields form it and what happens when two legitimate submissions share those values. Store the key in durable state with a status such as received, processing, completed, or failed. For a practice workflow, a data table can make the state visible. A plain in-memory variable is not a reliable production ledger. n8n publishes a reliable webhook example illustrating validation, state tracking, and bounded retries.

Start Your AI Business — $19One-time USD purchase · Applicable tax shown at checkout · Downloadable guides, prompts and worksheets

Decide how repeated requests should respond

A completed event can return its recorded result without repeating the action. A processing event may return an appropriate pending response. A failed event needs an explicit policy: automatic retry, manual review, or rejection. Do not simply skip every existing ID; doing so can silently abandon unfinished work. The difficult case is two simultaneous requests with the same ID. A separate lookup followed by a write can race. For important actions, use a storage or downstream API capability that supports the needed uniqueness or idempotency guarantees and test its behavior. This article presents a design checklist, not a guarantee supplied by a spreadsheet.

Test repetition and partial failure

Send the same fictional request twice in sequence, then submit it again after an intentional failure. Check the recorded states and number of mock actions. Next test simultaneous duplicates in a controlled environment. Confirm that an updated legitimate inquiry gets a new identity or follows an intentional version rule. Document how long keys are retained; deleting them can allow old events to run again. Add visible reporting for records stuck in processing. Pair this design with intake validation and error handling. A useful completion record includes the original request ID, final status, and downstream reference so a person can reconcile unexpected results.

Preserve the downstream reference

If the mocked action produces a reference such as draft-020, store it beside the original event ID. A later repeated request should retrieve that reference instead of creating draft-021. This gives you a concrete way to detect accidental repetition in tests. A count of execution runs alone cannot distinguish a safe replay from duplicate work.

Sources and further reading

Get Instant Access — $19One-time USD purchase · Applicable tax shown at checkout · Downloadable guides, prompts and worksheets

Created with AI assistance and checked for page structure, links and illustrative calculations. Vendor reviews are documentation-based; hands-on product tests are not claimed. Tutorials are learning guides, not deployed client systems. Examples are fictional unless explicitly identified otherwise. Report a correction through Contact.