Templates / Process, validate, and approve invoices with OpenAI GPT-4o and Google Sheets

Process, validate, and approve invoices with OpenAI GPT-4o and Google Sheets

Needs changes

by Bhaskar Gorati ✓ · 3 views · created 2026-09-19 · Invoice Processing, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 27 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Gmail and Google Sheets.

How it runs

Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).

  1. Set - Prepare Invoice Metadata (Edit Fields (Set)): sets 4 fields: vendorNameSubmitted, vendorEmailSubmitted, receivedAt…
  2. Send Email - Notify Administrator (Gmail): uses Gmail
  3. Extract from File: extracts data from a file (pdf)
  4. AI - Extract Invoice Data (AI Agent): runs an AI agent, with model: AI - Extract Invoice Data - Chat Model; output parser: AI - Extract Invoice Data - Output Parser
  5. Code: runs custom JavaScript code
  6. Code: runs custom JavaScript code
  7. If: checks a condition and branches into true / false
  8. Google Sheets: uses Google Sheets
  9. Send Email - Request Missing Info (Gmail): uses Gmail
  10. If: checks a condition and branches into true / false

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

Services it uses

OpenAI Chat ModelGmailGoogle Sheets

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 AI - Extract Invoice Data (v1.7), AI - Analyze and Categorize Invoice (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
AI - Extract Invoice Data (v1.7), AI - Analyze and Categorize Invoice (v1.7)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (13)

From the author

Quick overview This workflow receives invoice PDFs via a webhook, extracts and validates invoice data with OpenAI, checks for duplicates in Google Sheets, and routes invoices for automatic or manual approval while notifying vendors and finance via Gmail. How…

Excerpt from Bhaskar Gorati '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.