A workflow times out after sending an email. The provider may have accepted it. n8n marks the request failed and exposes a retry option. Click once, and the customer may get two copies.
That is the part retry tutorials often skip: a retry can recover a broken execution, but it cannot undo a side effect that happened before the connection failed. The safe design is to retry cheap, repeatable work; make writes idempotent; and treat error handling as notification, not magic recovery.

Which n8n steps are safe to retry
Think about what the outside service might have done before n8n received its response. A model call that produces a draft is usually safe to repeat, though it may cost more and return different text. A read request is usually safe too. A 429 or brief 5xx on either is a reasonable case for node-level Retry On Fail.
n8n's documented limits matter: Retry On Fail allows at most 5 tries and a wait of up to 5,000 milliseconds. The HTTP Request node does not automatically follow the API's Retry-After header. If the provider asks you to wait longer, use batching or a Loop Over Items and Wait pattern instead of hammering the endpoint every five seconds.
A message send, payment, ticket creation, or CRM insert is different. The server can finish the action and lose the response on the way back. From the workflow's perspective that looks like failure, even when the customer already has the email or the invoice already exists. Blindly retrying a write turns a network timeout into a duplicate-action bug.
There's a second trap in n8n's execution retry. The official docs say a retry resumes from saved execution state, so completed earlier nodes keep their results. But the failed node gets its saved input again and processes every item, including items it handled before it failed. If a node sent messages for items 1 through 8, then failed on item 9, retrying that node can send 1 through 8 again. A failed Execute Sub-workflow node reruns the whole sub-workflow.
So classify each node by consequence, not by whether it is an HTTP request. GET is often safe, POST often is not, but the API contract decides. A POST that creates an object may support idempotency keys. A read can still be costly or rate-limited. Check the destination's behavior before enabling automatic retries.
How to make writes idempotent
An idempotency key tells the receiving service that two requests represent one intended action. For Stripe API v1, send the same key when retrying the same operation. Stripe saves the first result once endpoint execution begins and returns that result for repeated requests with that key. The key is not a forever guarantee: Stripe may prune it after at least 24 hours, so a delayed replay after that window can create a new request.
For an n8n workflow, build the key from a stable business event, not $execution.id. A retry is a new execution, so that identifier changes. Use an order ID plus the action name, or an inbound event ID plus recipient. Keep the same key for every attempt at that one action. Never put an email address or other personal data in the key.
If the destination has no idempotency feature, use a stable unique business key in your own data store. Before creating a record, look it up by that key; prefer an upsert or insert-with-unique-constraint over a blind append. The lookup alone has a race condition when two executions run together, so the database uniqueness rule should be the final guard. For an email provider that offers neither deduplication nor a queryable message identifier, accept that a timeout can leave the result ambiguous. Log it for review rather than automatically sending again.
Separate generation from delivery. Let the model draft and validate the payload first. Put the irreversible send in a small, explicit final step with a stable event key and a recorded status such as pending, sent, or unknown. If the call times out, check the provider or your ledger before deciding whether another send is safe. Do not let an agent improvise its own retry policy around side effects.
Use the error workflow as an alarm
Set up a separate workflow whose first node is Error Trigger, then choose it in the main workflow's Settings. n8n sends it details about an automatic failure, including the failing workflow and error. Use it to record context and notify a human. It does not itself make the failed action safe to repeat.
One easy testing mistake: n8n says Error Trigger does not run when you execute a workflow manually. Test the handler with an automatic execution in a safe environment, or deliberately send a test failure through a production-like trigger. Also decide what happens to expected partial failures. If a node uses Continue and the run ends successfully, the failure workflow will not fire. Route that node's error output to an explicit log or alert instead.
A useful default is simple. Retry a bounded model or read call on transient errors. Use batching and waits for rate limits that outlast the retry window. For writes, reuse a destination-supported idempotency key or enforce uniqueness in a database. Send the exhausted or ambiguous case to an error workflow, and let a person decide when the system cannot know whether the action happened.
This guide is about execution safety, not permission design. Before an agent reaches a write-capable tool at all, gate its risky tool calls before the write. Approval controls prevent unauthorized actions; idempotency prevents authorized actions from happening twice. You need both when the consequences matter.
Sources
- n8n retrying failed executions: saved-state behavior, repeated items, and upsert guidance
- n8n rate-limit handling: retry caps,
Retry-Afterlimitation, and batching options - n8n Error Trigger: setup and execution data available to failure handlers
- Stripe idempotent requests: key behavior, retention, and safe request retries