Artificial intelligence
Automation for businesses and studios: designing workflows that do not break
Automation for businesses and professionals: which processes to automate, n8n or custom code, idempotency, error handling, AI in workflows and human control where it is needed.
Fabio Folgori5 min read

Automating a repetitive step is easy. Making sure the workflow still works six months later, with dirty data, changing APIs and someone on holiday, is design work. The difference between a useful automation and a new problem lies almost entirely in how errors, duplicates and responsibility are handled.
Which processes are worth automating
The best candidates have three traits: they are frequent, follow rules that can be expressed and have a contained or recoverable cost of error. Typical examples I meet in businesses, studios and agencies:
- routing incoming requests from forms and email to the right person or case, extracting the useful data;
- syncing between systems: orders from e-commerce to the management system, contacts from the site to the CRM, stock and prices the other way;
- generating documents from templates: quotes, confirmations, contracts with data already filled in;
- reminders and chasers based on real deadlines, not a hand-kept calendar;
- periodic reports built from several sources, delivered ready to read.
The process to avoid as a first project is the rare one, full of exceptions, where a mistake is expensive.
Tools: visual or code
n8n (which can be self-hosted, unlike Make and Zapier) is excellent for linear workflows, for prototyping and when whoever runs the automation wants to see and edit it. Its limits show with branching logic, complex data transformations, high volumes and no automated tests.
A service in code, versioned in a repository, with tests and controlled deploys, costs more at first and less over time when the workflow is critical. Often the right answer is mixed: n8n as orchestrator, with the delicate steps in hand-written functions.
The principles that make a workflow reliable
Idempotency
Every step must be safe to re-run without double effects. If the workflow stops after creating the invoice but before marking it as created, on resume it must not create a second one. You get this with unique identifiers per operation and checks before writing.
Retries and queues
External APIs fail, slow down and impose rate limits. A serious workflow retries with growing delays, queues operations when a service is slow and never loses events received via webhook.
Observability
Every run leaves a trace: what came in, what was done, what failed. When something does not add up, you must be able to answer "what happened to order 1234?" in five minutes.
Alerts with an owner
An error that ends up in an unread log is not handled. Every workflow has a responsible person who receives the alerts it cannot resolve on its own.
Credentials and permissions
Dedicated API keys for each automation, with the minimum permissions needed, stored securely and rotatable without stopping everything.
AI in workflows
AI is useful at one precise point: turning unstructured text into structured data. Classifying an email, extracting amounts and dates from a document, summarising a request. In those steps it should be used with schema-constrained output, validation of the result and a confidence threshold below which the case goes to a person.
Where data is already structured, AI is not needed: an explicit rule is faster, cheaper and does not fail unpredictably. The wider picture is in AI for businesses: concrete use cases.
Human control where it matters
Not everything should be automated end to end. Steps with financial or customer-facing consequences (sending a quote, a refund, a delicate message) work better as a draft prepared and approved by a person. Automation removes the mechanical work; the decision stays with whoever is accountable.
How I set up the first project
- Map the process as it is today, with real times and exceptions.
- Pick a single workflow, frequent and low-risk.
- Build the shared foundation: run log, alerts, credential management.
- Release it alongside the manual process for a few weeks, comparing results.
- Only then, the next workflow.
An example workflow, step by step
A typical case: orders arrive by email from regular customers, in different formats, and someone retypes them into the management system.
- A webhook or dedicated inbox receives the email and queues it with a unique identifier.
- A language model extracts customer, items, quantities and requested date into a schema-constrained format.
- The code validates the result: does the customer exist? Are the item codes valid? Are the quantities plausible?
- If validation passes and confidence is high, the order is created in the system idempotently; otherwise it goes into a review queue with the data already filled in.
- A confirmation draft is prepared for the customer, which a person approves with one click.
- Every step writes to the run log; unrecoverable errors trigger an alert to the owner.
Manual work does not disappear: it shrinks to the doubtful cases, which are exactly the ones where a person is really needed.
My take
I prefer a few robust automations to many fragile ones. I have seen too many workflows built in an afternoon, with no log and no alerts, that stop working silently and are discovered weeks later. An automation you cannot tell has worked is worse than doing the job by hand.
That is why I treat important workflows as software: code in a repository, tests, deploys with previews, as I do for websites and management apps. At Altura Vela, for example, some AI features in the management app take repetitive work off whoever organises courses and outings, but inside an application I know line by line, not in a chain of external tools.
Why work with me
I have been programming since 1999, delivered more than 300 projects and work as an external developer with about 30 agencies, from Rome and remotely. I design automations with n8n or in code, with idempotency, error handling and human control where needed.
If a process eats hours of your week, get in touch: in a call of about 20 minutes we work out whether it can be automated and with what risk. The service is in AI and automation.
Frequently asked questions
Visual tools are excellent for workflows with few steps and moderate volumes. When you need complex logic, high volumes, automated tests or sensitive data, a service written in versioned code is more reliable and cheaper over time.
A well-designed workflow retries with growing delays, logs the error, does not repeat operations already done (idempotency) and alerts a person when it cannot recover on its own.
No. It is useful where unstructured text has to be interpreted: emails, documents, free-form requests. Where data is already structured, explicit rules are more reliable, faster and cheaper.
A frequent one, with clear rules and a low cost of error. The first workflow also builds the shared foundation: logging, alerts, credential management.
- #automation
- #process automation
- #n8n
- #ai and automation
- #integrations


