Templates / Automate invoice processing from Gmail with Azure GPT-4.1 and human verification

Automate invoice processing from Gmail with Azure GPT-4.1 and human verification

Needs changes

by Sachin Shrestha · 870 views · created 2025-07-16 · Invoice Processing, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: Write Binary File. 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 11 nodes and runs on Gmail events. Along the way it connects Gmail and Azure OpenAI Chat Model.

How it runs

Trigger: On Gmail events.

  1. Is this PDF? (If): checks a condition and branches into true / false
  2. Merge: merges the data from its input branches
  3. Information Extractor: extracts structured fields from text with AI, with model: Azure OpenAI Chat Model
  4. Error Handler (Stop and Error): stops the run with an error
  5. Save PDF Locally (Write Binary File): uses Write Binary File
  6. If: checks a condition and branches into true / false
  7. Send a message (Gmail): send and wait for a reply
  8. Invoice Saved Message (Gmail): uses Gmail
  9. Manual Verification (Gmail): uses Gmail

Services it uses

GmailAzure OpenAI Chat Model

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • Write Binary File in Save PDF Locally: replace with Read/Write Files from Disk.
  • Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
  • Also check Always Output Data on multi-output nodes (If/Switch) now adds an empty item only when every output is empty.

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

Removed in 3.0Replace with
Write Binary File
Save PDF Locally
Read/Write Files from Disk

Nodes used (8)

From the author

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. This n8n workflow automates invoice management by integrating Gmail, PDF analysis, and Azure OpenAI GPT-4.1, with an optional human verification step for…

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