Gmail Invoice PDF to Google Sheets (OpenAI) n8n Workflow
Gmail Invoice PDF to Google Sheets (OpenAI) n8n Workflow
Regular price
ÂŁ12.99
Regular price
ÂŁ12.99
Sale price
Unit price
/
per
âŹ
Instant Digital Download
â
Unlimited Downloads
â
Lifetime Access in Your Account
Couldn't load pickup availability
đ„
128+ Sold
Popular with n8n builders
âĄ
23 people viewing
High interest right now
â
9 added today
Fast-moving digital product
Gmail Invoice PDF to Google Sheets (OpenAI) n8n Workflow
Regular price
ÂŁ12.99
Regular price
ÂŁ12.99
Sale price
Unit price
/
per
Turn Gmail invoice PDFs into validated Google Sheets entriesâautomatically (with OpenAI)
This n8n workflow monitors your Gmail for supplier invoice emails with PDF attachments, extracts invoice data using OpenAI, validates totals & VAT logic, and then appends clean records to an Invoices tab in Google Sheetsârouting any issues to an Exceptions tab for review.
What this workflow does
- Gmail trigger (every minute): Watches a specified Gmail label for new messages that include attachments, then downloads attachments for processing.
- PDF filtering: Keeps only PDF attachments from incoming emails.
- PDF â text conversion: Converts the PDF content into plain text for reliable extraction.
- OpenAI structured extraction: Sends the extracted text to OpenAI to pull structured invoice fields using a strict schema (supplier, invoice number, dates, currency, totals, VAT, and line items).
- Validation & reconciliation: Checks required fields, verifies net + VAT â gross, sums line items, ensures VAT rates are allowed, and flags negative totals.
- Google Sheets output: Appends validated invoices to the Invoices tab; non-reconciling results (including problem details) go to the Exceptions tab.
Use cases
- SaaS finance ops: Automatically populate an âInvoicesâ sheet from email PDFs to reduce manual data entry.
- AP teams & bookkeeping: Catch OCR/extraction errors early by routing mismatches to âExceptionsâ.
- Automation engineers: Use as a template for Gmail + PDF parsing + OpenAI extraction + Google Sheets reconciliation.
Technical details
- Triggers/Nodes: gmail trigger, filter, code, if, sticky note
- AI extraction: OpenAI API using an extraction model with a strict schema
- Spreadsheet storage: Google Sheets (requires an Invoices tab and an Exceptions tab with columns matching extracted fields)
Setup requirements
- Add Gmail credentials and configure the Gmail label ID.
- Add OpenAI API credentials.
- Add Google Sheets credentials and update the spreadsheet URL.
