Delivery and quality

Idempotency

Idempotency is the property of an operation that produces the same result whether it runs once or several times, so a retried or duplicated request does not create a second invoice, email or record.

In real systems the same request often arrives twice. A webhook is redelivered because the first response was slow, a user double-clicks a button, a scheduled job is rerun after a crash. Idempotency means designing each step so that repeating it is harmless. It is an unglamorous engineering term, but the absence of it is what produces duplicate charges, double emails to customers and inflated reports, which is why buyers of automation work should know the word.

How it works

The usual technique is to give each piece of work a unique identifier and check it before acting. A payment request carries an idempotency key; if the payment service has already seen that key, it returns the original result instead of charging again. A sync job that creates contacts in a CRM looks up the contact by email first and updates it rather than creating a duplicate. A webhook handler records the event ID of everything it has processed and ignores repeats.

Some operations are idempotent by nature. Setting a field to a value is safe to repeat; adding to a running total is not. Good builders prefer the first kind where they can, so "set the order status to shipped" rather than "move the order to the next status".

An example: an automation sends a welcome email when a new customer signs up. The sign-up webhook is delivered twice. Without idempotency, the customer gets two emails and two CRM records. With it, the second delivery is recognised by its event ID and skipped.

What it means for cost

Idempotency adds a modest amount of design and testing time, usually a lookup table or a key on each request. It is far cheaper to build in from the start than to retrofit after duplicate data has spread across several systems and needs cleaning. It is also what makes error handling safe, since retries are only harmless when repeated steps do no damage.

Ask a builder what happens if a webhook arrives twice, if a run is restarted halfway through, or if a user submits the same form twice. A clear answer about keys, lookups or deduplication is a good sign.

Common questions

Is idempotency the same as exactly-once delivery?

Not quite. Most messaging systems guarantee that a message arrives at least once, which allows duplicates. Idempotent processing turns at-least-once delivery into an exactly-once effect, because handling a repeat has no further consequence.

Do no-code automation tools handle idempotency?

Partly. Some triggers deduplicate items they have already seen, but actions that create records usually do not check for duplicates on their own. In n8n, Zapier or Make, a builder normally adds a "find or create" step or a lookup to make the flow safe to rerun.

Related terms

Pricing a build that involves Idempotency? Send the brief and get a fixed price set next to the market range.Get a quote