Templates / Extract data from PDF reports with Gmail, OCR, Google Sheets and OpenAI GPT-4.1-mini

Extract data from PDF reports with Gmail, OCR, Google Sheets and OpenAI GPT-4.1-mini

Ready for 3.0

by Hyrum Hurst ✓ · 124 views · created 2026-01-24 · Document Extraction, 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 16 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI Chat Model, Google Sheets and Slack.

How it runs

Trigger: On Gmail events.

  1. Workflow Configuration (Edit Fields (Set)): sets or maps fields
  2. Check PDF Attachment Exists (If): checks a condition and branches into true / false
  3. Extract Text from PDF (Extract from File): extracts data from a file
  4. Error Handler and Logger (Code): runs custom JavaScript code
  5. Parse Key Fields with AI (AI Agent): runs an AI agent, with model: OpenAI Chat Model; output parser: Structured Output Parser
  6. Normalize Extracted Data (Edit Fields (Set)): sets or maps fields
  7. Classify Document Type (Switch): routes items into branches
  8. Store Invoice Data (Google Sheets): uses Google Sheets
  9. Summarize Report with AI (AI Agent): runs an AI agent, with model: OpenAI Chat Model
  10. Notify Contract Team (Slack): uses Slack

…plus 2 more steps. See the full node list below.

Services it uses

GmailOpenAI Chat ModelGoogle SheetsSlack

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) (New PDF Email Trigger).

Nodes used (11)

From the author

Who’s it for Consultants, agencies, financial analysts, and project managers who regularly receive client PDFs, invoices, or reports. How it works / What it does This n8n workflow automates PDF and report data extraction: 1. Triggers when a new PDF is…

Excerpt from Hyrum Hurst'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.