A voice-driven expense tracker that allows users to call a phone number, speak their expenses naturally, and have them automatically logged to their personal Google Sheet.
Built for the Vapi Build Challenge 🛠️ using:
- Vapi for voice assistant and phone interface
- Flask (Python) for backend
- Google Sheets API for expense storage
- The user calls the Vapi-assigned number.
- The voice assistant (powered by Vapi) asks for expense details like:
- "How much did you spend?"
- "What was it for?"
- "When did this happen?"
- Once the user responds, the assistant sends structured data to the Flask backend.
- The backend:
- Creates a new sheet for first-time users
- Logs expenses for existing users
- Allows editing, summarizing, budgeting, and deletion
✅ Log expenses via voice
✅ Auto-create a Google Sheet per user
✅ Track monthly expenses by category
✅ Edit or delete expenses
✅ Summarize totals and budgets via voice
✅ SMS confirmation via Twilio (optional)
| Layer | Tech |
|---|---|
| Voice Assistant | Vapi |
| Backend | Flask (Python) |
| Storage | Google Sheets API |
| Auth | Google Cloud Service Account |
📁 voice-expense-tracker/
├── app.py # Main Flask server
├── utils.py # Google Sheets helper functions
├── credentials.json # Google service account creds
├── requirements.txt # Python dependencies
└── README.md
git clone https://github.com/yourusername/voice-expense-tracker.git
cd voice-expense-tracker- Enable Google Sheets API
- Create a Service Account and download
credentials.json - Share your target spreadsheet with the service account email
pip install -r requirements.txtpython app.pyThe server runs at
http://localhost:5000
| Method | Route | Description |
|---|---|---|
| POST | /log-expense |
Logs a new expense |
| POST | /edit-expense |
Edits an existing expense entry |
| POST | /delete-expense |
Deletes an expense |
| POST | /set-budget |
Sets budget |
| POST | /get-expenses |
Fetches all expenses for a user |
| POST | /summary |
Returns monthly/overall summary |
| POST | /budget |
Returns remaining budget by month |
All endpoints accept and return JSON.
{
"name": "log_expense",
"description": "Log an expense to the backend",
"parameters": {
"type": "object",
"properties": {
"name": { "type": "string" },
"category": { "type": "string" },
"amount": { "type": "number" },
"date": { "type": "string" }
},
"required": ["category", "amount", "date"]
}
}Repeat similarly for edit_expense, delete_expense, etc.
User: "Hey, I spent 300 rupees on groceries yesterday."
Assistant:
"Got it! Logging ₹300 for groceries on May 27. Anything else you'd like to add?"
{
"name": "Aditya",
"category": "Food",
"amount": 500,
"date": "2025-05-28"
}Built by Aditya for the Vapi Build Challenge 2025 Inspired by the idea of natural, zero-friction expense tracking using voice and LLMs
MIT License – feel free to fork, extend, and deploy.