Gmail PDF Invoice Extractor: Gemini to Google Sheets (n8n)
Gmail PDF Invoice Extractor: Gemini to Google Sheets (n8n)
Regular price
£7.99
Regular price
£7.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 PDF Invoice Extractor: Gemini to Google Sheets (n8n)
Regular price
£7.99
Regular price
£7.99
Sale price
Unit price
/
per
Turn Gmail PDF invoices into structured Google Sheets rows—automatically
This n8n workflow watches your Gmail for unread PDF invoice attachments, extracts the PDF text, uses Google Gemini to parse key invoice fields into structured JSON, and appends the cleaned results to your Google Sheets—then marks the email as read. Perfect for turning messy invoice emails into clean, searchable data.
What this workflow does
-
Monitors Gmail for new invoice PDFs by polling every minute for emails matching
has:attachment filename:pdf label:invoices(unread + labeled). - Processes each PDF attachment individually by splitting matched emails into separate items so every attachment is extracted and parsed on its own.
- Extracts text from PDFs using n8n’s PDF text extraction node.
- Parses invoice data with Google Gemini: sends the email context plus extracted PDF text to Gemini using a predefined JSON schema, returning invoice fields and a confidence score.
-
Normalizes and validates results by converting dates/numbers, checking basic consistency (e.g., subtotal + tax vs total), and flagging low-confidence or incomplete outputs as
needs_review. -
Writes to Google Sheets by appending the final invoice row to the
Invoicestab, including line items stored as JSON. - Marks the source Gmail message as read after successful processing.
Use cases
- SaaS operators consolidating vendor invoices into a single Google Sheets invoice ledger.
- Automation engineers building an invoice extraction workflow from email to spreadsheet without manual copy/paste.
- Finance teams routing uncertain parses for follow-up via the
needs_reviewflag.
Technical details
-
Gmail Trigger / Gmail node with OAuth2 credentials and the query:
has:attachment filename:pdf label:invoices. - PDF text extraction using n8n’s PDF extraction capability.
- Google Gemini (Google AI Studio) to transform extracted text into structured JSON with a confidence score.
-
Google Sheets integration to append invoice rows to the
Invoicessheet (useREPLACE_WITH_YOUR_SPREADSHEET_ID).
