Templates / Extract PDF invoice data from Gmail into Google Sheets using OpenAI GPT-4o-mini

Extract PDF invoice data from Gmail into Google Sheets using OpenAI GPT-4o-mini

Ready for 3.0

by Vitaliy Voitik ✓ · 77 views · created 2026-08-07 · Invoice Processing, AI Summarization

Ready 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.

  1. Extract Text from PDF (Extract from File): extracts data from a file (pdf)
  2. Extract Invoice Data with AI (Information Extractor): extracts structured fields from text with AI, with model: OpenAI GPT-4 Invoice Processor
  3. Append Invoices to Sheets (Google Sheets): append

Services it uses

GmailOpenAI Chat ModelGoogle Sheets

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)

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…

Excerpt from Vitaliy Voitik's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.