Personal Expense Tracker (FlowiseAI)
Our spending data quietly accumulates in spreadsheets but answering simple questions. Where did my money go this month? still takes time…
Personal Expense Tracker (FlowiseAI)
Our spending data quietly accumulates in spreadsheets but answering simple questions. Where did my money go this month? still takes time and guesswork. This project turns that static data into a conversation: a local bot (Flowise + SQLite) that runs on your laptop, respects your privacy, and answers in plain English with verifiable SQL behind every result. No subscriptions, no cloud lock-in — just fast, trustworthy insights you control. It’s a small build with big leverage: understand your habits, spot trends, and make better decisions in minutes.
1) Introduction
What is Flowise?
Flowise is a visual, no/low-code tool for building LLM applications (“chatflows”). You drag nodes (LLM, tools, databases, prompts) onto a canvas and connect them to create a pipeline. Under the hood, Flowise uses popular frameworks (e.g., LangChain) but hides the boilerplate. You can run Flowise locally in Docker, keep your data on your own machine, and iterate fast.
2) Problem Statement
a) Build a local expense-analysis chat bot that:
- accepts English questions,
- converts them to SQL,
- executes them against SQLite,
- returns a clear, correct answer.
b) Keep everything local (no cloud DB)
3) Approach & Methodology
- Data: A personal-expenses CSV/XLSX, clean it, and import into SQLite.
- Database: Use DBeaver (a free DB client) to create/inspect the SQLite DB.
- Orchestration: Run Flowise in Docker and build a chatflow: ChatOpenAI → SQL Database Chain
- Test: Ask real questions, validate results in DBeaver.
- Iterate: Fix schema, prompts, and node settings until answers are correct and stable.
4) Tools, Frameworks, and Data Used
- Dataset: Personal expenses CSV from Kaggle (any realistic set works).
- Database: SQLite
- DB Client: DBeaver (Mac/Win/Linux) for import/inspect/query.
- Orchestration: Flowise (Docker).
- LLM: OpenAI GPT-3.5 (or higher) via Flowise’s OpenAI node.
- OS Assumption: macOS, but commands are portable.
5) Implementation Steps
A) Prerequisites
- Install Docker Desktop (macOS) and start it.
- Install DBeaver (Community Edition is fine).
- Get your OpenAI API key (store it safely).
- Download dataset from Kaggle → a CSV (e.g., personal_expenses.csv).
Folder plan (example): Put your DB and CSV on your Desktop so Docker can mount them:
- ~/Desktop/expenses.db and ~/Desktop/personal_expenses.csv*
B) Create SQLite DB and import data (with DBeaver)
- Open DBeaver → Database → New Database Connection → select SQLite → Next.
- Database file: click Browse and Create: ~/Desktop/expenses.db.
- Connect.
- In the new connection, right-click → SQL Editor → run this schema (adjust columns to match your CSV):

- Import CSV:
· Right-click the database → Tools → Data Transfer → Import data → choose. CSV → pick ~/Desktop/personal_expenses.csv.
· Map columns carefully (use preview). Finish wizard.
- Sanity check:
*SELECT FROM personal_expenses LIMIT 5;
C) Run Flowise in Docker
In Terminal execute below commands
# Pull, Stop & remove if you had an older container
docker pull flowiseai/flowise:latest
docker stop flowise 2>/dev/null || true
docker rm flowise 2>/dev/null || true
# Run Flowise and mount your Desktop to /data inside the container
docker run -d -p 3000:3000 \
-v flowise_data:/root/.flowise \
-v ~/Documents/flowise-project/db:/data \
--name flowise flowiseai/flowise:latest
- Flowise UI: http://localhost:3000
- Inside the container, your Mac folder is visible at /data.
# Verify mount
docker exec -it flowise sh -lc 'ls -l /data'
D) Add your OpenAI credential in Flowise
-
In Flowise UI, go to Credentials.
-
Add OpenAI credential → paste your API key → save.
E) Build the minimal chatflow
— Nodes (left → right):
1. ChatOpenAI
· Connect Credential: your OpenAI key.
· Model Name: gpt-3.5-turbo(or better)
· Temperature: 0 (for deterministic SQL).
2. SQL Database Chain
· Database: SQLite
· Connection path: /data/expenses.db
· Additional Parameters (optional but helpful if model complains about tokens):
o Include Tables: personal_expenses
o Sample table’s rows info: 3 to 5 rows
o Top Keys: 10
— Connection in Flowise:
ChatOpenAI (Output) → SQL DataBase Chain (Output)
Save the flow.

F) Test queries
- What are my total expenses in the year 2024?

- How much did I spend using credit card transaction in 2025 year?

- what is my average spend daily in all years?

6) Key Challenges and How They Were Overcome
a) SQLite path not found in Flowise
Fix: Mount Desktop into the container and always point to /data/expense.db
b) Model prints SQL but no results
o Fix A: Use SQL Database Chain correctly wired.
o Fix B: Reduce table sample size / included tables to avoid token blow-up.
c) Wrong totals (e.g., grouping by datetime)
o Fix: Use date extraction (substr) and no GROUP BY when you only want a single sum.

7) Results and Outcomes
a) A working local personal-expense bot that:
-
Accepts natural-language questions
-
Generates SQL
-
Returns summarized results from SQLite.
b) Verified correctness against DBeaver queries.
8) Lessons Learned
· I explored the Flowise platform, grasped its fundamentals, and understood how to set it up locally with Docker.
· Database hookup clicked when I realized Flowise runs in Docker bind ~/Desktop:/data and point to /data/expenses.db
· Defining the SQLite schema first and importing via DBeaver made clean, predictable data.
· For dates, use stable filters like substr(datetime,1,7)=’YYYY-MM’ (not grouping by raw timestamps)
· Setting Temperature = 0 and limiting to the personal_expenses table gave accurate, deterministic SQL.
9) Future Improvements / Next Steps
· Set up a Teams Incoming Webhook and add a Flowise tool to post the bot’s answers into a chosen channel.
· Add SQLite logging so each Teams Q&A (question, SQL, answer, timestamp) is saved to conversation_log.
· Switch the chatflow to a Tool Agent that automatically calls “post to Teams” and “log to DB” after generating the answer.
· Implement two-way Teams chat (user asks in Teams, bot replies there) via an Azure AD app + Graph/Bot Framework with required permissions.
· Prepare a Power Automate relay as a fallback path to forward Teams messages to Flowise and post replies back.
10) Conclusion
You now have an end-to-end recipe to build a local, private expense-analysis chat bot:
· Data in SQLite, visible via DBeaver
· LLM orchestration in Flowise (Docker)
· Natural language to SQL and back to clear answers
This stack is lightweight, cost-effective, and user-friendly. The bot already provides quick spend analytics, and its foundation is solid for future automation.
11) References
- Flowise Docs: https://docs.flowiseai.com/
- SQLite Docs: https://www.sqlite.org/docs.html
- DBeaver Docs: https://dbeaver.com/docs/dbeaver/
- Docker Docs: https://docs.docker.com/
- CSV File: https://api.csvgetter.com/p2WDqSaBAGEjp6RpiDPB
메타데이터
- post_id
- 55d77dd2e41d
- slug
- personal-expense-tracker-with-flowise-55d77dd2e41d
- url
- https://medium.com/@rithikagurram.2000/personal-expense-tracker-with-flowise-55d77dd2e41d
- canonical_url
- https://medium.com/@rithikagurram.2000/personal-expense-tracker-with-flowise-55d77dd2e41d
- author_url
- https://medium.com/@rithikagurram.2000
- status
- ok
- fetched_at
- 2026-06-25 07:00:49