AutomationIntermediate13 min read

Build a Read-Only AI Cash-Flow Monitor (That Never Touches Your Money)

Build a safe, read-only AI monitor that watches your exported transactions and emails you when something looks off. Formulas do the numbers, AI does the words — it never moves money. Not financial advice.

Build a Read-Only AI Cash-Flow Monitor (That Never Touches Your Money)

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."


Build a read-only AI cash-flow watchdog: it watches a copy of your transactions and raises an alert — it never touches your money.
Build a read-only AI cash-flow watchdog: it watches a copy of your transactions and raises an alert — it never touches 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:

  • The spreadsheet does the numbers — averages, thresholds, totals, "is this more than 2× normal?" These are deterministic formulas that are always right.
  • The AI does the words — categorizing a vendor, writing a plain-English summary, explaining why something looks odd.
  • The safe design: the spreadsheet computes the numbers with formulas, the AI adds plain-language categories and a summary, and you review the alert.
    The safe design: the spreadsheet computes the numbers with formulas, the AI adds plain-language categories and a summary, and you review the alert.

    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

  • Freelancers and small business owners who can't manually review their finances every week.
  • Solo operators who want an early warning for late payments, runaway spend, or a low balance.
  • Anyone who wants automation without ever handing an AI access to actually move money.
  • 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


  • Letting the AI do the arithmetic. It will occasionally be confidently wrong. Compute every number with a formula; use AI only for language.

  • Treating flags as facts. A flag means "look at this," not "this is a problem." You verify and decide — always.

  • Giving anything write access to money. Read-only, full stop. No tool in this tutorial should be able to pay, transfer, or trade. That would be both unsafe and, frankly, reckless.

  • Over-alerting. If everything is an alert, nothing is. Tune thresholds so you only hear about the genuinely unusual.

  • Leaking sensitive data. Redact account numbers; keep your API key in script properties, not in shared code.
  • Pro Tips

  • Start with one check. Just "unusually large expense" is a useful monitor on day one. Add more later.
  • Keep a human ritual. A five-minute Monday review of the week's alerts beats pretending it's fully hands-off.
  • Ask the AI to flag uncertainty. End prompts with "note anything I should double-check with my accountant."
  • Separate accounts help. Monitoring a dedicated business account produces far cleaner signals than a mixed personal one.
  • For real decisions, use a human. This tool spots things; a bookkeeper or accountant interprets and acts.
  • Key Takeaways

  • You're building a read-only early-warning monitor — it watches a copy of your transactions and alerts you. It never moves money, and this isn't financial advice.
  • Split the work: formulas do the numbers (exact), AI does the words (categories + summary). Never let the AI do the arithmetic.
  • Start no-code (upload a CSV to ChatGPT/Claude), then automate with Google Sheets + a small script if you want it recurring.
  • Guard your data and access: export don't connect, redact account numbers, store keys securely, and keep everything read-only.
  • You stay in control. AI flags; you verify and decide — with a real accountant for the calls that matter.
  • Claude — analyze a CSV of transactions

    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).

    claude.ai
    Google Apps Script — automate your Sheet

    The free scripting layer inside Google Sheets used to schedule the monitor and send email alerts. No separate server needed.

    developers.google.com

    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.

    Learn AI, after work

    Track your progress, earn XP, and unlock more free tutorials in the AfterWork Bytes app.

    Open this tutorial in the app

    More AI tutorials