The n8n workflow ran twice, and no one noticed.

An n8n workflow runs twice: duplicate charges and duplicate leads. Why this happens and how idempotency keys prevent it.

  • The reason: a duplicate looks like a success
  • Why a silent error costs more than an obvious one
  • Where the second run comes from
  • How engineering addresses this

The reason: a duplicate looks like a success

  1. The n8n forum analyzed one of the most unpleasant classes of automation errors: a workflow runs twice and performs the same side effect both times.

  2. The customer receives two welcome emails, the account is charged twice, and the lead enters the CRM three times.

  3. The main point of the analysis: without idempotency, automation outcomes depend on luck, and you discover a duplicate only after the execution logs have been deleted.

  4. Initial analysis: Your n8n workflow runs twice and nobody notices: idempotency patterns that fix it, n8n community.

Why a silent error costs more than an obvious one

  1. A failed workflow is immediately visible: a red status, an alert, and an investigation. A duplicate looks like a success.

  2. Both runs finished successfully, and the “requests processed” metric increased.

  3. The analysis author notes that the problem is discovered weeks later through a customer complaint or an accounting discrepancy. By then, the execution history is gone, so there is no way to determine which run was unnecessary.

  4. For a business owner, it means money and reputation.

  5. A duplicate charge turns into a refund, apologies, and an investigation with the payment provider.

  6. A triplicate lead in the CRM disrupts the funnel: managers waste time on duplicates, while the conversion report shows incorrect figures.

Where the second run comes from

  1. There are three sources, all standard ones. Retry On Fail.

  2. The node calls an external API, receives a timeout, and retries the request.

  3. A timeout only means that no response arrived; the request itself may already have been completed on the recipient's side.

  4. The retry sends it again. Webhook redelivery.

  5. Payment and e-commerce providers, including Stripe, redeliver an event if they do not receive a fast 2xx response.

  6. While the workflow processes the event, the provider has time to send it a second time. Manual restart.

  7. The operator sees an error in the middle of the chain and starts everything from the beginning.

  8. Steps that have already completed run again. The common root of all three is delivery guaranteed at least once.

  9. The developer must build the exactly-once guarantee on their side.

How engineering addresses this

Reliable patterns come down to one idea: every operation has a stable key, and before triggering a side effect, the workflow checks whether that key has already been processed. - An event key. Take the identifier from

Source

  1. for example, the provider's event ID, or build it from business fields: order number plus action type.

  2. The execution time is not suitable as a key; every retry has its own. - Processed-key store.

  3. A database table with a unique index on the key.

  4. Inserting a new key succeeds; inserting an existing one fails, and the workflow ends without taking action.

  5. Checking whether a record exists and inserting it as a separate step leaves a race window, so a unique index is more reliable. - Idempotent operations instead of inserts. Upsert by external ID in the CRM instead of create: a repeated call brings the record to the same state. - An idempotency key in the API call.

  6. If the external service accepts this header, pass it along, and a retry will return the result of the first call. - A quick webhook response.

  7. Accept the event, put it in the queue, and respond with 200.

  8. The heavy processing runs after the response, so the provider has no reason to redeliver the event.

  9. None of this looks impressive, so demonstrations do not show it.

Map out your integration landscape

What releases and related discussions show

  1. In n8n releases 2.42.6 and 2.43.3, the platform began blocking the creation and updating of workflows with deprecated nodes.

  2. The n8n developers addressed one class of silent problems at the platform level.

  3. The platform will not prevent reruns for you: this part must be designed by whoever builds the process. In a related thread about an MCP endpoint with verified business facts, a participant describes another form of silent error: checking data freshness before loading it into RAG.

  4. He also notes the limitation: an acceptable observation age does not prove that the fact is still true, and a recently collected page may already be incorrect.

  5. The conclusion is the same: the boundaries of automation guarantees must be documented in advance.

Speed of use and speed of demonstration

  1. The forum is full of posts like “I build AI automations and save time.”

  2. : n8n, agents, RAG, email response generator, lead enrichment.

  3. This stack can be assembled in an evening, and the first run looks convincing, meaning the time to the first result is short.

  4. The time to a result you can trust with money is determined by other questions: what happens on the hundredth duplicate, during a provider timeout on Friday evening, or after a manual restart. In KT.Team integration projects—whether connecting 1C to an online storefront, exchanging data with a PIM such as Pimcore or Akeneo, or using Apache Kafka queues—idempotency is built into the exchange contract before the first line of code.

  5. For Kafka events, it is the message key and a table of processed offsets.

  6. For AI agents in n8n, it is a task key that makes a repeated run return the previous result.

  7. The business sees a simple outcome: the email was sent once, and the invoice was issued once.

  8. It relies on substantial engineering work that remains invisible as long as it is done well.

Verdict

Automation that sometimes does everything twice is worse than manual work: a person makes visible mistakes, while a duplicate workflow run passes green. Before scaling AI agents and workflows, test the process with an external side effect by running it twice with the same input. If the result doubles, you have a risk that has not yet surfaced.

Source

  1. Initial analysis: “Your n8n workflow runs twice and nobody notices: idempotency patterns that fix it”

  2. , n8n community, https://community.n8n.io/t/your-n8n-workflow-runs-twice-and-nobody-notices-idempotency-patterns-that-fix-it/320198.

  3. Platform changes: n8n releases 2.42.6 and 2.43.3 on GitHub (n8n-io/n8n).

  4. Forum materials license: n8n community terms.

  5. The conclusions and examples concerning Kafka and integrations belong to the KT.Team editorial team.

Discuss the article: The n8n workflow ran twice, and nobody…

Enter your email or phone number so we can get back to you.

Send via: