Article

Automation : AI or What ?

A decision framework for automation: map the environment and flow, pick the simplest tool per quadrant, and use AI as a component—weighing the real cost of intelligence.

9 min read
AIAutomationProductivityRPA

We often equate “automation” with “artificial intelligence,” but the truth is far more nuanced. Many repetitive digital tasks can be automated perfectly with simple, lightweight tools – no machine learning, no large language models, just a straightforward macro or script. Reaching for AI by default is a common and expensive mistake: it adds cost, latency, and non-determinism to problems that a fifty-line script would solve more reliably.

The real engineering question is not “can AI do this?” – it almost always can – but “what is the simplest tool that solves this and keeps solving it next month?” To answer that, it helps to decompose any automation along two independent dimensions:

  1. The Environment – the digital landscape the automation must interact with.
  2. The Flow – the process itself, including all its steps, branches, and exceptions.

These two axes are independent, and that is the whole point: a task can have a rock-solid environment but a tangled flow, or a clean linear flow running across a chaotic environment. Diagnosing each separately is what tells you where simple tooling ends and intelligence earns its keep.

1. The Environment: Where the Automation Lives

The “environment” is everything your automation touches: websites, web apps, desktop applications, file formats, APIs, emails, and the data inside them.

  • Stable, predictable environment – Buttons stay in the same place, page layouts don’t change, data arrives in a single, clean format.
  • Volatile, unpredictable environment – User interfaces are frequently updated, files come as free-form PDFs or images, data is messy and unstructured.

The stability of the environment dictates how “smart” your automation needs to be. A macro recorded once and replayed forever thrives in the first case. The second case calls for AI that can adapt on the fly – computer vision to find a button that moved, natural language processing to extract meaning from a rambling email.

2. The Flow: What the Process Actually Does

The “flow” is the sequence of operations, decisions, and exception paths that take a task from start to finish.

  • Linear, repeatable flow – Do the exact same steps every time, with no variation.
  • Complex, branching flow – Many possible paths based on data, business rules, or context. A simple login might be straightforward, but processing an invoice could branch into tax checks, approval escalations, and multi-currency handling.

A rule-based script or recorded macro handles a linear flow beautifully. But when the logic gets deep – with dozens of decision points and human-invented shortcuts – a traditional automation becomes a maintenance nightmare. That’s where AI-based decision models or autonomous agents can really help.

The Decision Matrix: Four Quadrants

Cross the two axes and you get a simple map. Find the quadrant your task lives in, and the right class of tool follows almost automatically.

  • Stable environment + linear flow → scripts and macros. A recorded browser sequence, a shell script, or a cron job. Deterministic, near-zero running cost, trivial to audit. This is the largest quadrant in most businesses, and the one teams most often over-engineer.
  • Stable environment + complex flow → rule engines and code. The screen never moves, but the logic branches heavily. Express the rules explicitly in code or a workflow engine; you do not need perception, you need clear conditionals and good tests.
  • Volatile environment + linear flow → AI perception, deterministic logic. The steps are always the same, but the inputs are messy – PDFs of varying layouts, a UI that shifts. Use computer vision or an LLM to read the input, then hand a clean, structured result to ordinary code.
  • Volatile environment + complex flow → autonomous agents. Both the inputs and the decisions vary. This is the genuine home of AI agents that perceive, reason, and choose steps dynamically – and also the most expensive and least predictable quadrant to operate.
The cost and fragility of an automation rise sharply as you move toward the bottom-right quadrant. Push your solution as far toward the top-left as the problem honestly allows.

Simple Tools for Simple Contexts

When both the environment and the flow are stable, the best solution is often the most minimal one. Browser macro recorders that capture clicks and form fills, for example, can automate entire multi-step web processes with zero code and zero training data. (One such extension, Mazilla, does exactly that – record and replay browser actions.) For a task like logging into a consistent portal, downloading a daily report, and filing it, a recorded sequence runs reliably day after day. The tool doesn’t need to “understand” the page; it just repeats what it saw. This approach is fast, maintainable, and avoids the overhead of AI.

