What we tested

This is our own test, run on my laptop on November 21, 2026, on synthetic data. A program generated 500 vendor invoice emails and 500 customer emails to a made-up heating and plumbing company, with no real people, vendors, or messages in it. The invoices came in 12 layouts, from tidy summary blocks to tradespeople's short notes. An invoice counted as right only if the invoice number, date, vendor, and total were all right. The emails had to be sorted into billing, scheduling, complaint, sales lead, or other.

We tried three ways of doing each job:

  • A script. An AI coding agent (Claude Code) wrote an ordinary rules-based Python script. Once it's written, no AI runs.
  • AI on every item. Each email goes to a model with the same instructions. We used two budget models on Ollama's cloud service, glm-5.3-flash and gpt-oss:120b, plus a 50-item sample per task on Anthropic's Claude Haiku 5.5.
  • A hybrid. The script runs first and flags anything it isn't sure of. Only the flagged items go to the AI.

About half of the test wording was written after the scripts were finished and locked, so the scripts met it cold, the way a script meets a new vendor's invoice in a real inbox. The AI calls ran on my flat-rate Ollama Pro (the older version of that plan) and Claude Pro subscriptions, so they cost nothing extra. For the figures below, we priced every call at the vendors' published per-token rates.

The AI-written script broke on wording it hadn't seen

Writing both scripts took the AI agent about four minutes. On mostly familiar wording, the invoice script got 90.1% right and the email sorter 97.4%. On wording they'd never seen, those fell to 34.1% and 37.4%.

The AI models handled the new wording. glm-5.3-flash got 99.8% of invoices and 98.4% of emails right, including every layout that broke the script, and Haiku got 49 of 50 in each task's sample. The other Ollama model, gpt-oss:120b, got 94.8% of invoices, and every miss was in the vendor field.

The script's failures were ordinary. Two layouts, utility e-bills and pipe-table notices, scored zero because they labeled the invoice number in a way the script didn't know. Once the agent saw the failures, it fixed both scripts in about a minute and a half, and the fixed versions scored 98.8% and 99.4% on a fresh set. That set used the same kinds of wording the fix was made on, so it shows what a fix buys you: the formats you've already seen. The next new layout breaks it again.

What the AI calls cost

Very little. All 2,116 calls to Ollama's cloud come to $0.29 at Ollama's own per-token prices. At Ollama's listed $0.15 per million input tokens and $0.50 per million output for glm-5.3-flash, 1,000 invoices cost about 20 cents (our arithmetic on measured tokens).1

Premium models cost more. Anthropic lists Claude Haiku 5.5 at $0.10 per million input tokens and $0.50 per million output for prompts up to 100,000 tokens, and Claude Sonnet 5.5 at $2 and $10, twenty times as much.2 By default, Sonnet runs at high effort with adaptive thinking, where it decides when and how much to think.3 At Sonnet's rates, 1,000 invoices come to about $2.34 with the little thinking Haiku did, or about $4.09 if it thinks as much as glm-5.3-flash did (our arithmetic). We didn't measure Sonnet's accuracy.

About half of what you'd pay for is thinking you never see. Both Ollama models reason before answering by default. That reasoning was 84% of the output text on invoices and 96 to 97% on the email sorting, which at Ollama's prices comes to roughly 55% of the bill for invoices and 41 to 47% for sorting (our arithmetic). Anthropic's docs say that at lower effort, "Claude can skip thinking entirely for simpler problems."3 If your tool lets you turn effort down for a simple sorting job, try it and check the answers. We didn't test that.

A flat-rate plan changes the math again. Ollama moved to per-token pricing on August 31, 2026: a new Pro plan is $20 a month and includes $60 of usage at those rates. Existing subscribers may keep the old plan while it auto-renews unchanged.4 At this test's token counts, $60 would cover about 306,000 invoices or 927,000 emails a month, ignoring rate limits (our arithmetic).

When the choice doesn't matter in money

At small-office volumes the token bill is a rounding error next to people's time. A minute of someone's time at $50 an hour is $0.83, which buys more than 4,000 invoice calls to a budget model (our arithmetic).

The real cost is a person's time to build and maintain each setup. Our cost model guesses two hours to set up the script against one for a prompt, and an hour a month of upkeep against half an hour, at $50 an hour. On those guesses, the script costs about $58 a month to own and AI on every item about $29 at small volumes, almost all of it people's time. Add a person checking each item the fixed script flags, at a minute each, and 1,000 invoices a month costs about $192, against $29 to $33 for AI on every item (our arithmetic).

This is where you trade money for time: a fraction of a cent per item instead of the hours a script needs to keep up with every new format.

