Skip to main content

Automated PDF invoice processing & approval flow using OpenAI and Google Sheets

Workflow preview

Workflow preview
100%
Automated PDF invoice processing & approval flow using OpenAI and Google Sheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who is this for? This workflow is ideal for: Finance teams that need to process incoming invoices faster with minimal errors Small to mid sized businesses that want to automate invoice intake, revi...

Best for

  • Invoice Processing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.googledrivetrigger, n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.googlesheets, n8n-nodes-base.stickynote, n8n-nodes-base.gmail

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Automated PDF invoice processing & approval flow using OpenAI and Google Sheets
Workflow name
Automated PDF invoice processing & approval flow using OpenAI and Google Sheets

Who is this for?

This workflow is ideal for:

  • Finance teams that need to process incoming invoices faster with minimal errors
  • Small to mid-sized businesses that want to automate invoice intake, review, and storage
  • Operations managers who require approval workflows and centralized record-keeping

What problem is this workflow solving?

Manually processing invoices is time-consuming, error-prone, and often lacks structure. This workflow solves those challenges by:

  • Automating the intake of invoices from multiple sources (email, Google Drive, web form)
  • Extracting invoice data using AI, eliminating manual data entry
  • Implementing an email-based approval system to add human oversight
  • Automatically storing approved invoice data in Google Sheets for easy access and reporting
  • Notifying stakeholders when invoices are approved or rejected

What this workflow does

This end-to-end invoice processing workflow includes:

  1. Three invoice input methods: Google Drive folder monitor, Gmail attachments, and web form uploads
  2. PDF to text extraction for each input method using native PDF parsing
  3. AI-powered invoice analysis with GPT-4 to extract structured fields such as vendor, total, and due date
  4. Dynamic categorization of invoice type (e.g., Travel, Software, Utilities) via AI
  5. Email-based approval workflow with embedded forms to collect decisions and notes
  6. Automated Google Sheets logging of all invoice data, approval status, and reviewer feedback
  7. Rejection notifications sent automatically to your finance team for transparency and follow-up

Setup

  1. Copy the Google Sheet template here:
    👉 PDF Invoice Parser with Approval Workflow – Google Sheet Template
  2. Connect your Google Drive account and specify the invoice folder ID
  3. Set up Gmail to monitor incoming invoices with PDF attachments
  4. Enable your form trigger to accept direct uploads from your internal or external users
  5. Enter your OpenAI API key in the AI processing node for data extraction
  6. Configure Google Sheets with a target spreadsheet to store invoice data
  7. Set recipient email addresses for invoice approvals and rejection notifications
  8. Test with a sample invoice to ensure end-to-end flow is working

How to customize this workflow to your needs

  • Change input sources: Replace Gmail with Outlook or use Slack uploads instead
  • Add validation steps: Include regex or keyword checks before AI analysis
  • Customize the AI schema: Modify the expected JSON structure based on your internal finance system
  • Integrate with accounting tools: Add Xero, QuickBooks, or custom API nodes to push data
  • Route based on category: Add conditional logic to handle invoices differently based on vendor or category
  • Multi-level approvals: Add additional email steps if higher-level signoff is needed
  • Audit logging: Use database or Google Sheets to maintain a historical log of approvals and rejections

Contact me for consulting and support:
đź“§ [email protected]

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 - OpenAI Chat Model

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

Block 2 - Structured Output Parser

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

Block 3 - Invoice Folder Monitor

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

Block 4 - Download Invoice PDF

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 5 - Invoice Parser AI Agent

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

Block 6 - Insert Invoice Data

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

Block 7 - Sticky Note2

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

Block 8 - Sticky Note3

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

Block 9 - Sticky Note4

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

Block 10 - Send Invoice for Approval

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 11 - Monitor Email Attachments

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

Block 12 - Upload Invoice (PDF) Form

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 13 - Extract Text from Drive PDF

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

Block 14 - Extract Text from Email PDF

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

Block 15 - Extract Text from Form PDF

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

Block 16 - Check Approval Decision

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

Block 17 - Send Rejection Alert

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 18 - Sticky Note

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

3. Summary Table

Workflow Automated PDF invoice processing & approval flow using OpenAI and Google Sheets
Complexity advanced
Nodes 18
Categories Invoice Processing, AI Summarization
Author Billy Christi
Published 28 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4452/4452.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 Automated PDF invoice processing & approval flow using OpenAI and Google Sheets do?

Who is this for? This workflow is ideal for: Finance teams that need to process incoming invoices faster with minimal errors Small to mid sized businesses that want to automate invoice intake, revi...

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 Invoice Processing, AI Summarization use case.