AI vs Rule-Based Automation: Which Does Your Task Need?

Coding Liquids tutorial cover featuring Sagnik Bhattacharya for AI vs Rule-Based Automation: Which Does Your Task Need?
Coding Liquids tutorial cover featuring Sagnik Bhattacharya for AI vs Rule-Based Automation: Which Does Your Task Need?

Your task needs only rule-based automation if you can write the right action as "when X happens, do Y" and the input always arrives in the same shape, such as a paid invoice or a completed booking. It needs AI when someone has to read, interpret or write free text. Many good workflows use rules for the route and AI for one step.

Getting this right saves money and trouble. Rules are cheap, predictable and easy to audit. AI is flexible, but it gives slightly different output each time and is occasionally wrong with total confidence. The expensive mistake runs both ways: paying a model on every run to do what a free filter step would do, or piling up keyword rules to sort customer emails that one AI step would read correctly.

Follow me on Instagram@sagnikteaches

A quick definition of terms. Rule-based automation means software that follows instructions you wrote: a trigger (a form is submitted), perhaps a condition (the service chosen is "alterations"), and an action (email the tailor). Booking systems, accounting software and tools such as Zapier, Make and Power Automate all do this. An AI step hands some text to a language model and uses what comes back.

Connect on LinkedInSagnik Bhattacharya

The test: can you write the rule down?

Take the task and try to write the instruction as a short list of "if this, then that" lines. Two things can happen.

Subscribe on YouTube@codingliquids

If the list fits on an index card and covers nearly every case, you have a rules job. "If the order status changes to Ready, text the customer the ready message" is complete. There's nothing to interpret.

If the list keeps growing, you're describing language. "If the email says 'collect' or 'pick up' or 'is it ready' or 'when can I come in', or mentions a ticket number, it's a collection question, unless it also says 'damaged' or 'missing', in which case..." That list will never be finished, because customers phrase things in endless ways. Reading intent from free text is what language models are good at, so that step is an AI job.

Run the index-card test on two jobs from an illustrative two-vet practice and the difference is plain. "Eleven months after a dog's last booster, email the owner the booster reminder" fits on the card in one line: the date sits in the practice software, the message never changes, and the job is finished. "Reply to owners who write in about a pet being unwell" can't be carded at all. One email says the cat "isn't herself", another lists three symptoms and a question about food, a third is really asking for a repeat prescription. That job needs reading, so it's AI territory, and the third check below then pushes it further, to a vet or nurse deciding every reply.

A second, faster check: look at the input. Dropdown choices, dates, amounts, ticked boxes and status fields are rules territory. Emails, messages, notes, reviews, PDFs and photos usually need AI to make sense of them.

A third check decides how much freedom the AI step gets: ask what happens when it's wrong. If a mislabelled email just lands in the wrong folder for an hour, AI can act alone. If a wrong answer would tell a customer their silk dress is safe to machine-wash, or issue a refund, the AI may draft but a person must decide. Sometimes the answer is to avoid AI entirely and change the input instead: adding a three-option dropdown to your contact form can turn an AI sorting job into a free, perfectly reliable rule.

Take an illustrative bike repair workshop whose website form had one box: "Your message". Every enquiry was free text, so sorting them meant AI or a person. The owner added a required dropdown above the box with four choices: "Book a service", "Quote for a repair", "Is my bike ready?" and "Something else". Now a rule sends service bookings to the diary, quote requests to the mechanic and "is it ready?" messages to a template that pulls the job status. Only "Something else" still needs reading. If that's one message in five, the AI step handles about 40 a month instead of 200, and the four routes that moved to rules can no longer be mislabelled at all.

How they compare on the criteria that matter

CriterionRule-based automationAI step
Input it handlesFixed fields: statuses, dates, amounts, form choicesFree text, emails, notes, documents, images
Same input, same output?AlwaysNot guaranteed; wording and sometimes the answer vary between runs
How it failsStops or skips when input doesn't match; usually visibleProduces a plausible wrong answer; easy to miss
Cost per runTiny; often inside your planModel usage on top, and more platform usage (see below)
Setup effortMinutes to an hour for simple flowsInstructions, examples and testing on real cases
Explaining a decisionPoint to the ruleHard; an AI's stated reasons aren't guaranteed to be its real ones
UpkeepChange the rule when the business changesRe-test when you edit instructions or the provider updates the model
Data exposureStays between your connected appsText goes to an AI provider; check its data terms

The "not guaranteed" row surprises many owners. Ask the same question twice and you may get two differently worded answers, occasionally with different conclusions. There are ways to reduce it, covered in why AI gives different answers each time, but you can't remove it completely. For anything that must be identical every time, rules win by design.

