Overview
Cash-flow surprises kill small businesses — a late payment you didn't chase, a subscription that quietly doubled, an ad account that ran away with your money overnight. You can't watch your finances 24/7, but a simple AI-assisted monitor can flag the weird stuff and email you before it becomes a crisis. This tutorial shows you how to build one — honestly framed, because the internet is full of dangerous nonsense about "autonomous AI that manages your money."

Difficulty: Medium — light Google Sheets + a bit of script · You'll need: a Google account and an AI API key · Cost: a few dollars/month in API usage · Updated: September 2026
The One Design Rule That Keeps This Safe
There's a critical accuracy point most "AI finance" tutorials get dangerously wrong: large language models are unreliable at exact arithmetic. Ask an AI to "add up my expenses" and it will sometimes confidently give you the wrong number. So we split the job:

Get this split right and you have a genuinely useful tool. Get it wrong — trusting the AI to do the math — and you have a confident liar watching your bank account.
Who This Is For
Before You Start
1. Export, don't connect. You'll work from a downloaded CSV of transactions — never give the AI or script your bank login. It reads a copy; it has no path to your money.
2. Redact and protect. Strip full account numbers before analysis, and never hard-code your API key where it could be shared (use the script's secure properties, shown below).
Path A: The No-Code Version (start here)
Before automating anything, just do it once by hand — it takes two minutes and shows you the value:
1. Export the last 1–3 months of transactions from your bank as a CSV.
2. Open ChatGPT or Claude, upload the file, and prompt:
Here is a CSV of my business transactions. Do NOT do arithmetic in your
head — instead, describe: which expenses look unusually large versus the
others, any likely-missing recurring income, and any categories worth a
closer look. Flag things for me to verify; don't state conclusions as
fact. Keep it short and plain-English.
If that's all you need, you're done. Everything below just makes it automatic.
Path B: The Automated Monitor (Google Sheets)
Step 1: Get your data into a sheet
Export your transactions as CSV and import them into a new Google Sheet (File → Import → Upload). You want columns like Date, Description, Amount.
Step 2: Let formulas find the anomalies (this is the math part)
Add a couple of helper columns — no AI involved, so the numbers are exact. For example, flag any expense more than twice the average expense:
In a new column next to your amounts:
=IF(ABS(C2) > 2 * AVERAGE($C$2:$C$500), "⚠️ LARGE", "")
You can add more deterministic checks the same way: balance dropping below a threshold, an expected monthly payment missing, spend in a category up sharply. These are the facts your monitor acts on.
Step 3: Add an AI summary (the words part)
Now use AI only to turn the flagged rows into a readable heads-up. In Extensions → Apps Script, add a function that sends only the flagged rows to your AI and asks for a short summary:
javascript
function aiSummary(flaggedRows) {
const key = PropertiesService.getScriptProperties().getProperty('AI_KEY'); // stored securely
const prompt =
"These spreadsheet-flagged transactions were detected by formulas " +
"(the numbers are already correct). Write a 3-4 sentence plain-English " +
"heads-up for the business owner, grouping similar items and noting what " +
"to verify. Do not invent figures.\n\n" + JSON.stringify(flaggedRows);const res = UrlFetchApp.fetch('https://api.anthropic.com/v1/messages', {
method: 'post',
headers: { 'x-api-key': key, 'anthropic-version': '2023-06-01' },
contentType: 'application/json',
payload: JSON.stringify({
model: 'claude-haiku-4-5',
max_tokens: 400,
messages: [{ role: 'user', content: prompt }]
})
});
return JSON.parse(res.getContentText()).content[0].text;
}
Store your key safely once via Project Settings → Script properties (AI_KEY), never in the code itself.
Step 4: Email yourself, on a schedule
Add a function that gathers the flagged rows, gets the summary, and emails you — then set it to run daily under Triggers:
javascript
function runMonitor() {
const flagged = getFlaggedRows(); // rows your formulas marked ⚠️
if (flagged.length === 0) return; // nothing unusual: stay quiet
const summary = aiSummary(flagged);
GmailApp.sendEmail('you@example.com', 'Cash-flow heads-up', summary);
}
That's the whole thing: formulas find issues, AI explains them, you get an email. Nothing autonomous, nothing touching your money.
Common Mistakes to Avoid
Pro Tips
Key Takeaways
Upload an exported transactions file and ask Claude to flag unusual items in plain English — the fast, no-code way to start (read-only, you verify).
The free scripting layer inside Google Sheets used to schedule the monitor and send email alerts. No separate server needed.
Sources: Google Apps Script · Anthropic API · Claude
This article is educational and not financial advice. Never grant an AI tool the ability to move money, and consult a qualified accountant or advisor for financial decisions.