Automation library · Money admin

WhatsApp expense tracker with OpenAI and Postgres

Started by an incoming WhatsApp message, and works across Postgres and WhatsApp. It hands the judgement calls to OpenAI. 52 steps, 3 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

52 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Model 28Logic 8Service 15

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

  1. 1Date and timeTool CodeModel
  2. 2Structured Output ParserOutput Parser StructuredModel
  3. 3CalculatorTool CalculatorModel
  4. 4Date and time1Tool CodeModel
  5. 5Date and time2Tool CodeModel
  6. 6Date and time4Tool CodeModel
  7. 7Date and time5Tool CodeModel
  8. 8Date and time6Tool CodeModel
  9. 9Date and time7Tool CodeModel
  10. 10Structured Output Parser1Output Parser StructuredModel
  11. 11Date and time8Tool CodeModel
  12. 12Structured Output Parser3Output Parser StructuredModel
  13. 13Incoming WhatsApp TriggerWhats App triggerStarts it
  14. 14OpenAI Chat ModelLm Chat Open AiModel
  15. 15OpenAI Chat Model1Lm Chat Open AiModel
  16. 16OpenAI Chat Model2Lm Chat Open AiModel
  17. 17OpenAI Chat Model3Lm Chat Open AiModel
  18. 18OpenAI Chat Model4Lm Chat Open AiModel
  19. 19OpenAI Chat Model5Lm Chat Open AiModel
  20. 20OpenAI Chat Model6Lm Chat Open AiModel
  21. 21OpenAI Chat Model7Lm Chat Open AiModel
  22. 22Parse & Validate TransactionAgentModel
  23. 23Build Custom Financial SummaryAgentModel
  24. 24Build Custom Report QueryAgentModel
  25. 25Message Intent ClassifierAgentModel
  26. 26simple conversation AgentModel
  27. 27Parse & Validate Transaction (Receipts & Bills)AgentModel
  28. 28Build Confirmation Message1AgentModel
  29. 29Parse & Validate Transaction(Audio Transcribe)AgentModel
  30. 30Check Message TypeIfLogic
  31. 31Split Transaction LinesSplit OutLogic
  32. 32Send Custom ReportWhats AppService
  33. 33Transform Custom Query for PostgresCodeLogic
  34. 34Route by IntentSwitchLogic
  35. 35Normal Conversation Whats AppService
  36. 36Send Financial Response1Whats AppService
  37. 37Fetch User Profile from PostgresPostgresService
  38. 38Format Transaction JSON1CodeLogic
  39. 39Execute Custom Report QueryPostgresService
  40. 40Create Image Download link Whats AppService
  41. 41Create Audio Download link Whats AppService
  42. 42Check user Exists or notIfLogic
  43. 43Validate Transaction Fields1CodeLogic
  44. 44Format Custom Query ResultsCodeLogic
  45. 45Download ImageHttp RequestService
  46. 46Download AudioHttp RequestService
  47. 47Create New UserPostgresService
  48. 48Insert Transaction into DB1PostgresService
  49. 49Convert to FileConvert To FileService
  50. 50Transform image to base64Extract From FileService
  51. 51Transcribe Audio by deepgram Http RequestService
  52. 52Run OCR on Image (Gemini API)Http RequestService

How it's built

Starts on
An incoming WhatsApp message
Steps
52, with 3 branches
Size
Large: read it before trusting it with anything live
Connects to
Postgres, WhatsApp
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on an incoming WhatsApp message.

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 52 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 52 steps before you point it at anything that matters.