agentusecasesAll 965 use cases
Work & Operations

Process supplier invoices from Gmail through approval and payment

An n8n pipeline extracts invoice data, checks duplicates and suppliers, routes high-value invoices for approval, then creates accounting entries and schedules payment.

Done withn8n

What they did
This is Part 1 of a 3-part series, and it covers the infrastructure only. The author runs n8n in queue mode with PostgreSQL and Redis in Docker, plus a worker. Tables for suppliers, invoices and an audit log are set up, along with Gmail, OpenAI, Postgres and Slack credentials. The planned flow is Gmail, OCR, AI extraction, duplicate and supplier checks, classification, approval, journal entry, payment.
How it went
No results or numbers yet. The article ends with a running stack and schema ready. The extraction, validation, approval and accounting steps are left to Parts 2 and 3.
Worth knowing
Queue mode can retry stalled jobs, so each step must be idempotent. That is why duplicate detection matters, and why the n8n encryption key needs a backup.

Try it yourself with n8n

Build an n8n workflow that watches Gmail label [invoices] for supplier invoices, extracts supplier, amount, due date and invoice number, and checks for duplicates and known suppliers in [my supplier sheet]. Invoices over [amount] should go to [approver] for approval. It's finished when a test invoice reaches the approval step; pause before creating any accounting entry or scheduling any payment and show me the details.

Read the original ↗

Source: medium.com · Undated

Five of these in your inbox every morning

The best things people got an AI agent to do, each with the prompt to try it.

More like this