Skip to main content

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

Workflow preview

Workflow preview
100%
Extract data from PDF reports with Gmail, OCR, Google Sheets and OpenAI GPT-4.1-mini preview
Open on n8n.io

1. Workflow Overview

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

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.gmailtrigger, n8n-nodes-base.set, n8n-nodes-base.if, n8n-nodes-base.extractfromfile, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.switch

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Hyrum Hurst.

Original n8n.io source

1.1 Workflow description

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

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 uploaded to Google Drive, Dropbox, or received via email.
  2. Uses OCR (PDF.co or Cloud OCR) to extract text from PDFs.
  3. Parses key data fields using OpenAI or Regex:
  • Client Name
  • Project/Report Name
  • Dates
  • Financials / Metrics
  1. Normalizes extracted data with a Set node for consistency.
  2. Classifies document type (invoice, report, contract).
  3. Routes data based on type:
  • Invoice → Update Google Sheets / QuickBooks / Xero
  • Report → Summarize metrics using AI
  • Contract → Notify relevant team members
  1. Logs extracted data in Google Sheets.
  2. Optional: Sends notifications via Slack or email.
  3. Error handling included for unreadable or incomplete PDFs.
  4. Includes logging for audit and tracking purposes.

How to set up

  1. Connect Google Drive, Dropbox, or Gmail for PDF input.
  2. Configure OCR node for accurate text extraction.
  3. Connect OpenAI API for parsing and summarizing key metrics.
  4. Set up Google Sheets or accounting software to store extracted data.
  5. Optional: Configure Slack or email notifications for summaries.
  6. Test workflow with sample PDFs to ensure data extraction and routing works correctly.

Requirements

  • n8n account with integrations for Google Drive, Dropbox, Gmail, Sheets.
  • OCR service (PDF.co or Cloud OCR).
  • OpenAI API key for data parsing.

How to customize

  • Adjust AI parsing rules for your specific fields.
  • Customize routing to different software (QuickBooks, Xero, Sheets).
  • Add additional notifications or automation steps as needed.

Created by Hyrum Hurst / QuarterSmart Keywords: AI PDF extraction, report parsing automation, n8n workflow, invoice extraction, consultant workflow, QuarterSmart

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - New PDF Email Trigger

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1.3

Block 2 - Workflow Configuration

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Check PDF Attachment Exists

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 4 - Extract Text from PDF

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1.1

Block 5 - Parse Key Fields with AI

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 6 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 7 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 8 - Normalize Extracted Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Classify Document Type

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.4

Block 10 - Store Invoice Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 11 - Summarize Report with AI

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 12 - OpenAI Chat Model for Summary

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 13 - Notify Contract Team

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 14 - Store All Extracted Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 15 - Send Summary Notification

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 16 - Error Handler and Logger

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 17 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Extract data from PDF reports with Gmail, OCR, Google Sheets and OpenAI GPT-4.1-mini
Complexity advanced
Nodes 22
Categories Document Extraction, AI Summarization
Author Hyrum Hurst
Published 24 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12961/12961.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

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

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

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.