Track and classify expenses with Mindee OCR, GPT-4o, PostgreSQL and Google Drive
Ready for 3.0What this workflow does
This AI workflow has 32 nodes and runs when someone submits an n8n form (“Expense Upload”) (plus 1 other trigger). Along the way it connects Slack, OpenAI, Google Drive and Postgres. It also calls api-v2.mindee.net over HTTP.
How it runs
Trigger: When someone submits an n8n form (“Expense Upload”) (plus 1 other trigger).
- Validate Receipt File (Code): runs custom JavaScript code
- Calculate Monthly Spending (Postgres): run a query
- Generate Category Analytics (Postgres): run a query
- Generate Merchant Analytics (Postgres): run a query
- Calculate Expense Split (Postgres): run a query
- Submit Receipt To Mindee (HTTP Request): calls api-v2.mindee.net (POST)
- Upload Receipt To Drive (Google Drive): uses Google Drive
- Merge: merges the data from its input branches
- Validate OCR Job (If): checks a condition and branches into true / false
- OCR Failure Alert (Slack): uses Slack
…plus 20 more steps. See the full node list below.
Services it uses
HTTP calls to: api-v2.mindee.net
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.
Nodes used (12)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Stop and Error
n8n-nodes-base.stopAndError - Wait
n8n-nodes-base.wait - OpenAI
@n8n/n8n-nodes-langchain.openAi - Merge
n8n-nodes-base.merge - Google Drive
n8n-nodes-base.googleDrive - Postgres
n8n-nodes-base.postgres - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Quick overview This workflow collects receipt uploads via an n8n form, extracts expense details with Mindee OCR, enriches and classifies the expense using OpenAI, stores the receipt in Google Drive, saves the final record to PostgreSQL, and sends Slack alerts…