Back to all posts
AI Agents7 min read·November 22, 2026

Spreadsheet Script or AI Agent? A Quick Test for Owners

TB
ThynkBlox AI Team
AI Engineering

Should you use a Google Sheets script or an AI agent?

Use a script when the inputs are clean and structured and the rules can be written down in full. Use an agent when the inputs are messy, such as free text, photos or documents in varied formats, and a person currently has to interpret them. If you can write the rule as "if this, then that" without exceptions, a script is usually cheaper to run and easier to maintain.

The test below helps you decide one step at a time, rather than choosing a tool for the whole job.

What is the quick test?

Take one step in your spreadsheet work and ask four questions.

  1. Can you describe the input in a fixed shape? Same columns, same formats, same allowed values each time.
  2. Can you write the rule completely? Another person could follow it without asking you anything.
  3. Does the same input always deserve the same answer? No judgement, tone or context is involved.
  4. Is a wrong result easy to spot and cheap to fix?

If the answer to the first three is yes, write a script. If any of the first three is no because the input is untidy, the rule depends on reading meaning or the answer needs judgement, an agent may be justified. If the fourth is no, add a human check whichever you choose.

How do the two options compare?

QuestionRule-based scriptAI agent
Typical inputCells with fixed columns and formatsFree text, photos, scanned or varied documents
How the logic is definedYou write every ruleYou describe the goal, give examples and set limits
Same input, same outputYes, every timeNot always; needs testing and checks
Running cost in principleUsually small and predictableUsually grows with volume and input size, so it needs watching
MaintenanceUpdate when the rules or sheet layout changeUpdate when inputs drift, instructions change or the underlying model changes
Failure patternBreaks loudly when the layout changesMay return a plausible but wrong answer
Review neededSpot checks on rulesReview of uncertain or high-impact results

The failure pattern row matters most. A script that stops is easy to notice. An agent that is quietly wrong needs a deliberate check.

When is a script enough?

A script is enough when the work is repetition over tidy data. Typical examples are copying rows between tabs, flagging duplicates by exact match, sending a reminder when a date passes, or totalling figures by category from a controlled drop-down.

In these cases an agent adds cost and uncertainty without adding value. The rule is already known, so there is nothing to interpret.

A script also suits steps where you need to explain exactly why a result appeared. You can point to the line that produced it.

When do messy inputs justify an agent?

Consider an agent when the difficulty is in understanding the input, not in applying the rule afterwards. Examples include a customer message that mentions an order in its own words, a photo of a handwritten note, or invoices that arrive from many suppliers in different layouts.

A useful pattern is to split the step in two. Let the agent turn the messy input into structured fields, then let a script or fixed rules validate and act on those fields. This keeps the judgement-heavy part small. Choosing AI or rules for workflow steps covers this split in more depth.

For background on what an agent is, see the main blog's plain-English guide to AI agents.

What do three illustrative cases look like?

These cases are examples to show the reasoning. They are not measured results.

Case 1: Monthly stock reorder flags. A sheet lists item, quantity on hand and a reorder level typed by your team. The rule is "flag when quantity is below the level". Inputs are structured and the rule is complete. A script is the right choice.

Case 2: Orders arriving as chat messages. Customers write orders in their own words, sometimes with abbreviations, sometimes in two languages, sometimes with a photo of a list. Someone retypes them into a sheet. The reading is the hard part, so an agent can propose rows, and a script can check that each product and quantity exists before anything is saved. A person reviews rows the agent is unsure about.

Case 3: Supplier bills in mixed formats. Some bills are clean exports, others are photos or scans. A script handles the clean exports. The agent handles the rest. Both feed the same validation rules. This mixed design can cost less than sending every bill to an agent.

How should you think about running cost and upkeep?

A script costs mostly your time to write and fix. After that, running it is usually cheap and steady.

An agent has an ongoing usage cost that moves with how much work you send it and how large each input is. It also needs upkeep: sample checks, updated examples and a review when behaviour changes. Budget for these from the start, not after the first surprise.

To keep spending in check, read how to control the running cost of an AI agent. If you are unsure which task to start with, which process to automate first offers a way to rank candidates.

What mistakes should you avoid, and when does this test not apply?

Using an agent for a rule you could write. If the logic is fixed, the agent only adds variation.

Forcing a script onto messy input. Endless special cases in a script are a sign the real problem is interpretation.

Replacing the whole process at once. Change one step, compare results with the current method, then decide.

Skipping validation after the agent. Treat its output as a proposal until fixed checks pass.

Ignoring who maintains it. Name an owner for either option.

The test does not apply cleanly when a step carries legal, financial or safety consequences. There, keep a person in the approval path regardless of the tool. It also applies less well when volume is very low. If a task happens a few times a month, doing it by hand may be the sensible answer.

What are the common questions?

Can a script handle free-text cells?

Simple patterns can be matched, such as a fixed keyword or a known code. Once people phrase things in many ways, the rules multiply and break. That is the point at which an agent becomes worth testing against your real examples.

Is an agent always more expensive than a script?

Not always in total. A script that needs constant fixing consumes staff time. An agent has a usage cost and needs checks. Compare both on the real work, including upkeep, instead of assuming either is cheaper.

Can I use both together?

Yes, and for mixed inputs it is a sound default. Let the agent read the untidy input and produce structured fields. Then let a script validate those fields, write to the sheet and flag anything that fails a rule for a person to review.

How do I know the agent is good enough?

Collect a sample of your real inputs with the correct answers, run the agent on them, and review the misses. Decide in advance what error rate you can accept, and keep a human check on uncertain or high-impact items.

Ready when you are

Want to talk this through for your business?

Send us the process you are thinking about. You will hear back from an engineer, not a sales team.