WhatsApp expense tracker with PostgreSQL database & AI-powered reports
Needs changesWhat this workflow does
This AI workflow has 45 nodes and runs on a schedule (every day) (plus 1 other trigger). Along the way it connects OpenRouter Chat Model, Postgres and WhatsApp Business Cloud.
How it runs
Trigger: On a schedule (every day) (plus 1 other trigger).
- Build Daily Report Query (AI Agent): runs an AI agent, with model: OpenRouter Chat Model
- Message Intent Classifier (AI Agent): runs an AI agent, with model: OpenRouter Chat Model; 1 tool (Date and time)
- Transform Custom Query for Postgres (Code): runs custom JavaScript code
- Route by Intent (Switch): routes items into branches
- Execute Daily Report Query (AI Agent): runs an AI agent, with model: OpenRouter Chat Model; 1 tool (Postgres); output parser: Structured Output Parser
- Build Custom Report Query (AI Agent): runs an AI agent, with model: OpenRouter Chat Model; 1 tool (Date and time)
- Parse & Validate Transaction (AI Agent): runs an AI agent, with model: OpenRouter Chat Model; 1 tool (Date and time); output parser: Structured Output Parser
- simple conversation (AI Agent): runs an AI agent, with model: OpenRouter Chat Model; 1 tool (Date and time)
- Build Daily Financial Summary (AI Agent): runs an AI agent, with model: OpenRouter Chat Model; 1 tool (Calculator)
- Transform Custom Query for Postgres (Code): runs custom JavaScript code
…plus 13 more steps. See the full node list below.
Services it uses
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 Message Intent Classifier (v1.9), Parse & Validate Transaction (v1.9), Build Confirmation Message (v1.9)…: 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).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Message Intent Classifier (v1.9), Parse & Validate Transaction (v1.9), Build Confirmation Message (v1.9), Build Daily Report Query (v1.9), Execute Daily Report Query (v1.9), Build Daily Financial Summary (v1.9), Build Custom Report Query (v1.9), Build Custom Financial Summary (v1.9), simple conversation (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (14)
- Code Tool
@n8n/n8n-nodes-langchain.toolCode - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Calculator
@n8n/n8n-nodes-langchain.toolCalculator - Postgres Tool
n8n-nodes-base.postgresTool - Convert to File
n8n-nodes-base.convertToFile - WhatsApp Business Cloud
n8n-nodes-base.whatsApp - WhatsApp Trigger
n8n-nodes-base.whatsAppTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - Switch
n8n-nodes-base.switch - Split Out
n8n-nodes-base.splitOut - Code
n8n-nodes-base.code - Postgres
n8n-nodes-base.postgres - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Track Personal Finances with WhatsApp and AI Assistant Transform your WhatsApp into a powerful personal finance command center. This AI-powered workflow converts natural language messages into structured financial data, automates record-keeping, and delivers…