Workflow Automation / Decision guide / Published v0.1

Retry-Safe Workflow Automation: Prevent Duplicates, Partial Writes, and Silent Failures

Classify the failure, map completed side effects, and choose retry, resume, compensation, or manual reconciliation from a known boundary.

Official sourcesFailure recoveryNo exact retry-cost claims

A retry is safe only when repeating work cannot create an unacceptable second effect. “Try again” is therefore a data-integrity decision before it is a reliability feature.

Short answer

  • Retry the failed step with backoff for a temporary error when the action is read-only or protected by an idempotency mechanism.
  • Resume from a checkpoint when earlier side effects completed and the platform preserves the failed state.
  • Correct data or credentials before continuing for validation, authorization, and business-rule failures.
  • Do not full-rerun blindly after creating a record, sending a message, charging a payment, publishing content, or changing inventory.
  • Escalate to a person when completion is uncertain and the destination cannot reconcile by a stable event or business key.

First classify the failure

Error class Typical example Default response
Temporary transport timeout, connection reset, transient 5xx Retry with bounded backoff after checking side-effect safety.
Rate limit 429 or provider throttle Honor the provider delay, reduce concurrency, and retry the failed action.
Invalid data missing required field, wrong type Do not retry unchanged input; correct or reject it.
Authentication or permission expired credential, revoked scope Stop, restore access, then continue from a known boundary.
Business conflict duplicate order, closed period, state changed Reconcile current state; do not treat it as transient.
Unknown outcome request timed out after the destination may have accepted it Query by idempotency or business key before any repeat.

Automatic retry is most defensible for temporary conditions. A repeated invalid payload is only repeated failure. An unknown outcome is the dangerous case: the caller did not receive confirmation, but the destination may already have performed the action.

Map side effects before recovery

Write the workflow as a sequence of state changes:

receive event -> create CRM record -> send email -> update audit register

If the email step fails, the CRM record may already exist. A full rerun begins before the completed side effect and can create a duplicate record. A failed-step retry or resume begins at the email boundary and preserves the earlier result.

For every step, record:

  • whether it is read-only or state-changing;
  • the destination object and returned identifier;
  • whether repeating it is naturally idempotent;
  • whether the API accepts an idempotency key;
  • whether a lookup can detect an existing result;
  • whether the effect can be compensated or reversed;
  • what evidence proves completion.

Idempotency is a property of the operation

RFC 9110 defines an idempotent request as one whose intended effect is the same after multiple identical requests as after one. It classifies PUT, DELETE, and safe HTTP methods as idempotent, while POST is not idempotent by default. The specification also warns against automatically retrying a non-idempotent request unless the client knows the operation is idempotent or can determine that the first request was not applied. See RFC 9110, section 9.2.2.

An API can add safe replay semantics to POST. Stripe, for example, documents idempotency keys that return the saved result for repeated requests with the same key. That is a provider-specific mechanism, not proof that every connector forwards or preserves such a key. See Stripe idempotent requests.

A practical key should identify the business event, not the execution attempt. Examples include a source event ID, order ID plus operation name, or invoice number plus destination. Store the destination result beside the key so a retry can return or reuse the prior outcome.

Four recovery boundaries

1. Retry the failed step

Use when the prior steps are complete, the failed action is temporary, and replaying that action is safe. Add bounded attempts, increasing delay, and a terminal manual queue.

2. Resume from stored state

Use when the platform retains the failed item and remaining path. Verify that edited mappings, credentials, or workflow versions will not change the meaning of the stored data unexpectedly.

3. Compensate, then continue

Use when a completed effect can be reversed deliberately: delete a draft record, release a reservation, or mark an incomplete object for review. Compensation is another fallible workflow and needs its own evidence.

4. Full rerun

Use only when every earlier effect is read-only, idempotent, deduplicated, or explicitly compensated. A full rerun is not a substitute for identifying the failure boundary.

What current platform documentation establishes

Platform Documented recovery capability Boundary to preserve
Make Error handlers, incomplete executions, automatic or manual retry, resume, commit, and rollback where supported. Do not assume all external app changes can be rolled back or that one retry-cost formula applies.
n8n Error workflows, saved executions, node-level retry settings, and retrying failed executions with prior data. A workflow retry can replay nodes before the failure; protect completed side effects.
Albato Manual error resend; documented automatic resend for timeout errors; error handler paths. Manual resend processes the failed step and subsequent steps; verify already completed actions and current mappings.
Pabbly Auto re-execution and manual re-execution of failed and skipped steps. Verify task history and the exact action before enabling repeated external writes.

Make describes Retry handlers and incomplete executions that can preserve a failed bundle and remaining flow. See Make error handlers and Retry error handler.

n8n documents error workflows and retrying failed executions using original or currently saved workflow data. See n8n error handling and all executions.

Albato documents manual resend and five timed retries for timeout errors. See Albato error handling.

Pabbly documents configurable auto re-execution for failed and skipped steps. See Pabbly auto re-execution.

These sources establish available recovery paths. They do not prove that the same workflow creates the same usage delta, duplicate behavior, or rollback result on all connectors.

Worked recovery patterns

Read API -> transform -> write spreadsheet

If the read times out before returning data, retrying the read is usually lower risk. If the sheet write times out after the destination may have accepted the row, first search by source event ID. Append only when that ID is absent.

Create CRM lead -> send follow-up

Store the CRM record ID after creation. If email fails, resume from email. A full rerun should search by source lead ID and reuse the existing CRM record.

Create invoice or payment

Treat a timeout as an unknown outcome. Query the provider using its idempotency key or business reference. Do not issue another create or charge request merely because the workflow did not receive a response.

Publish -> distribute -> archive

Publication is a visible side effect. Save the canonical post ID and URL. If social distribution fails, resume from distribution and make each channel check whether the post was already announced.

Minimum production recovery contract

Before launch, define:

  1. error classes eligible for automatic retry;
  2. maximum attempts and delay policy;
  3. stable event or idempotency key;
  4. duplicate lookup before each irreversible write;
  5. checkpoint or stored-state boundary;
  6. compensation action where realistic;
  7. manual owner and response time;
  8. retained evidence: input ID, step, timestamp, error, prior result, retry count, and resolution.

Decision rules

Enable automatic retry only for known temporary errors and safe operations.

Resume when earlier effects are confirmed and the failed state is retained.

Reconcile first when the outcome is unknown.

Require manual review for money movement, publication, destructive changes, legal records, or any action whose duplicate cannot be repaired cheaply.

Stop the automation when the process lacks a stable identifier, duplicate detection, evidence retention, and an owner for unresolved failures.

Build the recovery brief

Use the Automation Exception and Retry Planner to classify the failure, expose unsafe reruns, and produce a one-page recovery brief. Use the Billing Topology Worksheet separately for usage ranges; the planner deliberately does not invent retry costs.