inspiration

Expense tracking apps have a retention problem — most people abandon them within days. The reason is friction: open the app, pick a category, enter the amount, save. Nobody does that ritual for a ₹20 chai. But everyone texts, all day, every day. So we asked a simple question: what if logging an expense was as effortless as sending a text?

What it does

BoloKharcha is a Telegram bot that understands expenses written in natural Hinglish — the way people actually talk about money in India.

Type chai 20, auto 60 office, or grocery 850 big bazaar and the bot:

  1. Parses the message with Google Gemini into structured data — item, amount, and category
  2. Logs it as a row in the user's own Google Sheet
  3. Confirms instantly on Telegram: ✅ chai — ₹20 · food

No app to install. No forms to fill. No learning curve. The chat app you already use becomes your expense tracker.

How we built it

The entire backend is a single viaSocket flow — zero servers, zero hosted code:

  • Telegram Bot API (via BotFather) serves as the user interface
  • A viaSocket trigger captures every message sent to the bot
  • Gemini 2.5 Flash (Google AI Studio) converts free-form Hinglish into structured JSON: {"item": "chai", "amount": 20, "category": "food", "is_expense": true}
  • Google Sheets acts as the database — one the user fully owns and can chart, filter, or export anytime
  • A Telegram Send Message action closes the loop with instant confirmation

The AI parsing is the heart of the product. "chai 20", "20 ki chai", and "chai ke 20 rupaye" all mean the same thing — regex can't handle that variability, but a well-designed few-shot Gemini prompt handles Hinglish grammar, flexible word order, merchant names, and even detects whether a message is an expense at all.

Challenges we ran into

  • Gemini quota debugging: Our first model choice (Gemini 2.0 Flash) returned 429 — limit: 0. Reading the error body revealed the free tier for that model had been discontinued, not exhausted. Switching to Gemini 2.5 Flash resolved it — a good lesson in reading error payloads, not just status codes.
  • Live payload capture: The trigger initially showed only sample data; we had to publish the flow and re-capture to verify real Telegram payloads end-to-end.
  • Structured output mapping: Wiring Gemini's JSON output into individual spreadsheet columns required careful variable mapping across steps.

What we learned

  • Prompt design with few-shot examples turns an LLM into a reliable, deterministic parser
  • No-code orchestration (viaSocket) lets a team ship a complete product in hours, not days
  • The best UX is often no UI at all — meeting users inside tools they already use

What's next for BoloKharcha

  • Conversational queries: "is mahine food pe kitna?" — our parser already returns an is_expense: false flag for questions; a flow branch will route these to Gemini with sheet data as context
  • Weekly AI digest: a scheduled flow that messages "You spent ₹1,840 this week — 60% on food 👀"
  • Voice notes and UPI screenshots: same pipeline, richer inputs via Gemini's multimodal capabilities

Built With

Share this project:

Updates

Submission history