# n8n interview prep

## How do you resume a workflow after its last write went missing?

Original Opend practice case · Updated 2026-11-30

[Cite this case](https://opend.in/prep/n8n#workflow-recovery)

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 answer** — Track the business action independently of the worker attempt. Reconcile an ambiguous external result before advancing to the next step or replaying its side effect.

### The crash falls between two durable systems

- **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](https://docs.n8n.io/hosting/scaling/queue-mode/)

### 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](https://docs.n8n.io/flow-logic/error-handling/)

### Choose a recovery action from persisted evidence

| 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 |

### Why 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.

Practice the failure modes behind workflow automation and integrations. This is an Opend preparation plan informed by n8n's public queue-mode documentation, not a confirmed interview loop.

## Coding & problem solving

Practice a small, testable solution. Explain data structures, complexity and edge cases aloud.

## LLD / HLD

Design durable workflow execution across workers, credentials, external APIs and partial failures.

## Practical systems & work discussion

Walk through one project you shipped: the constraint, your decision, a failure, and the result you can substantiate.

## Practice questions

These are Opend practice prompts, not verified interview questions.

### How would you retry a workflow without repeating a side effect?

- Persist execution and step state before advancing the workflow.
- Use operation-level idempotency where the downstream API supports it; otherwise model ambiguity explicitly.
- Test a worker crash after an external action but before its result is saved.

### How would you keep one slow integration from blocking everyone?

- Separate per-tenant and per-provider concurrency limits.
- Use bounded retries with jitter, a dead-letter path and visibility into queue age.
- Explain fair scheduling and cancellation when a workflow is no longer useful.

### How would you protect credentials in a workflow engine?

- Separate secret references from workflow definitions and enforce ownership on every execution.
- Redact logs, encrypt stored credentials and support rotation.
- Treat imported workflow steps and external responses as untrusted input.

[Live roles](https://opend.in/jobs?company=n8n)

## Sources

- [n8n: queue-mode documentation](https://docs.n8n.io/hosting/scaling/queue-mode/)
- [n8n careers](https://n8n.io/careers/)
