Templates / WhatsApp expense tracker with PostgreSQL database & AI-powered reports

WhatsApp expense tracker with PostgreSQL database & AI-powered reports

Needs changes

by Roshan Ramani ✓ · 3,065 views · created 2025-05-17 · Personal Productivity, AI Chatbot

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace 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)

CodeStructured Output ParserOpenRouter Chat ModelCalculatorPostgresWhatsApp Business CloudAI Agent

What it does

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 instant insights—all within your favorite messaging app. Who is this for? This template is perfect for: - Personal finance enthusiasts who want effortless expense tracking - Small business owners managing personal and business expenses - Freelancers tracking income and expenses across projects - Anyone who prefers messaging over complex finance apps - Users seeking privacy with self-hosted financial data What problem is this workflow solving? Traditional expense tracking requires switching between apps, manual data entry, and complex spreadsheets. Most people abandon these systems within weeks. This workflow solves the friction by: - Eliminating app-switching—everything happens in WhatsApp - Converting natural language to structured data automatically - Providing instant confirmations and reports - Requiring zero learning curve or behavior change What this workflow does Smart Transaction Processing Send natural messages like Spent 300 on groceries at Walmart and the AI automatically extracts: - Date: Today's date (or specified date) - Category: Groceries - Type: Expense/Income/Debt - Amount: 300 - Person/Company: Walmart Intelligent Message Classification The workflow automatically routes messages to three processing branches: - Branch 1: Reports and analytics (show March expenses) - Branch 2: Transaction logging (spent 50 on coffee) - Branch 3: General financial chat (how can I save money?) Advanced Reporting Generate instant reports by messaging: - today's report → Daily income/expense summary - March vs April report → Monthly comparisons with percentages - show groceries spending → Category-specific analysis - Automatic daily summaries at your preferred time Database Integration All transactions are stored in PostgreSQL with proper schema: sql CREATE TABLE financialtransactions ( date DATE NOT NULL, category TEXT NOT NULL, type TEXT NOT NULL, amount NUMERIC(12,2) NOT NULL, person TEXT ); Setup Prerequisites - n8n instance (self-hosted or n8n.cloud) - WhatsApp Business Cloud API credentials - PostgreSQL database (version 12+) - OpenRouter API key for AI processing Quick Setup Steps 1. Import the workflow template into your n8n instance 2. Configure credentials: - WhatsApp Business Cloud API (App Token + Phone Number ID) - PostgreSQL connection details - OpenRouter API key for AI processing 3. Create database table using the provided SQL schema 4. Test the connection by sending a sample message 5. Customize the scheduled report timing (default: 8 AM daily) Verification Checklist - WhatsApp webhook receives messages - AI correctly parses transaction messages - Database insertions work properly - Confirmation messages are sent back - Reports generate with accurate data How to customize this workflow to your needs AI Model Configuration - Default: Uses OpenRouter with GPT-3.5-turbo for cost efficiency - Upgrade: Switch to GPT-4 or Claude for better accuracy - Local: Replace with self-hosted Ollama for complete privacy Database Options - PostgreSQL: Recommended for production use - Google Sheets: Alternative for simpler setups (nodes included) - MySQL/SQLite: Easily adaptable with minor SQL modifications Message Classification Customize the classification system: - 0: Reports (modify SQL queries for different analytics) - 1: Transactions (adjust parsing rules for your language/currency) - 2: Chat (customize AI responses for financial advice) Reporting Customization - Scheduled reports: Change timing, format, and recipients - Custom periods: Add quarterly, yearly, or custom date ranges - Categories: Modify auto-categorization rules for your spending patterns - Currency: Update formatting for your local currency Advanced Features - Multi-user support: Add user identification fo

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.