n8n · Opend practice case · Updated
How do you resume a workflow after its last write went missing?
A workflow creates a CRM ticket, then sends an acknowledgement. The ticket API accepts the request. The worker crashes before saving the ticket ID. A replacement worker picks up the job. Starting from the first unfinished step could create a second ticket.
Short answerTrack the business action independently of the worker attempt. Reconcile an ambiguous external result before advancing to the next step or replaying its side effect.
- Save intent
For support request 91, persist action create-ticket:91 as pending.
- External commit
The CRM creates ticket T8. The worker crashes before recording T8.
- Recover the receipt
Look up the action reference or replay its provider key. Save T8 before sending the acknowledgement.
Locate the source of truth
In n8n queue mode, the main instance queues an execution ID through Redis and a worker retrieves execution data from the database. A broker message tells a worker there is work to do. It cannot tell the replacement worker whether the external CRM committed. In this exercise, add a durable action record keyed by the original support request and workflow step.
n8n queue-mode architecture ↗Recover according to the connector’s contract
If the ticket API supports idempotency, send the same key across attempts. If it supports a unique client reference, query that reference and recover the ticket ID. An eventually consistent search returning no rows immediately after creation is weak evidence. Wait or reconcile against an authoritative source. When the connector supplies neither mechanism, put the action in an ambiguous state for review. Blind retries trade an availability improvement for a duplicate customer-visible action.
Make recovery observable at the business level
Keep the original request ID, execution attempts, step ID and downstream receipt together. An error workflow can alert an operator and carry retry lineage when available. A successful retry should close the original incident. Count ambiguous actions and their oldest age, and test a crash on each side of the external call. The acknowledgement step also needs its own duplicate-delivery policy.
n8n error workflows and retry metadata ↗| Local evidence | Provider capability | Safe next move |
|---|---|---|
| Pending, receipt missing | Replayable key | Retry the original key |
| Pending, receipt missing | Unique lookup | Retrieve ticket T8 |
| Outcome unknown | Neither guarantee | Escalate for reconciliation |
Try the follow-upWhy can’t the new execution ID serve as the idempotency key?
An execution ID identifies an attempt. Retrying the same business event can produce a different execution ID, so using it as the provider key would authorize another ticket. Preserve the original business action across executions. Give a truly new support request a distinct identity.