Automated PDF invoice processing & approval flow using OpenAI and Google Sheets
Needs changesWhat this workflow does
This AI workflow has 14 nodes and runs on Google Drive events (file created) (plus 2 other triggers). Along the way it connects OpenAI Chat Model, Google Drive, Google Sheets and Gmail.
How it runs
Trigger: On Google Drive events (file created) (plus 2 other triggers).
- Download Invoice PDF (Google Drive): download
- Extract Text from Email PDF (Extract from File): extracts data from a file (pdf)
- Extract Text from Form PDF (Extract from File): extracts data from a file (pdf)
- Extract Text from Drive PDF (Extract from File): extracts data from a file (pdf)
- Invoice Parser AI Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; output parser: Structured Output Parser
- Send Invoice for Approval (Gmail): send and wait for a reply
- Check Approval Decision (If): checks a condition and branches into true / false
- Insert Invoice Data (Google Sheets): append
- Send Rejection Alert (Gmail): uses Gmail
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Invoice Parser AI Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
Published 2025 — 19% of 2025 templates need changes for 3.0. See how template age affects 3.0 readiness →
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Invoice Parser AI Agent (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (11)
- OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail - Gmail Trigger
n8n-nodes-base.gmailTrigger - n8n Form Trigger
n8n-nodes-base.formTrigger - Extract from File
n8n-nodes-base.extractFromFile - If
n8n-nodes-base.if
From the author
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…