Gmail + Google Sheets automation · portfolio sample

Invoice & Receipt Extractor

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.

Documents read  
To pay  
Due soon  
To check  

From the inbox

Pick a document. Edit its text and see what gets read.

    Text from the PDF

    What was read

    DescriptionQtyUnitAmount

      The spreadsheet it fills

      Paste straight into Excel or Google Sheets.

      Planted in the sample

        How it runs with Gmail and Google Sheets

        1. Gmail filter

          Mail from suppliers, or with “invoice” in the subject, gets the label Invoices.

        2. Hourly read

          PDFs and phone photos are turned into text with Google Drive’s own OCR. The temporary copy goes to the trash straight after.

        3. Into the sheet

          One row per invoice, one row per line item, coloured green, red or amber. Emails are marked Invoices/Done.

        4. Before paying

          The summary email lists what failed a check, what is overdue, and what is due this week.

        Permissions

        This spreadsheet, reading and labelling Gmail, and only the Drive files the script creates itself. It cannot open the rest of your Drive.

        Tested

        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.