Templates / Screen supplier invoices for duplicates and PO mismatches with Gmail, Sheets and OpenAI

Screen supplier invoices for duplicates and PO mismatches with Gmail, Sheets and OpenAI

Ready for 3.0

by Luca ✓ · 7 views · created 2026-09-15 · Invoice Processing, 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 34 nodes and runs on Gmail events (plus 2 other triggers). Along the way it connects Gmail, Google Sheets and OpenAI Chat Model.

How it runs

Trigger: On Gmail events (plus 2 other triggers).

  1. Set Workflow Parameters (Edit Fields (Set)): sets 11 fields: sheet_id, ap_manager_email, finance_email…
  2. Read Ledger Data from Sheets (Google Sheets): uses Google Sheets
  3. Alert on Workflow Failure (Gmail): uses Gmail
  4. Read Supplier Master from Sheets (Google Sheets): uses Google Sheets
  5. Identify Open Invoices (Code): runs custom JavaScript code
  6. Aggregate: combines items into one
  7. Check for Reportable Items (If): checks a condition and branches into true / false
  8. Read Purchase Orders from Sheets (Google Sheets): uses Google Sheets
  9. Email Morning Report (Gmail): uses Gmail
  10. Aggregate: combines items into one

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

Services it uses

GmailGoogle SheetsOpenAI Chat Model

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) (When Invoice Email Arrives).

Nodes used (15)

From the author

Quick overview This workflow monitors a Gmail inbox for PDF invoices, extracts key fields with OpenAI, and cross-checks them against Google Sheets supplier, purchase order, and ledger registers to detect duplicates, bank-detail changes, and PO/receiving…

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