Gareth B. Davies
All articles
Build itWorkflow design

How to break a big automation into reliable, retryable steps

Big automations fail as one unit unless you split them into small, retryable pieces with real checkpoints between each one.

The pattern shows up in almost every automation that grows past a demo. Someone builds one long workflow that scrapes data, calls an API, generates content, and writes the result somewhere, and it works fine on the first ten runs. Then run eleven hits a slow API, a malformed record, or a rate limit, and the whole thing dies partway through with no way to tell what actually finished. Nobody wants to re-run a forty-minute job because step thirty-one timed out.

Find the part you don't trust yet

Before splitting anything, work out which piece of the automation is actually unproven. A builder putting together an Instagram scraper found this out the hard way: the scraping and the analysis were bolted into one pass, so a hiccup in scraping meant redoing analysis that had already worked. Test the unknown component on its own first, with a small known input, before wiring it into anything bigger. If you're calling a new API, run it against one sample record and read the raw response before you let it touch a batch.

Cut the workflow at its natural seams

Once you know where the risk is, split the workflow along the lines that already exist in the problem, not arbitrary points in the code. A video pipeline that generated scenes, close-ups, and transitions as one monolithic run got broken into separate components for each stage, so a failure in close-ups no longer took out scenes that had already rendered. A PDF-processing job dealing with inconsistent document layouts moved to a parent workflow plus modular sub-workflows, one per format family, so a new layout could be added without touching the ones already working. The test for a good seam is simple: can this piece fail on its own without corrupting the piece next to it?

Retry the unit, not the whole run

This is where most homegrown automations get it wrong. Batch-processing sixteen images with one shared retry loop means one bad image can stall or corrupt the whole set. Switching to single-item processing, each with its own retry attempts (three to five is a reasonable range), keeps a failure contained to the one item that caused it. The same logic applies to any loop over records: retry the record, not the job.

That also means slowing down on purpose where the API asks you to. A one-second wait between calls, plus batching the calls themselves into smaller groups, avoids most rate-limit failures before they start.

Give the system somewhere to stop

Retries need a ceiling. A workflow that kept retrying without a cap ran into a genuine infinite loop until a hard stop was added: ten attempts, then halt and flag it. Below that, three attempts with a notification on the final failure is usually enough to catch a real outage without spamming false alarms. The stop condition matters as much as the retry itself.

Name it so the next person can follow it

Once a workflow is in five or six pieces, the pieces need to read clearly on their own. Clear naming and consistent state management between the sub-workflows are what keep the system maintainable once nobody remembers the original design six months later. A lead-scraping setup split into four separate workflows specifically to make each bottleneck visible on its own, rather than buried inside one long chain nobody wants to open.

None of this is complexity for its own sake. A modular workflow is genuinely simpler to operate than a monolithic one, because when something breaks, you know exactly which five-minute piece to look at instead of restarting a forty-minute job and hoping.

n8nAirtable

Want a partner working through this with you?

The AAA Accelerator is where AI agency builders get coached on exactly these calls, from first client to full pipeline.