Extract invoice data from Gmail to Google Sheets with PDF.co AI invoice parser
UnknownWhat this workflow does
This workflow has 24 nodes and runs on Gmail events. Along the way it connects Gmail, Google Sheets and Pdfco (community).
How it runs
Trigger: On Gmail events.
- Config (Edit Fields (Set)): sets 5 fields: sheetUrl, alertEmail, highTotalAmount…
- Download email and attachments (Gmail): get
- One item per PDF (Code): runs custom JavaScript code
- Loop over PDFs (Loop Over Items (Split in Batches)): loops over the items in batches
- Loop over invoices (Loop Over Items (Split in Batches)): loops over the items in batches
- Attach upload URL (Merge): merges the data from its input branches
- Upload PDF to PDF.co (PDFco Api): upload file to pdf.co
- Read logged invoices (Google Sheets): uses Google Sheets
- Attach parse result (Merge): merges the data from its input branches
- Parse invoice with AI (PDFco Api): uses PDFco Api
…plus 13 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Gmail + Pdfco templates (9) · Other Google Sheets + Pdfco templates (8)
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that n8n-nodes-pdfco is verified or supports 3.0 (used in Upload PDF to PDF.co, Split into single invoices, Parse invoice with AI).
- Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (9)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - Gmail
n8n-nodes-base.gmail - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - PDFco Api
n8n-nodes-pdfco.PDFco Api - Merge
n8n-nodes-base.merge - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow monitors a Gmail label for PDF invoice attachments, uploads them to PDF.co for AI invoice parsing, and writes key invoice fields to Google Sheets, then labels each processed email to prevent duplicate processing. How it works 1.…