This is a WhatsApp Expense Tracker chatbot built using Rasa that allows users to record and query their expenses efficiently. The bot uses NLP techniques, a database for expense storage, and integrates with Twilio for WhatsApp messaging.
📌 Expense Recording: Users can log their expenses with categories, amounts, and descriptions.
🏷 Category Classification: Uses NLP (Zero-shot learning & NER) to categorize expenses.
🔍 Expense Querying: Retrieve expenses based on date, category, or both.
📊 Insights & Summaries: Provides a breakdown of expenses by category.
💾 SQLite Database: Persistent storage for expense records.
📡 Twilio Integration: Send and receive messages via WhatsApp.
- Rasa: NLP-powered chatbot framework
- Twilio API: WhatsApp messaging
- SQLite: Lightweight database
- Transformers (Hugging Face): Zero-shot classification & NER
- Python: Core backend logic
- Logging: Debugging and monitoring
bash git clone https://github.com/your-repo/whatsapp-expense-tracker.git cd whatsapp-expense-tracker
Create a virtual environment and install required Python packages. bash python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
- Sign up at Twilio
- Get your Account SID, Auth Token, and WhatsApp Number
- Update credentials.yml with Twilio credentials
bash rasa train
In separate terminals, run: bash rasa run --enable-api rasa run actions
Send a message like: plaintext I spent $20 on Starbucks coffee yesterday.
💾 The bot extracts amount, category, and date automatically.
Ask questions like: plaintext How much did I spend on coffee this week? Show me my expenses for yesterday.
📊 The bot fetches relevant data from the database.
| ID | Description | Amount | Category | Date | Timestamp |
|---|---|---|---|---|---|
| 1 | Starbucks coffee | 20.0 | Coffee | 2024-02-09 | 2024-02-09 10:30:00 |
| 2 | Uber ride | 15.5 | Travel | 2024-02-08 | 2024-02-08 15:00:00 |
📌 Dashboard for visualization
📉 Expense trend analysis
🗣 Voice-based interaction support
🏦 Bank statement auto-categorization
👨💻 Your Name - GitHub
This project is licensed under the MIT License - see the LICENSE file for details.