Open to employment
Automation & systems10 min read

Before you automate, design the failure path

A form arrives. The workflow starts. The CRM does not answer. Before you click ‘retry’, there is one awkward question to settle: did the record get created anyway? That moment tells you more about an automation than a screen full of green nodes.

Automation & systemsMK.
Design the recovery.
A design is not complete until the uncertain outcomes have somewhere to go.
The idea behind it

A useful workflow leaves the next person with a clear decision, even when the software cannot finish the job.

01 /

Start with one enquiry

Consider a small team receiving enquiries through a website. Someone currently reads each message, checks the contact details, creates a CRM record and assigns a colleague. It is a reasonable place to automate: the work repeats, the information is mostly structured and the destination is known. For this article, that team and its records are fictional. The example is a design exercise, not a report of measured client results.

The first version is easy to sketch: form → validation → CRM → notification. But ‘notification sent’ is a poor definition of done. The message could reach the wrong person. The CRM record could contain an empty email address. A notification might succeed after the record creation failed. Each node has done something; the handoff still has not happened.

I would write the outcome in ordinary language before choosing the nodes: one valid enquiry becomes one traceable record, with an owner who can see the original request. Anything that cannot reach that state needs an identifiable place to wait. That sentence gives the build a boundary. It also makes clear what a test should check at the other end.

Keep the first scope narrow. Creating a draft record and proposing an owner may be enough. Quoting a price, promising a response time or sending a personalised reply introduces a different level of responsibility. Those actions deserve their own rules. The Lead Qualification case study explores this separation through scoring and mock CRM routing; its documented limits matter as much as the workflow diagram.

02 /

Give the request three possible exits

A missing email address and a temporarily unavailable CRM should not land in the same bucket. Waiting will not repair the missing address. Asking someone to inspect every brief connection failure is wasteful. The workflow needs enough information to distinguish an input problem, a temporary interruption and an uncertain result.

For the enquiry example, I would start with three exits. Continue when the fields are valid and the next action is supported by a clear rule. Retry when there is a temporary problem and a repeat is safe. Send the request for review when information is missing, the decision is ambiguous or the result of an earlier action cannot be confirmed.

There are other legitimate endings: cancelled, expired or deliberately stopped. The three exits are a starting model, not a complete taxonomy. What matters is that each exit explains the next step. ‘Failed’ alone leaves the operator to do the diagnosis again. ‘Email missing; nothing sent to CRM’ explains both the cause and the boundary.

Use the little example below to compare those states. It changes a fictional request in your browser. It does not call a CRM, send a message or demonstrate production reliability. Notice how the timeout case remains uncertain instead of quietly turning into a second create request.

EXPLORE / 01

Same request. Different decision.

Choose a scenario. A local simulation with fictional data.

ConfirmedREQ–1042

One record. Clear ownership.

  1. 01Required fields checked
  2. 02CRM confirms R-1042
  3. 03Owner assigned
CRM record
R-1042 · confirmed
Attempts
1 · complete

The fictional CRM has confirmed the record. The outcome is known; there is no reason to repeat the write.

NEXT ACTIONThe assigned person handles the enquiry.

No API call. No message. No data leaves your browser.

03 /

A timeout does not mean nothing happened

Suppose the CRM accepts the request and creates record R-1042. The response is lost before it reaches the workflow. From the workflow’s point of view, the request timed out. From the CRM’s point of view, the work is complete. A blind retry can create R-1043 for the same enquiry. Both records look legitimate until a colleague starts contacting the same person twice.

Give the enquiry a stable reference before the first attempt, and keep that reference when trying again. Do not generate a new identity on each retry. If the destination supports an idempotency key, use its documented mechanism. Stripe’s idempotent-request documentation is a concrete example of that pattern, but its guarantees do not automatically apply to a CRM or another API. Check the exact endpoint, retention window and behaviour after an error.

When the destination has no such mechanism, the design needs another way to reconcile the result. A lookup by a unique external reference may help, provided that reference is actually enforced. Searching for a matching email address is a weak substitute: two requests can arrive together, a lookup can be stale and the same person can make two legitimate enquiries. A separate ‘check, then create’ sequence is not automatically safe under concurrency.

Retries also need a limit and an owner. Decide which errors qualify, how many attempts are permitted and what happens when the last attempt fails. For an uncertain write, checking the destination may be the next step. For invalid input, a retry may be entirely wrong. The operator should be able to see why the system chose to wait rather than being asked to trust a spinning icon.

04 /

Make the review screen useful at a glance

Imagine opening the queue after lunch and finding twelve items marked ‘needs review’. The label does not tell you whether you are correcting a typo, choosing an owner or preventing a duplicate. A good review screen reduces the amount of detective work required before the person can make a decision.

For this enquiry, show the original message, the missing or uncertain field, the stable request reference and the last confirmed action. Separate facts from suggestions. ‘CRM record found: R-1042’ is a fact if it has been verified. ‘Suggested owner: sales team’ is a recommendation. ‘Notification prepared’ is not the same as ‘notification delivered’.

The next action should match the problem. Missing contact details might mean requesting clarification. An uncertain CRM write might mean checking the existing record and continuing from there. Do not put a large ‘Retry everything’ button on every failure state; it encourages an operator to repeat actions that may already have succeeded.

