Automation library · Money admin

Track and classify expenses with Mindee OCR and OpenAI

Started by someone submitting a form, and works across Google Drive, Postgres and Slack. It hands the judgement calls to OpenAI. 32 steps, 4 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

32 stepsLarge: read it before trusting it with anything live
4Branches: places the flow splits
1Loop or waits
3Services it connects to

The flow

Starts it 2Model 1Logic 15Service 14

The steps in the order they run, from what starts it.

  1. 1Expense Upload FormForm triggerStarts it
  2. 2Daily Analytics SchedulerSchedule triggerStarts it
  3. 3Validate Receipt FileCodeLogic
  4. 4Calculate Monthly SpendingPostgresService
  5. 5Generate Category AnalyticsPostgresService
  6. 6Generate Merchant AnalyticsPostgresService
  7. 7Calculate Expense SplitPostgresService
  8. 8Submit Receipt To MindeeHttp RequestService
  9. 9Upload Receipt To DriveGoogle DriveService
  10. 10Merge Analytics ResultsMergeLogic
  11. 11Validate OCR JobIfLogic
  12. 12OCR Failure AlertSlackService
  13. 13Extract Drive File URLCodeLogic
  14. 14Build Dashboard SummaryCodeLogic
  15. 15Wait Before PollingWaitLogic
  16. 16Stop Workflow On OCR FailureStop And ErrorLogic
  17. 17Combine OCR + AI + File DataMergeLogic
  18. 18Send Analytics DashboardSlackService
  19. 19Fetch OCR ResultHttp RequestService
  20. 20Final Expense ValidationCodeLogic
  21. 21Extract OCR FieldsCodeLogic
  22. 22AI Validation Passed?IfLogic
  23. 23Validate Extracted ExpenseCodeLogic
  24. 24Search Duplicate ExpensePostgresService
  25. 25Invalid Expense AlertSlackService
  26. 26Expense Data Valid?IfLogic
  27. 27Duplicate Expense Found?IfLogic
  28. 28AI Expense ClassificationOpen AiModel
  29. 29Duplicate Expense AlertSlackService
  30. 30Save Expense RecordPostgresService
  31. 31Parse AI ClassificationCodeLogic
  32. 32Expense Processed NotificationSlackService

How it's built

Starts on
Someone submitting a form
Steps
32, with 4 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Postgres, Slack
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Google Drive, Postgres and Slack accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone submitting a form.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 32 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 32 steps before you point it at anything that matters.