Templates / Automate invoice processing with GPT-4o classification and XML export to accounting

Automate invoice processing with GPT-4o classification and XML export to accounting

Needs changes

by TOMOMITSU ASANO ✓ · 1,808 views · created 2025-12-18 · 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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This AI workflow has 18 nodes and runs on Google Drive events (file created) (plus 1 other trigger). Along the way it connects Google Drive, OpenAI Chat Model, Gmail and Slack and 1 more.

How it runs

Trigger: On Google Drive events (file created) (plus 1 other trigger).

  1. Merge: merges the data from its input branches
  2. Filter: keeps only the items that match a condition
  3. Download Invoice PDF (Google Drive): download
  4. Extract PDF Text (Extract from File): extracts data from a file (pdf)
  5. Parse Invoice Data (Code): runs custom JavaScript code
  6. AI Invoice Classifier (AI Agent): runs an AI agent, with model: OpenAI Chat Model
  7. Parse AI Classification (Code): runs custom JavaScript code
  8. Convert to XML (XML): converts between XML and JSON
  9. Format XML Output (Edit Fields (Set)): sets 3 fields: xmlContent, fileName, invoiceData
  10. Needs Approval? (If): checks a condition and branches into true / false

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

Services it uses

Google DriveOpenAI Chat ModelGmailSlackGoogle 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 Invoice Classifier (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).

Published 2025 — 19% of 2025 templates need changes for 3.0. See how template age affects 3.0 readiness →

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

Nodes used (16)

From the author

Intelligent Invoice Processing with AI Classification and XML Export Summary Automated invoice processing pipeline that extracts data from PDF invoices, uses AI Agent for intelligent expense categorization, generates XML for accounting systems, and routes…

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