# Idempotency

> Part of the AI Garage Jargons glossary: https://aigarage.in/jargons (all terms: https://aigarage.in/jargons.md)

**Category:** Beginner
**Tags:** automation, api, webhooks, reliability

The property that repeating the same operation has the same intended effect as doing it once, preventing retries from creating duplicate side effects.

**In plain terms:** The same form submission can arrive more than once, but your system still creates only one record.

**Use cases:**
- Processing retried webhooks
- Safely repeating API requests
- Preventing duplicate records in automated workflows

**Why it matters:** Reliable automations retry work when networks or downstream services fail. Idempotency lets those retries recover without duplicating records or repeating the intended action.

**AI Garage example:** In an AI Garage-style Tally to n8n to Supabase workflow, the Tally submission ID can act as the idempotency key. A unique database constraint and upsert turn repeated webhook deliveries into one stored submission.

**Mental model:** Idempotency gives an operation a durable identity. When the same operation arrives again, the system recognizes that identity and returns or preserves the first intended result instead of repeating the side effect.

**Builder scenario: Deduplicate a retried form submission**

- **Context:** A form tool sends each submission to a workflow that saves it in a database. The form tool retries the delivery when the workflow does not confirm in time.
- **Failure:** If every delivery adds a new row, one submission can create duplicate lead or booking records when the delivery is retried.
- **Intervention:** Pass the form tool's submission ID through the workflow and store it in a column that must be unique. Save with that ID so the first delivery creates the row and later deliveries update the same record.
- **Outcome:** Repeated deliveries of the same submission resolve to one database row, while a genuinely new submission still creates a new row.

**Common misconceptions:**
- **Claim:** Idempotency means an operation runs only once.
  **Correction:** The operation may be attempted several times. Idempotency means those attempts have the same intended effect as one attempt.

**Visual model (comparison):** Retries are safe when every delivery carries the same durable identity and the database enforces it.

**Visual description:** Without idempotency, three deliveries of submission sub_4f21 create three database rows. With idempotency, the same deliveries resolve to one row through a unique operation key.

**Related concepts:** [API](https://aigarage.in/jargons/api)

**Video explainer:** [Idempotency: one submission, one result](https://nqqbubjesbyuwrdhqxnk.supabase.co/storage/v1/object/public/aigarage-public-media/jargons/idempotency/v4/idempotency.mp4) (50 seconds)

See how a retried form submission can create duplicate database rows, and how a stable submission ID plus a one-row-per-ID rule keeps one intended result.

**Published:** 2026-10-12T16:18:47+05:30
**Captions:** [English](https://aigarage.in/jargons/idempotency/captions.vtt)
**Narration:** generated

**Transcript:** One person submits a form. Three records appear.

The form tool sends the submission to a workflow, but the workflow is slow to confirm.

So the form tool tries again, and again.

The same submission now arrives three times.

If the workflow adds a new row each time, one person becomes three records.

Idempotency fixes this by giving every submission a stable identity, like a submission ID.

The workflow saves with that ID, and a database rule allows only one row per ID.

The first delivery creates the row.

The retries find the same ID and update the existing row.

Retries still happen. Idempotency makes them harmless.

Many attempts, same effect as one.

**Last researched:** 2026-10-09

**Sources:**
- [RFC 9110 - HTTP Semantics: Idempotent Methods](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.2)
- [Tally - Webhooks](https://tally.so/help/webhooks)
- [Supabase - JavaScript: Upsert](https://supabase.com/docs/reference/javascript/upsert)

**URL:** https://aigarage.in/jargons/idempotency