When AI Becomes the Smarter Choice

The moment either the environment or the flow crosses the stability threshold, a deterministic macro breaks – and AI starts to pull its weight.

  • Environment becomes unpredictable
    Your company’s procurement portal redesigns its interface every quarter. Invoices pour in as PDFs of wildly different layouts, attached to emails written in informal language. A recorded macro that relies on fixed XPaths or screen coordinates will fail constantly. Here, AI-powered computer vision can “see” the new layout and identify the correct fields; natural language understanding can extract invoice data regardless of the PDF design or the email phrasing.
  • Flow becomes complex
    Even something routine like invoice processing often hides a branching nightmare: “If the vendor is new, validate their tax ID against a government database; if the amount is above $5,000, route for extra approval; if it’s an EU cross-border invoice, apply reverse-charge VAT logic.” You can’t record that with a single, linear macro. AI decision models, trained on historical data, can learn these unwritten rules and make the right call automatically. Generative AI agents can even orchestrate the entire flow, choosing steps dynamically based on the context.

The Pragmatic Rule: Start Simple, Add Intelligence Only When Necessary

Before you build anything, ask two questions about the task you want to automate:

  1. How stable is the environment?
    Are the applications, UIs, and data formats I rely on essentially static, or do they change frequently?
  2. How variable is the flow?
    Is this a single, unvarying sequence of steps, or does it contain many decision points, exceptions, and parallel paths?

When the answers are “stable” and “linear,” start with the simplest tool: a macro recorder, a shell script, a lightweight RPA bot. It’s faster to build, easier to maintain, and usually costs nothing extra.

When the environment is volatile or the flow is deeply complex, bring in AI. It will handle the messiness that would otherwise turn your maintenance burden into a full-time job.

The Hybrid Sweet Spot: Use AI as a Component, Not the Whole System

The most robust automations rarely pick one extreme. They use AI surgically – only at the step that is genuinely uncertain – and wrap deterministic code around it. Think of intelligence as a specialized component, not the operating model for the entire pipeline.

A typical invoice pipeline shows the pattern clearly: a deterministic trigger watches an inbox, an LLM or vision model extracts structured fields from each messy PDF, and then plain code validates totals, applies tax rules, and routes for approval. The AI does one hard thing it is uniquely good at; everything auditable and rule-bound stays in code you can test and reason about. This containment also makes failures legible – when something breaks, you know whether the model misread a field or a business rule misfired.

  • Keep AI at the edges (perception, extraction, classification) and logic in the core.
  • Validate every model output before it touches a downstream system – never trust, always verify.
  • Log the model’s inputs and outputs so you can debug, audit, and build an evaluation set over time.
  • Add a confidence threshold and a human-in-the-loop path for low-confidence cases.

Count the Total Cost, Not Just the Build

“AI can do it” and “AI should do it” are different claims, and the gap between them is usually money and maintenance. Before adding intelligence, weigh the running cost against the boring alternative.

  • Determinism – a macro does the same thing every run; a model has a non-zero error rate you must monitor and absorb forever.
  • Per-run cost – scripts are effectively free to execute; model inference is billed per call and adds latency to every transaction.
  • Debuggability – when a script fails, the stack trace tells you where; when a model is “wrong,” the cause is often opaque and probabilistic.
  • Maintenance shape – scripts break loudly when the environment changes; AI systems can degrade silently as inputs drift, which is harder to detect.

Conclusion

Not everything needs intelligence to be automated. A straightforward macro that replays clicks can be just as effective as a sophisticated AI pipeline – and a lot more reliable – when the conditions are right. Understanding your environment and your process flow is the key to choosing the simplest, most robust solution. Often, the “boring” approach is the smartest one.