1. Home
  2. /Cookbook
  3. /Finance

The Cookbook · 06

Finance

Daily revenue rollups, invoicing and AR, expense classification and receipt OCR, tax pre-prep, and cashflow forecasting.

20 min read · 10 recipes View as Markdown

Finance is the one section where the agent's job description is closest to "be my CFO's anxious junior analyst." Numbers in, numbers out, daily, no excuses. Most founders run their finances in a state of vague optimism because the actual reconciliation work is tedious — agents make it disappear. A few principles: Read-only first, write second. Banking, accounting, payment processors — agent gets read access immediately. Write access on a slow drip, with hard caps. Reconcile daily. Once a month is too late; once a quarter is malpractice. Daily is one Telegram message at 8am. Cashflow is a leading indicator, P&L is a lagging one. Build the cashflow forecast first. Never let the agent move money without explicit per-transaction approval. Drafts, never sends.

1. Daily Revenue & Financial Rollup

Tip 1.1 — Daily revenue rollup

What it does: Every morning your agent reads every source of revenue — Stripe, your bank, Shopify, your invoicing tool, your subscriptions platform — sums it for yesterday, computes MTD and YTD, compares against last month and last year, and sends you a clean 5-line summary. Why it wins: "How was yesterday?" is a question most founders can't answer in 30 seconds. With the rollup, you can. It's also a leading indicator — three consecutive subtarget days in a row tells you something's broken before the month closes. Tools: Stripe API, your bank API (Plaid, Mercury, Wise, etc.), Shopify/Lemon Squeezy/whatever processes payments, your accounting tool API (Xero, QuickBooks, Pennylane). How to wire it: 1. Connect each revenue source as read-only. 2. Daily cron 7am: agent pulls yesterday's totals from each source, dedupes (same dollar can hit Stripe AND the bank — match by transaction ID), and writes to a daily summary store.

3. Compute: yesterday total, MTD, MTD vs same day last month, YTD vs YTD last year, by

source mix. 4. Output: 5-6 line Telegram message. Big number first. Anomalies flagged. Example prompt to your agent: Build a daily-revenue skill. Every morning at 7am: pull yesterday's revenue from Stripe, Mercury (bank), Lemon Squeezy, and Xero. Dedupe by transaction ID and amount-within-1-min match. Compute: yesterday total, MTD, MTD vs same-day last month, YTD vs YTD last year, mix by source. Send me 5 lines on Telegram. Lead with yesterday vs the daily target. Flag any anomaly (single transaction > 2x median, source revenue down > 50% WoW). Watch out for: Same revenue counted twice across sources is a constant gotcha. Build the dedup rule carefully. Refunds and chargebacks. Net revenue ≠ gross. Decide which one you report on and stick to it. Bank balances lag 1-3 days behind. Don't trust same-day bank numbers. Skill file: revenue-tracker

Tip 1.2 — Subscription / MRR audit

What it does: Your agent watches every active subscription you have on the spending side, classifies them, and finds duplicates or zombies — paying for two of the same tool, paying for something nobody's logged into for 90 days, paying for the legacy tier when you've migrated. Why it wins: Every business over 18 months old has $400-2000/month of SaaS bleed. Agents find it because they actually look at every line item. The first audit usually pays for the agent for a year. Tools: Bank/card statements, the SaaS vendor APIs where available, an internal "who uses what" sheet. How to wire it: 1. Pull last 90 days of card and bank transactions. 2. Classify each recurring charge: SaaS (which tool), payroll, infrastructure, ops, etc. 3. For each SaaS, look up the last login or last API call if you have access. Flag dormant for 30+ days.

4. Cross-reference for duplicates by category: two project management tools, two

analytics, two domain registrars. 5. Output: ranked spend list with kill candidates flagged. Example prompt to your agent: Pull the last 90 days of transactions from Mercury and my Amex. Classify recurring charges into categories: SaaS / infrastructure / payroll / ops / other. For each SaaS, look up last user activity if I have admin access (otherwise mark unknown ). Identify: duplicate categories (two of the same tool type), dormant tools (no activity 30d+), and legacy tier overpayments. Output a ranked spend list with annual cost, category, last activity, kill recommendation. Don't cancel anything — surface the list, I'll decide. Watch out for: Some SaaS gets invoiced quarterly or annually. Don't miss it because it's not in last month's statement. Free trials that became paid without you noticing — usually the worst offenders. Some tools share an account login across the team. Last-activity-per-user matters more than last-activity-overall. Skill file: revenue-tracker

2. Invoicing & Accounts Receivable

