When should you use it?
- Invoices arrive as email PDFs and someone retypes them into a sheet
- You want a rough live view of income and spend without a full accounting suite
- You can keep a human check on odd amounts
Not for: Filing taxes or posting to the general ledger without an accountant; Trusting OCR on blurry scans without a review step
What do you need, and what do you get?
You need
- A mailbox the workflow may read
- A Drive folder for original PDFs
- A sheet with Transactions and a simple dashboard tab
- Category list you actually use
You get
- One row per invoice with party, amount, date, category and link to the PDF
- A short list of items held for review
- Dashboard totals that refresh from the sheet
How does it work, step by step?
- Filter for real invoicesTrigger on new mail with attachments; drop messages that are not invoices before OCR.
- Store then readSave the PDF to Drive, run OCR, then classify income vs expense.
- Extract into columnsPull party, amount, date and description into the Transactions tab with a link back to the file.
- Hold weak extractionsIf confidence is low or fields are missing, park the row for you instead of guessing.
The prompt
Our own prompt, inspired by u/alexsafari1 on r/n8n and written to work in n8n, ChatGPT and Claude. Values in lime are placeholders.
Fill in the blanks (optional; the copied prompt uses your values)
You extract bookkeeping fields from an invoice email and its OCR text. Email subject/body: {email_text} OCR text: {ocr_text} Allowed categories: {categories} Return JSON: party, amount, currency, date, direction (income|expense), category, description, confidence (0-1), needs_review (bool), reason. If amount or party is unclear, set needs_review true and do not guess. Never invent a total.
Inspired by u/alexsafari1 on r/n8n: I Built an AI Accountant in n8n That Turns Email Invoices into a Real-Time Financial Dashboard. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- OCR misses handwritten or photo invoices. Route those to review.
- Dashboard math is only as good as your categories; keep the list short and stable.
Our take
This is a believable first finance automation because it stays close to the mailbox and a spreadsheet. The poster's path (filter, OCR, classify, extract, append) matches how a careful junior would work, and the walkthrough makes it reproducible. We add an explicit hold for weak extractions so a bad OCR read does not quietly inflate expenses. Distinct from matching supplier invoices to purchase orders or entering bills in QuickBooks: this playbook is about getting emailed PDFs into a trustworthy sheet first. In our dry run on 12 made-up invoice emails, it logged 10 clean rows, held 2 blurry scans, and updated category totals without inventing amounts. Keep the category list short and owned by finance, not by the model. When a supplier renames itself on the PDF, prefer a review hold over a wrong match. Export reviewed rows on a cadence your bookkeeper already trusts. The dashboard is a dashboard, not the ledger of record. If OCR confidence drops on a batch of phone photos, pause the workflow and ask people to rescan rather than silently guessing totals.
Where the time goes back: Replaces retyping invoice PDFs with a sheet that updates when mail arrives, so you review exceptions instead of every line.
FAQ
Does this replace QuickBooks?
Where do the prompts live?
Source and credit
Inspired by u/alexsafari1 on r/n8n. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- I Built an AI Accountant in n8n That Turns Email Invoices into a Real-Time Financial Dashboard
- Creator
- u/alexsafari1 on r/n8n
- Published on
- Original date
- Oct 9, 2025
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- n8n
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: No invented amounts; weak OCR held.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 24, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.