Gmail invoice PDFs to Sheets with GPT
Gmail invoice PDFs parsed by OpenAI into Sheets. This n8n template checks Gmail every minute for new invoice attachments, keeps only emails with PDF attachments and converts each PDF to text. An OpenAI model, GPT-4 in the body text and GPT-4o in the title, processes that text with specialized prompts into 25 or more standardized invoice fields. The workflow then generates a new Google Sheets document with timestamp naming for each invoice and moves it to designated Google Drive folders. It works with text-based PDFs, not scanned images; the page names accounting firms, bookkeepers and small and medium businesses as users.
Steps
- Trigger: Intelligent email monitoringGmail
- Attachment verificationGmail
- Advanced PDF extraction
- AI-Powered data analysisOpenAI
- Structured data formatting
- Dynamic spreadsheet creationGoogle Sheets
- Output: Automated file organizationGoogle Drive
- Output: Data populationGoogle Sheets
Limits
- Works only with text-based PDF invoices, not scanned images.
What it does well
- Produces 25+ standardized fields for invoice tracking.
Before you import
Import the workflow JSON into your n8n instance.
Similar templates
Month-end accounting document check
Also for invoicing and payments, 7 steps.
Scanned invoices to Sheets via OCR
Also for invoicing and payments, 6 steps.
Route scanned invoices by company
Also for invoicing and payments, 5 steps.
Gmail and OpenAI: 29 templates compared
Same two apps, different steps.
Google Sheets and OpenAI: 24 templates compared
Same two apps, different steps.
Gmail and Google Sheets: 22 templates compared
Same two apps, different steps.
Gmail and Google Drive: 12 templates compared
Same two apps, different steps.
Google Drive and Google Sheets: 12 templates compared
Same two apps, different steps.
Google Drive and OpenAI: 11 templates compared
Same two apps, different steps.
Copy records between apps
Other templates that do this task.