Jobs where plain rules win

  • Reminders on a fixed schedule: appointments, collections, renewals, unpaid invoices at 7, 14 and 30 days.
  • Status notifications: "your order is ready", "your delivery is booked for Tuesday".
  • Copying structured data between apps: a new web form submission into a spreadsheet or CRM.
  • Routing by a fixed field: if the customer chose "alterations" from a dropdown, send it to the tailor.
  • Recurring exports and backups: the weekly sales file saved to a shared folder.
  • Calculations with fixed inputs: totals, discounts at set thresholds, due dates. Spreadsheet formulas beat AI here every time.

Jobs where AI earns its place

  • Sorting free-text messages by what the customer wants, when there's no dropdown to rely on.
  • Pulling details out of unstructured text: names, dates, items and quantities from emails or PDFs.
  • Drafting replies that must respond to what the customer actually wrote.
  • Summarising long threads, supplier letters or meeting notes.
  • Tagging reviews or feedback by theme, such as speed, price or staff.
  • Turning rough notes into a standard format, such as a job record or handover note.

Extraction is the one owners underrate, because the AI's job there is to hand clean fields to a rule. Say a small café's suppliers email orders and changes in whatever form suits them. An instruction such as "Return supplier, item, quantity and delivery date as four labelled lines; write UNKNOWN for anything not stated" turns this email:

"Hi, sorry, we're short on oat milk this week so can only do 6 cases not 10, rest will follow on the 03/04 run. Cheers"

into something like this (illustrative output):

Supplier: UNKNOWN
Item: oat milk
Quantity: 6 cases
Delivery date: 3 April

Two things need fixing before a rule acts on it. The supplier came back UNKNOWN because the name was only in the email address, so pass the sender's address into the step as well. The date is wrong twice over: "03/04" is when the remaining four cases follow, not this week's delivery, and this supplier writes dates month-first, so it means 4 March. Tell the step to return any all-number date exactly as written, for a person to confirm, and add a "notes" field so a part-delivery like this has somewhere to go instead of being squeezed into the date.

If you'd like the underlying distinction in more depth, generative AI versus traditional AI explains why language models behave differently from older prediction software.

The hybrid pattern: rules around a small AI step

The strongest workflows use AI only where language has to be read or written, and hand everything else to rules. The AI's output is forced into a fixed list of labels so that rules can act on it reliably.

1. TRIGGER (rule)   New email arrives in the enquiries inbox
2. FILTER (rule)    Skip known supplier and no-reply addresses
3. AI STEP          Read the email. Return ONE label from:
                    COLLECTION, STAIN_QUESTION, ALTERATION_QUOTE,
                    COMPLAINT, OTHER. Also return: garment, deadline.
4. ROUTE (rule)     Send each label down its own path
5. SAFETY (rule)    COMPLAINT or OTHER -> straight to the manager,
                    no draft written
6. AI STEP          For COLLECTION and STAIN_QUESTION only:
                    write a draft reply and save it as a DRAFT
7. HUMAN            Staff read, edit and send

A classification instruction for step 3 can be as simple as this:

You sort emails for a dry cleaner. Read the email below and reply
with exactly one label from this list and nothing else:
COLLECTION | STAIN_QUESTION | ALTERATION_QUOTE | COMPLAINT | OTHER

Rules:
- Any mention of damage, loss, refund or compensation = COMPLAINT
- If the email fits none of the labels clearly, answer OTHER
- Do not guess. OTHER is always an acceptable answer.

Email:
{{email_body}}

Three design choices do the heavy lifting. The AI can only answer from a closed list, so the routing rules never receive something unexpected. There's always an escape label (OTHER) so the AI isn't pushed into a wrong guess. And nothing the AI produces is sent to a customer or moves money without a person in between. If you're planning that human step, setting up human review without slowing down covers how to keep it quick.

Testing the sorting step on 30 real emails

Before the AI step routes anything live, run it over 30 recent emails you've already sorted by hand and put its label next to yours. For the dry cleaner, the first run might come out like this (illustrative):

Your labelEmailsAI agreedWhere it differed
COLLECTION1212None
STAIN_QUESTION76One went to OTHER (acceptable)
ALTERATION_QUOTE55None
COMPLAINT43"Can I pick up my coat Friday? Also a button's come off" went to COLLECTION
OTHER22None

Twenty-eight out of 30 sounds good, but the two misses aren't equal. A stain question landing in OTHER just means a person reads it, which is what OTHER is for. A complaint labelled COLLECTION means an unhappy customer gets a cheerful "your coat is ready" draft. So judge the test on the costly mistakes, not the total. Here the fix is one line in the instruction ("if an email mixes a complaint with anything else, the label is COMPLAINT"), plus "button", "missing" and "come off" added to the damage examples. Re-run the same 30 and look only at the complaints.

The rules around the AI cost little or nothing to run. In Zapier, Filter and Paths steps don't use tasks, and neither do triggers. In Make, routers don't consume credits and a bundle passing through a filter doesn't either. So wrapping an AI step in rules adds safety without adding much to the bill.