Tip 2.1 — Invoice generation on deal close

What it does: The moment a deal closes (CRM event or signed agreement webhook), your agent generates the invoice using your template, pulls the engagement terms, fills in the line items, and stages it for send. Why it wins: The gap between "deal closed" and "invoice sent" is the single biggest determinant of how fast you get paid. Most teams have a 3-7 day lag. Agents close it to under an hour. Tools: Your invoicing tool API (Stripe Invoicing, Xero, QuickBooks, Pennylane, or your own template-to-PDF), your CRM, Google Drive or Dropbox for the file. How to wire it: 1. CRM webhook fires on stage = won or on signed-agreement event. 2. Agent loads the agreement / deal terms, fills the invoice template (line items, amounts, schedule, PO# if any). 3. Saves PDF and a Stripe invoice link, both staged for your review.

  1. On approval, sends to the client's billing contact. 5. Logs invoice ID + due date in the CRM. Example prompt to your agent: Listen for agreement_signed webhook. Load the agreement and deal record. Generate the invoice in Stripe Invoicing using invoice-template.md : line items, amounts, payment schedule, due date (Net 14 unless terms say otherwise). Save the PDF to Drive at invoices//.pdf . Stage the Stripe invoice in draft state and ping me to approve send. On approval, send to the billing contact from the agreement, log the invoice ID and due date back to Attio. Watch out for: Wrong billing contact = invoice goes to a void inbox. Always pull the billing contact from the agreement, not the salesperson's contact. Currency mismatches. Don't let the agent invoice in USD when the agreement is in EUR. Late fees and net-terms language has legal implications. Use approved template language. Skill file: agreements, google-workspace, pdf-proposal (same PDF-pipeline)

Tip 2.2 — AR chasing on schedule

What it does: Every overdue invoice triggers a reminder cadence — gentle at T-3 days before due, firm at T+5, escalation at T+14, final notice at T+30. Each draft is in your voice and references the actual deliverables. Why it wins: Most founders hate chasing money. The agent doesn't. Predictable cadence, predictable tone, way fewer "I forgot to remind them" $5k invoices sitting at 60 days outstanding. Tools: Your invoicing tool API, Gmail, your email voice skill. How to wire it: 1. Daily cron: agent reads every outstanding invoice and its due date. 2. T-3 before due: send a "heads up, invoice due Friday" friendly nudge. 3. T+1 to T+5: friendly reminder. 4. T+10: firmer "wanted to check in on this." 5. T+20: escalation including a call request. 6. T+45: final notice. 7. Every send is staged for approval the first 3 times you use it; on the 4th, you can let it auto-send for amounts below a cap.

Example prompt to your agent:

Every morning, read every Stripe invoice with status open or past_due . For each,
compute days-to-due (or days-past-due). Match against ar-cadence.json (T-3, T+1,
T+5, T+10, T+20, T+45). For triggered touches, draft the message in my voice using
email-followups skill, referencing the actual deliverables tied to the engagement.
Stage drafts. For invoices under $2k and clients with a prior on-time payment history,
auto-send T-3 and T+1 reminders. Everything else, ping me to approve send.
Watch out for:
Don't auto-send to your biggest client. They get a personal note.
Stripe's own reminders are blunt. Turn them off if you're running this loop or the client
gets duplicate emails.
A genuine billing dispute looks like a slow-pay. Let the agent flag "no reply 14 days after
T+5" for human handling.
Skill file: email-followups, stale-lead-blitz

3. Expense Classification & Receipt OCR

Tip 3.1 — Receipt OCR pipeline

What it does: You forward receipts to a dedicated email or drop them in a Drive folder. The agent OCRs them, extracts vendor, amount, category, and date, attaches them to the matching bank/card transaction, and files them in your accounting tool. Why it wins: Receipts are the worst part of running a business. The agent makes them disappear. Come tax time, every transaction has its receipt attached — no scrambling. Tools: Vision-capable LLM (Claude vision, GPT-4o, Gemini), an email forwarder (or Drive watcher), your accounting tool's attachment API. How to wire it: 1. Set up receipts@yourdomain.com that auto-forwards to a Drive folder, or just use a Drive folder directly. 2. Watcher: new file → agent OCRs. Extract: vendor, total, tax, date, category guess. 3. Look up the matching bank/card transaction in the last 30 days by amount + date proximity (±2 days). 4. Attach receipt to transaction in Xero/QB. Tag with category. 5. If no transaction match, flag for review — could be a personal expense or a delay in the card statement.

Example prompt to your agent:

Watch /drive/receipts-inbox/ . For each new file: OCR via Claude vision, extract
vendor / total / tax / date / suggested category. Search the last 30 days of Mercury and
Amex transactions for a match (amount ± $0.50, date ± 3 days). On match, attach the
receipt to the transaction in Xero and tag the category. On no match, move the file to
/receipts-needs-review/ and ping me on Telegram with a thumbnail.
Watch out for:
Foreign currency receipts. The OCR sees the local currency total; your card statement
has USD. Match on date + vendor name, not just amount.
Hotel receipts come in 4 weeks after the bill if the booking was prepaid. Don't auto-flag
old transactions as missing receipts too aggressively.
Personal expenses snuck onto the business card. Have the agent flag any vendor it
doesn't recognize for human review.
Skill file: google-workspace

Tip 3.2 — Transaction classification

What it does: Every bank/card transaction gets auto-classified into your chart of accounts. The agent learns from prior classifications — once you tag "AWS = infrastructure," every future AWS charge is auto-tagged. Why it wins: This is what your bookkeeper charges $300/month for. Agent does it daily, free. Tools: Your bank/card API, your accounting tool, a vendor-categories.json learned over time. How to wire it: 1. Daily: pull new transactions. 2. For each, look up vendor in vendor-categories.json . Hit → classify, push to accounting tool. 3. Miss → propose a category based on vendor name and recent classifications, ask you in Telegram once. 4. Your answer updates the JSON forever. 5. Confidence threshold: auto-classify only when ≥ 95% match (exact vendor + amount range). Else ask. Example prompt to your agent:

Every morning, pull new transactions from Mercury and Amex. For each: look up vendor in vendor-categories.json . On exact match, push the classified transaction to Xero. On no match, send me one Telegram message per transaction (vendor, amount, date, your guess) with a one-tap category picker. On my response, update the JSON and push the transaction. Keep vendor-categories.json versioned. Watch out for: Same vendor can mean different categories depending on amount (Amazon: $9 = supplies, $4000 = inventory). Train the agent on amount-ranged rules. Card statement descriptors are messy. "SQ *COFFEE SHOP" and "CoffeeShop LLC" might be the same vendor — fuzzy match. Tax categorization (deductible / non-deductible) is a separate axis. Don't blur it with operational categorization. Skill file: revenue-tracker

4. Tax Pre-Prep

Tip 4.1 — Quarterly P&L cleanup

What it does: End of each quarter, the agent runs a full P&L cleanup: every transaction tagged, every receipt attached, every category sanity-checked, every cross-period accrual flagged. Output: a clean P&L your accountant can use, plus a list of anything still messy. Why it wins: Tax season is hell because cleanup happens once a year on 12 months of mess. Quarterly cleanup makes it 4x smaller, 4x more accurate, and gives you real quarterly visibility into margins. Tools: Your accounting tool, the outputs of Tip 3.1 and 3.2. How to wire it: 1. Last business day of quarter: agent generates the cleanup report. 2. Checks: any uncategorized transactions, any transactions missing receipts, any unusual entries vs prior quarters (a 10x category swing without explanation). 3. Proposes fixes where it can; lists the ones it can't. 4. Sends the report to you and (optionally) your accountant. Example prompt to your agent: On the last business day of each quarter at 5pm: run a P&L cleanup pass. Pull the quarter's transactions from Xero. Flag: uncategorized, missing receipts, unusual category swings (> 2x or < 0.5x same quarter last year), duplicate entries. Propose

fixes inline. Generate the cleaned P&L PDF and a separate "needs review" sheet. Email both to me and CC my accountant. Don't make changes in Xero without my approval. Watch out for: Accrual vs cash accounting differs. Make sure the agent knows which method you use. Cost-of-goods-sold items get misclassified as operating expenses constantly. Sanitycheck the COGS line every quarter. One-off events (a big software purchase, a refund) skew quarter comparisons. Tag them as one-offs so the agent doesn't flag normal quarters as "unusual." Skill file: revenue-tracker, google-workspace

Tip 4.2 — Contractor / 1099 tracking

What it does: Throughout the year, your agent tracks every payment to every contractor and freelancer. End of year, it generates the 1099 worklist: who got paid what, mailing address on file, W-9 status, ready for your accountant to file. Why it wins: Most founders end the year scrambling to remember every Upwork person they paid. The agent has been tracking since January. Tools: Your payment rails (bank, PayPal, Wise, Deel, Upwork, Stripe Connect), a contractor registry. How to wire it: 1. Per contractor, store: legal name, address, W-9 on file (yes/no), country, payment rails used. 2. Throughout the year, every contractor payment gets logged with category. 3. End of November, the agent runs the 1099 readiness check: who's over the $600 threshold, who's missing W-9, what needs collecting. 4. Drafts the "send me your W-9 by Dec 15" emails to anyone missing. 5. Mid-January, exports the 1099 worklist for your accountant. Example prompt to your agent: Maintain contractors.json with each contractor's legal name, address, W-9 on file, country. Whenever I pay a contractor (Mercury, Wise, Deel, Upwork, PayPal), log the payment with date, amount, category. Every Nov 15, run the 1099 readiness check: list contractors > $600 paid YTD, missing W-9, or US-based without an address. Draft W-9 request emails for the missing ones. On Jan 10, export the 1099 worklist as a CSV and email it to my accountant. Watch out for:

Foreign contractors don't get 1099s but they might need W-8BEN. Track that separately. Single-member LLCs taxed as disregarded entities: 1099 goes to the individual, not the LLC. Get this right. Don't assume an Upwork payment is to a US contractor without checking. Skill file: revenue-tracker, email-followups

5. Cashflow Forecast

Tip 5.1 — 13-week rolling forecast

What it does: Your agent maintains a 13-week rolling cashflow forecast. Inputs: known incoming (signed contracts, expected renewals, recurring), known outgoing (payroll, recurring SaaS, expected vendor invoices). Output: weekly cash position projection, with min and max bounds and a "weeks of runway" number. Why it wins: Most founders run on bank balance, which is a snapshot, not a forecast. The 13-week rolling forecast is what every real CFO runs. It tells you when you can hire, when you can't, and when you need to chase AR aggressively. Tools: Your accounting tool, your CRM (for signed contracts), your subscription tracker, your payroll system. How to wire it: 1. Weekly cron Sunday night. 2. Agent pulls: current cash, signed contract revenue with payment schedules, recurring revenue, recurring outflows (payroll, rent, SaaS), one-off outflows from the pipeline (planned hires, planned capex). 3. Projects week-by-week for 13 weeks. 4. Computes: end-of-week balance per week, min projected balance over 13 weeks, weeks of runway at current burn. 5. Output: a Telegram message + a sheet link. Highlight any week the balance drops below threshold. Example prompt to your agent: Build a cashflow-forecast skill. Every Sunday at 6pm: pull current cash (Mercury + Amex available credit), signed contract income with payment schedules (Attio + Stripe Invoicing), recurring revenue (Stripe subs), recurring outflows (payroll, rent, SaaS list, debt service), planned one-off outflows (hires, capex from plans.md ). Project 13 weeks forward. Output: end-of-week cash per week, min over 13 weeks, weeks of

runway, weeks where balance < $50k threshold. Send Telegram with the headline and a link to the full Google Sheet. Watch out for: Confidence-weight pipeline revenue. A "signed contract" is 100%; a "verbal yes" is 30%. Don't double-count. Tax payments. Quarterly estimated taxes are big lumpy outflows — make sure they're in the model. Seasonality. December often has lower revenue and higher costs. The model should know about your seasonality. Skill file: revenue-tracker, google-workspace (for the Drive sheet)

How it all stacks

Finance is a daily, weekly, quarterly, yearly cadence. The agent runs each tier on schedule. Daily: revenue rollup (1.1), transaction classification (3.2), receipt OCR (3.1), AR chasing (2.2). Weekly: cashflow forecast (5.1). Per event: invoice on close (2.1). Monthly / quarterly: subscription audit (1.2), P&L cleanup (4.1). Yearly: 1099 tracking + tax pre-prep (4.2 + 4.1 culmination). Install order:

  1. Daily revenue rollup (Tip 1.1). Smallest install, immediate signal value.
  2. Transaction classification + receipt OCR (3.1 + 3.2). Together they kill 80% of bookkeeping busywork.
  3. AR chasing (Tip 2.2). Pays for itself the first month.
  4. Subscription audit (Tip 1.2). One-time win of $400-2000/month back.
  5. Invoice on close (Tip 2.1). Once your deal volume is high enough to feel the lag.
  6. Cashflow forecast (Tip 5.1). As soon as you have recurring revenue worth forecasting.
  7. 1099 tracking (Tip 4.2). Install in January, not December.
  8. Quarterly P&L cleanup (Tip 4.1). Once the daily classification is solid. Keep the agent on read access for as long as possible. Write access (sending invoices, posting to the GL) earns its way in one capability at a time.

Hiring & Team

Newsletter

Get the next one in your inbox.

One short email a week. Operator takes on AI agents, no hype.