Where AI Fits Inside an Automation
Automation moves data; AI interprets it. Keeping that boundary sharp is what makes the result reliable.
The temptation once you add an AI step is to let it handle more and more. That is exactly how a predictable automation becomes an unpredictable one.
The rule that holds: everything mechanical stays deterministic, and AI is confined to the specific steps that genuinely require interpretation.
The jobs AI does well inside a workflow
- Classification — sorting an incoming item into categories you defined
- Extraction — pulling named fields out of unstructured text
- Summarisation — condensing a long message into something scannable
- Drafting — producing a first reply for a human to review and send
- Routing decisions — choosing between explicit options based on content
Narrow beats clever
'Classify this enquiry as pricing, support, partnership or other' is reliable, testable, and fails visibly. 'Handle this enquiry appropriately' is none of those things.
Give the AI step one job, an explicit set of allowed outputs, and an escape hatch. If it cannot decide, it should say so rather than guess — and your workflow should route that to a human.
A well-scoped AI step
Classify the message below into exactly one category:
- pricing
- support
- partnership
- other
Also extract, if present: company name, phone number, deadline mentioned.
Reply as JSON only:
{"category": "...", "company": "...", "phone": "...", "deadline": "...", "confidence": "high|low"}
Use "other" and confidence "low" if you are unsure.
Do not invent values — use null for anything not stated.
Message:
{{message}}Structure the output
Ask for JSON, or a fixed set of single-word answers. Free prose is unparseable and forces the next step to guess what it received.
Then validate it. If the returned category is not one of your four, treat it as a failure and route to a human rather than passing an unexpected value onward.
Cost and latency are real
An AI step costs money per run and takes seconds rather than milliseconds. On a workflow that fires a hundred times a day, both add up.
Ask whether a deterministic rule would do. Keyword matching, a lookup table or a simple condition is free, instant and perfectly predictable. Use AI where the input is genuinely unstructured — not where you were just too lazy to write the rule.
What to take from this chapter
- Keep AI confined to interpretation; everything else stays deterministic
- One job per AI step, with an explicit list of allowed outputs
- Request structured output and a confidence signal, then validate before proceeding
- Prefer a plain rule where one would work — it is cheaper, faster and predictable
Try it
Take the AI step in your workflow and rewrite its prompt to return JSON with a fixed set of values plus a confidence field. Run it on ten real inputs and count how often you would have wanted a human to see it.