When it starts to matter

Money, at high volume or premium prices. On upkeep alone, if the script needs half an hour more a month than a prompt ($25 of someone's time), the budget model's token bill passes that at about 128,000 invoices a month. At Sonnet's prices it passes it at about 6,100 with glm-5.3-flash's thinking, or 11,000 with Haiku's (our arithmetic). Below those volumes, money isn't a reason to choose the script.

Time, usually sooner. On my laptop, the script took 14 milliseconds per invoice and 0.3 milliseconds per email. One AI call took 0.4 to 1.3 seconds on average on the Ollama models and 1.3 to 1.6 on Haiku, and the slowest took up to 13 seconds. That's fine for invoices processed overnight and slow for a customer waiting on a chat reply. At 100,000 invoices a month, the script finishes in about 23 minutes, while one-at-a-time AI calls would take about 37 hours (our arithmetic). Parallel calls or a batch service would change that. Anthropic's Batch API is half price, with "most batches completing within 1 hour."25

Reliability and audit, whenever a wrong answer is expensive. A November 17 AWS guide says that with a model call, "a temperature of 0 makes varied answers less likely, but it doesn't guarantee identical output." Its comparison table says a rule "sits in source control," while a model call is "harder to explain to an auditor."6 A rule fails the same way every time, so you find the problem once. A model gets a small share of items wrong, so every AI step needs a check after it.

This is where you trade time for money: setup time on a script and its tests, so each item costs nothing and finishes in milliseconds.

The hybrid works only if the script admits what it doesn't know

With the first version of the script, the hybrid scored below AI alone on the same items in both tasks: 96.0% of invoices against 99.8%, and 98.0% of emails against 98.4%. The script handed half the items to the AI, but 19 invoices it was sure of were wrong, and those went straight through.

After the fix, the script handed off 16% of invoices and 7% of emails. On a fresh set, the hybrid got 100.0% of invoices and 99.6% of emails right with 84 to 93% fewer AI calls. That set differs from the one AI alone was scored on, and on invoices the gap is one invoice in 500. At 100,000 invoices a month on the budget model, the hybrid costs a little more than AI on every item, about $64 against $49, but it finishes in about 6 hours instead of 37. At Sonnet's prices with glm-5.3-flash's thinking, it's about $126 against $438 (our arithmetic).

That's the version I'd build, with one condition: the script has to flag what it doesn't recognize. A script that guesses on a new layout sends its mistakes straight past the AI. Keeping the AI as one step in a workflow you own also makes it easier to change vendors, which I cover in how to rely on one AI agent and still be able to leave.

Let AI build the automation, then test what it built

An AI agent wrote our scripts in minutes. The catch is the 34%. Test what the AI writes on real samples it hasn't seen before you trust it, and make it flag anything unfamiliar.

The automation platforms have this built in. Describe what you need to Zapier's Formatter with AI, still in beta, and "Zapier will draft the relevant Formatter step for you."7 In a Classic Zap, Formatter steps use no tasks.8 Zapier's newer Next Gen Zaps began using tasks on December 1, 2026, so check how yours is billed.9 n8n's assistant builds workflows too, and n8n's docs say it "can make mistakes. Always review generated workflows before using them in production."10 AWS tells developers to "let a model write the rule once instead of running it every time," then review it and commit it.6

If you're on Zapier and do add an AI step, check its tier. AI by Zapier steps cost 1, 3, or 5 times the tasks per run by model tier, and a new AI step on a paid plan "defaults to Premium," the 5x tier.11 Zapier pitches its 1x Standard models at "simple, high-volume work like classification, extraction, and short summaries."8

What this test can't tell you

The data is synthetic, and the same AI wrote both the data and the script. Real inboxes have scanned PDFs, attachments, long forwarded threads, and other languages. It covers two tasks, and some of our answer labels are arguable. The script-writing times are an AI agent's, and the human hours in our math are guesses.

The dollar figures are arithmetic on measured tokens at list prices as of November 22, 2026, not bills. Speed comes from one laptop on one evening. We counted errors but didn't price them, because only you know what a wrong invoice entry costs your business.

Other studies, on other tasks, have come out differently. In a November 2025 JAMIA Open study that pulled a standardized breast-imaging score from German-language radiology reports at two Swiss hospitals, regular-expression rules were about as accurate as a local AI model and ran thousands of times faster.12 In an October 2026 preprint on a public set of IT support tickets, a small classifier trained on 33,486 labeled tickets sorted 87.9% correctly, against 47.7% for the best prompted AI setup, which got only the category names and up to 24 examples. The authors say that gap "is not, however, a pure capability comparison."13

A decision rule for your next automation

Before you add an AI step to a workflow, or replace one with rules, I'd go down this list:

  1. Count the items. Under a few thousand a month, use whatever takes the least of your time to set up and keep working. A budget model costs pennies at that volume.
  2. Look at where the input comes from. If it arrives in a few fixed formats you control, like your own web form or one system's export, use rules. Have an AI write them, then test them on real samples they haven't seen.
  3. If many different people or systems write the input, like vendor invoices or customer email, a cheap AI model beat the rules by a wide margin in our test. Put a check after it: allowed values, totals that add up, a vendor name that's on your list.
  4. If someone is waiting on the answer, time a few real calls first.
  5. If you have to explain each decision to an auditor, or need the same answer every time, keep that step as a rule.
  6. Above tens of thousands a month, go hybrid. Rules first, AI for whatever the rules flag, and make sure the rules flag what they don't recognize. On a budget model that buys speed; at premium prices it saves money too.
  7. Check whether your plan is flat-rate or metered, whether the model thinks by default, and on Zapier, which tier your AI step is on. Test two models on a few hundred of your own items before you commit.

The Bottom Line

  • In our test, an AI call on a routine office job cost a fraction of a cent. At small-office volumes, people's time to build and maintain the automation is the real cost.
  • A script an AI wrote in minutes got about a third right on wording it hadn't seen. The budget model we relied on got 99.8% of invoices and 98.4% of emails right.
  • On our assumptions, money starts to matter around 6,000 to 11,000 invoices a month at premium prices and 128,000 at budget prices. Speed and audit can matter much sooner.
  • The setup I'd build uses both: a script that flags what it doesn't know, with AI on the leftovers. Once its script was fixed, it matched AI alone with 84 to 93% fewer calls.

Sorting out which steps in your workflows need an AI call and which need a plain rule, then testing both on your own invoices and emails, is work I do with owners. Connect with me on LinkedIn.

Keep reading: When it's cheaper to build your own software covers where AI-assisted building pays off. OpenClaw + n8n covers the same split for agents: let the AI decide, and let a fixed workflow do.

Sources

Accuracy, token counts, speeds, and run times are our own measurements from the test described above, run November 21, 2026. Dollar figures marked "our arithmetic" combine those measurements with the list prices below, accessed November 22, 2026.

  1. Ollama per-token prices and plans. "Prices are per million tokens." Ollama pricing, accessed November 22, 2026.
  2. Claude API prices and Batch discount. Anthropic, pricing, accessed November 22, 2026.
  3. Effort and thinking, including Sonnet 5.5's defaults. Anthropic, effort, accessed November 22, 2026.
  4. Ollama's August pricing change. "Pro: $20/month, includes $60 of monthly usage." Ollama, "Ollama's transparent pricing", August 31, 2026, accessed November 22, 2026.
  5. Batch turnaround. Anthropic, batch processing, accessed November 22, 2026.
  6. Rules versus model calls. AWS Machine Learning Blog, "Cut generative AI costs: Code for rules, models for judgment", November 17, 2026. AWS sells both rule services and model hosting.
  7. Formatter with AI. Zapier Help Center, "Use Formatter with AI to automatically format data", updated April 10, 2026.
  8. Zapier task rates. Built-in tools, "Formatter, Paths, Filter, Delay, Looping, Sub-Zaps, Digest, Zapier Manager, Storage, and Tables": "0 tasks." Zapier, task usage rates, accessed December 4, 2026.
  9. Next Gen Zap billing. "Your Next Gen Zaps and Zapier SDK calls use tasks." And: "Zapier did not bill or record task usage for Next Gen Zaps before 12:00 PM ET on December 1, 2026." Zapier, "How Next Gen Zaps and the Zapier SDK are billed", accessed December 4, 2026.
  10. n8n Assistant. n8n Docs, "Use n8n Assistant", November 13, 2026.
  11. AI by Zapier tiers. Zapier Help Center, "AI by Zapier model tier pricing", updated November 19, 2026.
  12. Regular expressions versus an AI model on radiology reports. "accuracy of 89.20% for Regex vs 87.69% for the LLM-based method; P = .56." "A comparative performance analysis of regular expressions and a large language model-based approach to extract the BI-RADS score from radiological reports", JAMIA Open, November 12, 2025.
  13. Prompted AI models on IT support tickets. "The strongest prompted configuration reaches 0.477 accuracy on a stratified 1,000-ticket test subset, versus 0.879 for fine-tuned DistilBERT on the same tickets." "Cost-Aware Abstention for LLM-Based IT Ticket Classification", arXiv preprint, October 22, 2026, with its full text.