Google Sheets as a Bot Database: What Broke at 85% of the Cell Limit
Our bots wrote to one Google Sheet for a year. It hit 85.5% of the cell limit and 20,000 volatile formulas. The audit, what we kept, and the fix.
If you run a small company, your database is a Google Sheet. You can pretend otherwise. You can say “Postgres” in meetings. But somewhere there’s a sheet called something like Claims DB (REAL) v3 FINAL and the whole company runs on it.
Ours is the Claims DB. Every customer complaint we’ve ever handled is a row: who, what, which product, which supplier, how much it cost us. Humans wrote the rows for years. Since 2026 a bot writes most of them. This is what a year of bot writes did to that sheet, how we found out, and the layout that stopped the bleeding.

The symptom
The sheet got slow. Then “slow” became “freezes for twenty seconds when you type a letter”. Then the Apps Script that validates entries started timing out, which it announced by simply not running.
Everyone’s first guess, including mine, was “too many rows”. That was wrong, and the way it was wrong is the useful part.
The audit

Google Sheets caps a file at 10 million cells, and performance gets grumpy well before that. We were at 85.5%. The claims themselves were under 10,000 rows. Three things explained the rest:
1. Formulas in every row, and whole files imported. The claims tab carried 54,129 per-row formulas, copied down past the last row of data so that “new rows would just work”. Other tabs imported the entire order history (3.3 million cells, growing about 17,000 a day) and the entire customer file, with IMPORTRANGE.
2. 20,320 of those formulas were volatile (INDIRECT() for a dependent dropdown, and a self-referencing NOW() timestamp), so every keystroke anywhere recalculated all of them. That was the freeze. How we counted them and the three formula changes that fixed it are in volatile formulas killed our Google Sheet; this post is about the layout that stops it coming back.
3. Deleting old data would have done nothing. The obvious fix was to archive an old, inactive group of rows. The numbers said it would free 0.7%. Claim rows were never the problem. Formulas and imports were.
What we decided to keep
One supplier stopped trading with us in September. Their rows were the obvious candidates for deletion. We ran the numbers first: that supplier accounted for 13% of our total recorded loss cost. Delete them and every loss analysis after that day is quietly wrong. So they stayed, and the archive rule became: rows leave the sheet only when they leave the analysis too. Age isn’t a reason. Irrelevance is.
The layout that fixed it
The sheet now has one explicit split that every bot and every human follows.
Input columns (fifteen of them). Date, customer id, company, product id, product name, quantity, unit, cause category, detail, resolution, amount, supplier, handler, chat link, note. These are the only cells a bot or a person may write. Plain values. No formulas. If you type a formula here, the sheet will be fine and your colleagues will not.

Formula columns. Everything derived: lookups into the customer and product tables, cost calculations, month buckets, dashboard flags. Formulas exist only in rows that have an input, as ARRAYFORMULA-style ranges rather than dragged-down copies. No volatile functions in the claims tab; the only two TODAY()s live on a dashboard tab, like dangerous animals in a well-labelled enclosure.
Three numbers are the truth. For any claim, the cells that matter are the quantity, the amount, and the loss cost. Every other number is derived from those. When a report disagrees with the sheet, or two columns disagree with each other, the question is always “what do those three say?” and the argument ends. This sounds obvious. It wasn’t, because the sheet had collected five different “amount” columns over the years and nobody could say which one the settlement actually used. Naming the three ended that in an afternoon.
The id is the truth; the name is what we called it then. Products get renamed in our operations system, because someone in merchandising had an idea. The sheet’s product id is the column everything joins on. The name next to it is filled from the system when the row is written, and old rows keep the name they were logged with, so a claim from August still reads the way the customer described it. A lookup tab follows the system’s current names for new rows. Storing only the name as typed, which we did for years, meant the same product appeared under four spellings in every report.

How the split is enforced. The fifteen input columns have a coloured header; derived columns don’t, so you can tell at a glance where you’re allowed to type. Derived columns are protected: warning-on-edit for humans, no write access at all for the bot’s service account (which has its own list of walls). A “how this sheet works” tab lists the fifteen, the three numbers, and the one volatile cell. New hires read it. The bot’s prompt quotes it. Nobody has to remember it.
What goes wrong without it. Every one of these happened to us, some of them twice:
- Someone adds a formula to an input column “to help”. The bot overwrites it. Or doesn’t, and the row is half formula, half value, all confusing.
- Someone types in a derived column. It works for that row, and the
ARRAYFORMULAabove it silently stops filling for every row below. Nobody notices for a week. - Two columns both look like “the amount”. The export picks one. The dashboard picks the other. Finance picks a fight.
The bot-specific rules
Letting a bot write rows surfaced problems no human writer ever caused, because humans are lazy in predictable ways.
Dropdowns must stay dropdowns. One column has a category dropdown whose allowed values depend on another column. The bot kept writing values that looked right and weren’t on the list (“Wrong item delivered” instead of “Wrong item”), and data validation quietly flagged thousands of cells. The fix was on the bot’s side: it may only write a category it learned from existing rows, and if it can’t find a match it leaves the cell blank for a human. The dropdown is the schema. The bot conforms, or it abstains.
Two columns must agree, instantly. The customer’s id and company name have to match, as do the product’s id and its name. An onEdit trigger fixes the paired column the moment either changes. Then someone pressed Undo, which reverted one of the pair and not the other, and nothing flagged it. A one-minute reconciliation job now compares the pairs and repairs mismatches, with the id column defined as the master. (That one gets its own post, because Undo deserves it.)
The bot waits for context it can’t see. No company on the customer’s profile yet means a pending row and a retry every ten minutes, never a guess. (That and the other logging rules are in 20 rules an AI support logger needs.)
New rows get five seconds, new companies get five minutes. The lookup columns auto-fill on a short delay after a bot write, because the bot writes in bursts and the sheet needs a moment to breathe. For a company that has never appeared before, a second pass runs five minutes later, after the customer table has caught up.
The schedule that keeps humans and bots apart
The bot’s batch write runs at 03:00. The unshipped-orders bot runs at 05:00. Humans arrive at 09:00. That isn’t about load. It’s so a human never sees a half-written row, and the bot never arm-wrestles a human for the same cell.
What I’d do differently
- Put the input/formula split in place on day one. Retrofitting it onto a live sheet that forty people use took a weekend and more nerve than I’d like to admit.
- Never drag a formula to the bottom of a sheet. Ever. Not even “just this once”.
- Decide the archive rule before you need it, and base it on what the data is for, not how old it is.
Google Sheets is still the right database for us. The team can read it, fix it and filter it without filing a ticket with anyone. The limits are real, but every one we hit was a layout mistake, not a Sheets mistake.
Next: the bot that writes those rows, built from closed support chats.
One line from me
The sheet didn’t need fewer rows. It needed fewer formulas and a rule about who types where. Write the rule before the bot starts writing.
The walls the bot’s service account runs into when it writes here are in five service-account walls I hit.
More on this topic: the Google Sheets as a database guide, with every post in reading order.