When should you use it?
- Your accountant asks for last month's invoices and you hunt through email to find them
- Suppliers send a mix of PDF attachments and view-your-invoice links
- You already use Gmail, Google Drive and Google Sheets
Not for: Invoices that sit behind a supplier login; those still need a manual download; Businesses whose accounting software already captures bills straight from email
What do you need, and what do you get?
You need
- An n8n instance (cloud or self-hosted)
- Gmail, Google Drive and Google Sheets connections
- An Anthropic API key or n8n AI credits for the extraction step
- A PDF.co key if you want linked invoice pages turned into PDFs
- A root invoices folder in Drive
You get
- One PDF per invoice inside a YYYY/YYYY-MM folder
- A monthly sheet in the same folder with supplier, tax ID, issue date, total and currency
- A Gmail label on each handled email so nothing is filed twice
- Empty cells, not guesses, where a value is missing
How does it work, step by step?
- Import the templateOpen the creator's n8n template, import it and connect Gmail, Drive and Sheets.
- Point it at your foldersSet your root invoices folder ID in the settings step and create the processed label in Gmail.
- Tune the searchAdjust the Gmail search in the trigger so it catches your suppliers' invoice and receipt emails without pulling in newsletters.
- Connect the extractorAdd your Anthropic credential so the Claude step can read each PDF with the prompt below, and add PDF.co only if you receive link-only invoices.
- Check the first monthCompare the first rows of the sheet against the PDFs before you share the folder with your accountant.
The prompt
The original prompt by Ioana Frincu, word for word, with a link to where it was published. Below it is our adapted version with fill-in blanks, if you want it. Works in n8n and Claude. Values in lime are placeholders.
Original prompt by Ioana Frincu
You are reading a supplier invoice or receipt. Extract:
- supplier_name: legal name of the company that issued the invoice (the seller, not the customer)
- supplier_vat: the seller's VAT / tax ID exactly as printed (e.g. RO12345678, GB150848114)
- issue_date: invoice issue date as YYYY-MM-DD
- amount: total amount payable including VAT, as a number with a dot as decimal separator
- currency: ISO 4217 code, e.g. EUR, RON, USD
Use null for anything that is not on the document. Reply with only this JSON and nothing else:
{"supplier_name": "", "supplier_vat": "", "issue_date": "", "amount": 0, "currency": ""}Exactly as published by Ioana Frincu in Save, extract, and log email invoices with Gmail, Drive, Sheets, Claude, and PDF.co.
Our adapted version (optional)
Fill in the blanks (optional; the copied prompt uses your values)
Read the attached {document_type} and return only JSON with these fields: supplier_name: the business that issued it (the seller, not {your_company_name}) supplier_tax_id: the seller's VAT or tax number exactly as printed issue_date: in YYYY-MM-DD amount_total: the final amount payable after tax, as a number with a dot for decimals currency: the three-letter ISO code unclear: a short note if any value was hard to read or there are several candidates, otherwise null Use null for anything not printed on the document. Do not guess or calculate missing values.
What can go wrong?
- AI extraction can misread totals or swap the buyer and seller; spot-check amounts and tax IDs, especially on foreign-language invoices.
- Invoice emails can carry links to pages that ask you to sign in or contain tracking; let the workflow skip anything it cannot render cleanly rather than saving a login screen.
- A broad Gmail search can file marketing emails as invoices; start narrow and widen it.
- Sharing a Drive folder exposes every invoice in it; share only the month folder, and only with your accountant.
Our take
This is a clean, well-scoped automation for a chore almost every small business has. The structure is sensible: work out the month from the email date, get a PDF one way or another, extract only what an accountant needs, file it, then label the email so a rerun never duplicates anything. The creator is upfront about the limits, such as login-protected invoices and the need to check early rows. We ran her extraction prompt word for word on four synthetic invoices: a US software vendor billing in USD, a Romanian accounting firm billing in RON, a print-shop receipt with no tax number and a two-page Norwegian invoice where the buyer's VAT number appears before the seller's. It returned valid JSON each time, used null for the missing tax number, converted the European number formats correctly and picked the seller on the two-page invoice. The weak spot was a date printed as 12/10/2026, which it read as 12 October without saying it had assumed day-first order. Our adapted version adds an unclear field for cases like that, so the doubt shows up in your sheet instead of disappearing.
Where the time goes back: Invoices are filed as they arrive, so the month-end hunt through your inbox disappears and your accountant gets a folder and a summary sheet in one share.
FAQ
Which fields does it capture?
What happens with Stripe or Paddle invoices that arrive as links?
Do I need to write rules for each supplier?
Source and credit
The original prompt on this page is by Ioana Frincu, shown word for word with a link to where it was published. The summary, notes and adapted version are ours.
- Original
- Save, extract, and log email invoices with Gmail, Drive, Sheets, Claude, and PDF.co
- Creator
- Ioana Frincu
- Published on
- n8n workflow templates
- Original date
- Oct 18, 2026
- License
- Not openly licensed; the original prompt is shown word for word with credit and a link to the original
- Originally for
- n8n
- AI dry run
- Oct 22, 2026: passed. Dry-run tested by our AI test agent on sample input. Extraction correct; silent date assumption is the gap our 'unclear' field covers.
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 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Also see: I automated my invoice admin with n8n, and you can copy it (DEV post by the creator) by Ioana Frincu. A related version of the same idea; credited and linked only, nothing from it is reproduced here.
Are you the creator? Claim or correct this page.