Extract PDF invoice data from Gmail into Google Sheets using OpenAI GPT-4o-mini
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This AI workflow has 5 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI Chat Model and Google Sheets.
How it runs
Trigger: On Gmail events.
- Extract Text from PDF (Extract from File): extracts data from a file (pdf)
- Extract Invoice Data with AI (Information Extractor): extracts structured fields from text with AI, with model: OpenAI GPT-4 Invoice Processor
- Append Invoices to Sheets (Google Sheets): append
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (When PDF Invoice Received).
Nodes used (5)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Extract from File
n8n-nodes-base.extractFromFile - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow polls Gmail for unread emails with PDF attachments, extracts invoice text, uses OpenAI to pull key invoice fields, and appends the results as a structured row in a Google Sheets “Invoices” ledger. How it works 1. Polls Gmail every…