There is a second handoff to design here: who owns the review queue? A technically correct workflow can still lose requests if nobody checks it. Agree who receives an escalation, when an item becomes overdue and how ownership transfers during an absence. The Customer Support case study shows a related boundary between an evidence-based suggestion and a response that still needs human review.

05 /

Turn the decision model into an n8n workflow

I would build the first version around the data contract: which fields are required, which values are accepted and which reference connects the steps. Validate before sending data to the destination. Keep the original request available to the authorised reviewer, but avoid scattering a full message and personal contact details through every diagnostic entry.

For execution failures, n8n supports a separate error workflow beginning with an Error Trigger. It can be selected in the main workflow’s settings and reused across workflows. The n8n error-handling guide explains the setup and the data it receives. Trigger-level failures can provide different information, so an error handler should not assume every failure includes the same execution fields.

Rate limiting is another decision to make explicitly. n8n documents Retry On Fail and approaches using batching and waiting in its rate-limit guide. Those controls help pace requests; they do not decide whether repeating a particular business action is safe. Read the destination’s limits, preserve the request identity and test the actual response rather than treating every error as a reason to retry.

Keep recovery understandable. If one workflow validates and creates the record, a small second workflow can collect execution failures and route them for attention. A separate component is useful when it creates a clearer responsibility; splitting every few nodes into another workflow can make the trail harder to follow. FlowGuard is my portfolio example for incident handling and controlled recovery, including the limitations recorded in its case study.

06 /

Test the result, including the awkward cases

The first useful test is not a complicated stress test. Submit one valid fictional enquiry and inspect the destination. Is there exactly one record? Is its reference correct? Can the assigned person see the original request? A successful execution indicator is supporting evidence, not a substitute for checking the business outcome.

Then remove one required field. Send the same event twice. Simulate an unavailable destination. Interrupt the response after a write, if your test setup supports that boundary. Supply a request that fits two categories. For each case, write down the expected state before running it. Otherwise it is too easy to call whatever appeared on screen the intended behaviour.

Keep a small evidence table with the input, the expected destination state, the observed state and any unresolved question. If the test uses a mock destination, say so. If parallel submissions have not been tested, say that too. A neat set of screenshots should not imply coverage that the test environment cannot provide.

Test the operator’s part as well. Can someone understand why an item stopped without reading the node graph? Can they correct it without resending completed actions? Does a refresh preserve the true state? The Stackline hosting prototype lets visitors explore a related idea through simulated deployment failure and recovery. It is an interface demonstration, not evidence of a production hosting service.

07 /

Count the work that remains

Time saved is easy to exaggerate if the calculation stops at ‘the workflow runs automatically’. Someone still handles exceptions, maintains credentials, investigates incidents and changes the rules when the team’s process changes. A useful estimate subtracts that work instead of pretending it disappears.

Take an illustrative week with 100 enquiries at four minutes each: 400 minutes of manual processing. Suppose automation leaves 20 items requiring five minutes of review each, plus 45 minutes of maintenance and checks. The estimate becomes 400 − 100 − 45 = 255 minutes saved that week. These are made-up planning inputs, not measurements from this portfolio or a promise for another team.

Now change the review rate. If 70 enquiries need five minutes each, the same calculation leaves only five minutes saved. The workflow may still improve consistency, but the time-saving argument is much weaker. This is why recording the exception rate often matters more than counting successful executions.

Operating cost needs the same honesty. Include the relevant share of hosting, paid tool subscriptions, per-request charges if any, storage and the effort to support the system. Shared infrastructure should not be charged in full to every workflow and then added together again. Start with the actual provider invoices and observed usage; a small demo cannot establish someone else’s monthly production bill.

PLANNING EXAMPLE / 02

How much time is actually left?

Illustrative inputs for 100 enquiries a week. These are not measured project results.

400min before
145min review + upkeep
255min net saved

Assumptions: 4 min per enquiry before; 5 min per review; 45 min weekly upkeep. A negative result means extra work.

08 /

Connect real systems in a small first release

Before a prototype writes to live records, agree on the owner, the allowed actions and the way to stop it. Try a limited set of low-risk inputs with somebody watching the results. Retain a manual route for requests that cannot be processed automatically. The aim is to learn about the real handoff without making the entire team dependent on an unproven chain.

My release checklist for the fictional enquiry would be short: the required fields are defined; one request keeps one identity; uncertain writes are reconciled; retries have a boundary; reviews have an owner; and the destination can be checked independently. Add the specific requirements of the real service rather than treating this list as a universal production standard.

After release, look at what lands in review. Repeated missing fields may point to a confusing form. Frequent owner changes may reveal an unclear team process. Automating those problems faster will not resolve them. Sometimes the best next change is a better question on the website or a simpler assignment rule.

That is the part of automation I find most useful: making a process visible enough to improve it. The finished workflow should leave a colleague able to say what happened, what has not happened and what they need to do next. You can explore more of that approach in my automation and systems skills and the project collection.

Sources & further reading

Official documentation for the features discussed. Checked on 12 October 2026. The article’s scenarios and estimates are illustrative.

  1. n8n — Error handling ↗
  2. n8n — Rate limits ↗
  3. Stripe — Idempotent requests ↗
Milad Khazem

Written by Milad Khazem

I build automations, websites, apps and digital systems. Here I explain decisions from working on my projects, including the limits that a demo cannot remove.

More about my background ↗
← Back to the blog