Snapshot
Feyntech.AI's internal finance dashboard. A Google Apps Script bound to the company Gmail polls every 15 minutes, parses HDFC's transaction emails, classifies the type (vendor payment, payroll, service charge, refund, internal transfer), and posts a structured row into the dashboard. An inline AI chatbot answers questions over the ledger. Built fast, used daily.
Context
In-house tool, Feyntech.AI. The company runs through a single HDFC current account, and every transaction lands in Gmail as a bank notification - credits, debits, refunds, payroll batches. The accountant was reading them one at a time and copying numbers into a spreadsheet. The brief: get the dashboard to a place where the accountant doesn't have to leave it.
Problem
Feyntech's finance day-to-day has a specific shape:
- The "statement" isn't a statement - it's hundreds of HDFC notification emails arriving in real time. Reconciling means reading email.
- The type of a transaction matters as much as the amount. A vendor payment, a payroll batch, and a service charge are accounted for differently even when they look similar in a row of numbers.
- The accountant cares about audit, not aesthetics. Every number on the dashboard must trace back to the email it came from.
- "Where did the money go this week" should be one question, not a sheet of filters.
Approach
Google Apps Script poller. An Apps Script bound to the company Gmail runs on a 15-minute trigger. It pulls unread HDFC transaction emails, extracts amount, counterparty, reference, and timestamp from a single canonical template, and writes a structured row into the dashboard's database. The Script is the integration; the Next.js app reads what the Script writes.
Transaction type classification. Each parsed row is categorized into a fixed bucket: vendor payment, employee payroll, service charge, refund, internal transfer, or miscellaneous. The classifier reads counterparty + description against a small set of rules the accountant pre-defined. Type lives next to amount, so the period view sums by category cleanly without after-the-fact reclassification.
Inline AI chatbot. Ask "what did we spend on AWS this quarter" and get the answer with the transactions cited inline. The chatbot is grounded against the parsed ledger - it can't surface a transaction that isn't in the database, and every claim links back to its source row.
Payment escalation. Outstanding invoices show up in a worklist with an auto-generated email draft. The accountant approves; the email goes.
RLS + audit log. Supabase Row-Level Security guards the table layer; every write lands an audit log row. The dashboard is internal, but it touches numbers that matter.
Tech
- Next.js 16 (App Router, React Server Components)
- Supabase (Auth + Postgres with RLS, Storage)
- Google Apps Script - Gmail poller bound to a 15-minute time trigger
- Anthropic SDK - grounded chatbot over the parsed ledger
- Drizzle ORM
- Fly.io deployment
What I learned
A finance tool's job is to be boring. Every flourish is a place an auditor gets suspicious. The wins are: ingest fast, cite everything, never lose a transaction, and let the accountant ask the question in English. A single bank with a single template doesn't need a clever parser - it needs a trigger, a row, and a chatbot that won't lie. The aesthetic is a side effect.
