WhatsApp expense tracker with PostgreSQL database AI powered r
Track Personal Finances with WhatsApp and AI Assistant Transform your WhatsApp into a powerful personal finance command center. This AI-powered workflow conv...
🔌 Nodes & Integrations Used (10)
📖 Implementation & Setup Guide
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 financial_transactions ( 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
- **Import the workflow** template into your n8n instance
- **Configure credentials**:
- - WhatsApp Business Cloud API (App Token + Phone Number ID)
- - PostgreSQL connection details
- - OpenRouter API key for AI processing
- **Create database table** using the provided SQL schema
- **Test the connection** by sending a sample message
- **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 for family/team use
- **Receipt photos**: Extend workflow to process image receipts via OCR
- **Budgets**: Add budget tracking and overspend alerts
- **Integrations**: Connect to banks via Plaid or other financial APIs
Complete Package Included
When you download this template, you get everything needed for immediate implementation:
Ready-to-Use n8n Workflow
- **Fully configured nodes** with descriptive names explaining each step
- **Color-coded sticky notes** throughout the workflow explaining:
- - What each branch does (Reports/Transactions/Chat)
- - How the AI classification works
- - Database connection requirements
- - Error handling and troubleshooting tips
Comprehensive Documentation Bundle
- **Quick Start Guide**: Get running in under 10 minutes
- **Detailed Setup Guide**: Complete configuration walkthrough with screenshots
- **Branch Explanation Guide**: Deep dive into each processing branch:
- - **Branch 0**: Reports & Analytics - SQL queries and formatting
- - **Branch 1**: Transaction Processing - AI parsing and database insertion
- - **Branch 2**: Financial Chat - AI responses and conversation handling
Built-in Workflow Documentation
- **Sticky notes at every major step** explaining the logic
- **Node descriptions** that clarify what each component does
- **Visual flow indicators** showing message routing paths
- **Dependency callouts** highlighting required credentials and connections
Technical Implementation Details
- **Database schema** with complete SQL commands
- **API configuration examples** for all external services
- **Troubleshooting checklist** for common setup issues
- **Performance optimization** recommendations
Bonus Resources
- **Example message templates** to test each workflow branch
- **Sample data** for testing reports and analytics
- **Customization recipes** for common modifications
- **Integration patterns** for extending functionality
Example Usage
Log Expenses:
- `Spent 1200 on rent this month`
- `Paid 45 for gas at Shell`
- `Coffee 5.50 at Starbucks`
Log Income:
- `Received 5000 salary from Company ABC`
- `Freelance payment 800 from Client XYZ`
Generate Reports:
- `today's summary`
- `show this week's expenses`
- `compare March vs April spending`
- `how much on food this month?`
Expected Responses: ✅ Logged: expense | Rent | ₹1,200.00 | Landlord ✅ Logged: income | salary |₹12,000.00|company
📊 Today's Summary: Income: ₹0.00 Expenses: ₹1,245.50 Savings: -₹1,245.50
📈 March vs April: Expenses: ₹15,000 vs ₹12,500 (-16.7%) Top categories: Rent, Food, Transport
⚡ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
WhatsApp_expense_tracker_with_PostgreSQL_database_AI_powered_r.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related AI Agents Workflows
View All in AI Agents →5 ways to process images PDFs with Gemini AI in n8n
How it works Many users have asked in the support forum about different methods to analyze images and PDF documents with Google Gemini AI in n8n. This workfl...
7 AI Sales Assistant
Production-ready n8n automation template for 7 AI Sales Assistant built by AhiXLight. Seamlessly connects Airtop Tool, Slack, Airtop with 24 configured nodes.
AAVE portfolio professional AI agent Telegram Email GPT 4o
A next-generation AI-powered DeFi health monitor that tracks wallet positions across Aave V3 using GPT-4o and LangChain. It delivers human-readable reports v...
Access control for AI agents RBAC using Airtable and Telegram
Purpose This workflow allows granular control over the access to tools connected to AI Agents (including Multi-Agent setups) using Role Based Access Control....