Gmail + Google Sheets automation · portfolio sample
Supplier invoices land in the inbox as PDFs and photos. This reads each one, types it into a spreadsheet line by line, and checks the supplier’s arithmetic before anyone pays: wrong line totals, totals that don’t add up, and the same invoice sent twice.
Based on the supplier notes my own building-supply stores receive every day. The suppliers and amounts below are fictional example data.
“Today” in this sample is Fri, Oct 30, 2026.
| Description | Qty | Unit | Amount |
|---|
Mail from suppliers, or with “invoice” in the subject, gets the label Invoices.
PDFs and phone photos are turned into text with Google Drive’s own OCR. The temporary copy goes to the trash straight after.
One row per invoice, one row per line item, coloured green, red or amber. Emails are marked Invoices/Done.
The summary email lists what failed a check, what is overdue, and what is due this week.
This spreadsheet, reading and labelling Gmail, and only the Drive files the script creates itself. It cannot open the rest of your Drive.
17 automated tests cover four invoice layouts, till receipts, every common date style, payment terms, duplicates against the sheet, and a simulated Gmail and Drive run.
Nothing is guessed: an invoice that fails any check stays marked for review until a person looks at it.