A dry cleaner's jobs, sorted

Here's how an illustrative dry cleaner with two counters and a busy enquiries inbox might sort its work.

JobRules, AI or bothWhy
Text customers when an order is readyRulesA status change in the till system is a fixed event with a fixed message
Chase items uncollected after 30 daysRulesPure date arithmetic
Monthly invoices for business accountsRulesAmounts come straight from the ticket records
Sort about 150 inbox emails a monthBothFree text in, fixed labels out, as in the pattern above
Answer "can you get this stain out?"AI draft, staff sendNeeds reading; the honest answer depends on fabric and stain, so staff confirm
Damage and loss claimsHuman onlyMoney, liability and judgement

Three of the six jobs need no AI at all, and one should never have it. That ratio is typical, and it's a useful corrective to the idea that every process now needs an AI tool.

What the AI part costs

The model itself is cheap at this volume. An email plus the instruction above might be around 700 tokens (a token is roughly three-quarters of a word). At the Claude Haiku 4.5 API list price of $1 per million input tokens, 150 emails is about 105,000 tokens, or roughly 11 cents a month before the short outputs.

The platform charge matters more. As of September 2026, an AI by Zapier step uses 1, 3 or 5 tasks per run depending on the model tier you select. At the top tier, 150 emails would use 750 tasks, the whole monthly allowance of Zapier's entry Professional plan, before any other step ran. A simple labelling job rarely needs the top tier, so test the cheaper tier on 30 real emails first and only move up if accuracy suffers. For the full cost picture on a single process, see what it costs to automate one workflow with AI.

Signs you chose the wrong approach

Both mistakes are common, and both are fixable without starting again.

You used AI where rules would do if you're paying per run for a decision that never varies, if identical inputs occasionally produce different results, or if you can't explain why one customer got a different message from another. Fix it by moving the fixed part into a rule and keeping AI only for reading or writing text.

A typical case: an illustrative lettings office had an AI step write each month's rent reminder from the tenancy record, so the emails would sound "less robotic". It worked until a tenant forwarded one back asking why it said rent was due on the 5th when their agreement said the 1st. The model had varied the wording and, once, the date. Nothing in the run history flagged it, because the step "succeeded". The fix was a fixed template with the tenant's name, amount and due date merged in by a rule. It cost nothing per run and could no longer invent a date.

You used rules where AI was needed if your keyword list keeps growing, if an "Other" folder fills up every week, or if customers get the wrong template because they phrased a request unexpectedly. Fix it by adding one AI classification step at the point where the rules keep breaking, with a closed list of labels and an escape route to a person.

The mirror image looks like this. An illustrative phone repair shop sorted its inbox with email filters: "screen" went to screen repairs, "battery" to batteries, "water" to water damage. Within a year it had 19 filters, and the unsorted folder still collected around ten emails a week, because customers wrote "the glass is shattered", "it won't hold charge" and "dropped it in the bath". Each new phrase meant another filter, and filters started catching each other's emails ("my screen went black after it got wet"). Replacing the lot with one AI step that returns SCREEN, BATTERY, LIQUID, OTHER, then routing on the label, turned 19 fragile rules into four stable ones.

A good way to check is a monthly look at the run history in your automation tool. Rules that fail loudly show up as errors. AI steps that fail quietly don't, so sample ten AI outputs a month and compare them with what a person would have done. If you're still deciding which job to tackle first, what to automate first helps you pick one that suits either approach.

More on choosing between rules and AI

Is a website chatbot with buttons rule-based or AI?

A chatbot that offers fixed buttons and follows a decision tree is rule-based: every path was written by a person. An AI chatbot reads whatever the customer types and composes an answer. Many products mix the two, using buttons for common routes and AI for free-text questions, so ask the vendor which parts are scripted and which are generated.

Can AI help me write the rules themselves?

Yes. A chat assistant is good at turning a plain description such as 'remind customers 30 days after an item is ready if it hasn't been collected' into the conditions and fields an automation tool needs. You then build the rule and test it with real examples. The finished rule runs without AI, so you keep the predictability and low cost.

Will AI make rule-based automation obsolete?

Unlikely for the jobs rules already do well. A reminder that must go out exactly 24 hours before an appointment gains nothing from AI and gains risk. What is changing is that more workflows now include one AI step inside a rule-based route, so the two are becoming partners rather than rivals.

Further reads

Sources: Zapier help articles on task usage and AI by Zapier model tiers; Make Academy on credit consumption; Anthropic API pricing. Checked September 2026.

Want your workflow split into rules and AI properly?

On a 1:1 call we'll walk through one of your workflows step by step, mark which steps need rules, which need AI and which stay human, and check what your current tools can already do.

Book a 1:1 call with me