Gmail PDF Invoice Extractor to Google Sheets (n8n + OpenAI)
Gmail PDF Invoice Extractor to Google Sheets (n8n + OpenAI)
Regular price
£75.99
Regular price
£75.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 to Google Sheets (n8n + OpenAI)
Regular price
£75.99
Regular price
£75.99
Sale price
Unit price
/
per
Turn Gmail PDF invoices into structured Google Sheets rows—automatically
This n8n workflow scans your Gmail inbox for PDF invoice attachments, stores each file in a month-based Google Drive folder, and uses OpenAI to extract invoice fields—then appends qualifying invoices to a Google Sheets tab for the current month.
What this workflow does
- Runs hourly from Gmail (and can be run manually for backfilling a date range).
- Downloads attachments and filters out unwanted senders, keeping only PDF attachments.
- Locates (or targets) the current month’s Google Drive folder using a YYYY-MM naming pattern (e.g., 2026-04), then uploads each PDF and builds shareable links for both the file and its folder.
- Extracts text from each PDF and sends it to an OpenAI-powered agent that returns strict JSON with structured invoice fields.
- Retries with an auto-fixing parser when the JSON is not perfectly formatted.
- Checks for Sales Tax or VAT, and if present, appends invoice details—plus the PDF URL and Drive folder link—to a Google Sheets tab named for the current month.
- Uses a short wait between processing PDFs, then continues with the next attachment.
Use cases
- Maintain an always-up-to-date invoicing ledger in Google Sheets from incoming supplier emails.
- Centralize invoice PDFs in Drive by month while capturing key fields (company, invoice number, totals, taxes).
- Flag invoices that include Sales Tax or VAT for streamlined tax reporting.
Technical details
- Integrations: Gmail, Google Drive, Google Sheets, and OpenAI (with an OpenAI API key for both OpenAI chat model connections).
- n8n nodes/tech stack mentioned: if, code, wait, gmail, merge, filter.
- Setup requires: updating the Sheets document ID and ensuring column names match the mapped fields (e.g., Company Name, Invoice Number, taxes, totals, links, capture date), plus configuring the Drive parent folder ID.
