Build a Telegram Expense Bot with n8n: Just $0.01 Per Entry

Move expense tracking into Telegram with a 15-node, AI-free workflow that logs in one line of text—51 tests, zero failures.
The article dissects an n8n workflow that moves expense tracking from a standalone app into Telegram, using a single line of text as input to eliminate manual-entry friction. The 15-node workflow centers on a pure-JavaScript heuristic parser—regex extracts amounts, keyword mapping assigns categories. Designs are deliberately restrained: unknown merchants go to "other" rather than a wrong bucket, and messages without amounts get a question instead of a guess. 51 messages tested with zero failures; all 46 amount-bearing messages parsed 100% correctly; slowest response 1.53s. The author publishes his mislog and notes three pre-launch changes: swap heuristics for a vision model, replace the local ledger with Sheets/Airtable, and replace the simulated Telegram side with a BotFather token.
The Fatal Flaw of Expense Apps: Manual Entry
At the end of every month, you open your banking app and the balance is lower than expected. $847 is gone—coffee, Uber, that 1 a.m. Amazon order—and you genuinely can't say where it went. The scene is painfully familiar. Every expense-tracking app on the market fails at the same point: they all require you to enter data manually. Buy a coffee, and you have to open the app, tap add, type the amount, pick a category, save. Forty times a week—nobody keeps that up. So the app ends up holding three entries from January while your money quietly evaporates. The real friction isn't budgeting itself; it's typing.
A creator on YouTube offers a different angle: instead of hunting for a better app, just skip the app entirely. You already send messages every day—so put the expense tracker where your thumb already lives: Telegram. One line of text, no forms, no category pickers. The workflow handles the parsing. "Groceries 67" automatically becomes the groceries category, $67, logged and confirmed within a second.
Breaking Down the 15-Node Workflow
To keep the demo measurable rather than mystical, the creator lays out a few ground rules upfront: there's no Telegram bot token in the lab, so the Telegram side is simulated—he feeds the raw JSON payload that Telegram would send straight into the workflow, and clearly marks where your token goes. (BotFather is free, takes two minutes.) The core brain is keyword heuristics, not a live AI model—plain JavaScript matching amounts and category keywords. The ledger is stored as a local file, not Google Sheets. Everything else is real: real webhook, real execution, real timing.

The workflow has 15 nodes total, built in about 45 minutes—most of that time spent organizing the category keyword list:
The Webhook node is the front door. Messages arrive as JSON payloads containing sender, text, and timestamp. An IF filter clears out empty messages and junk markers before any expensive operation runs. The Code node is the heuristic brain—read "Uber 1820" and extract three things: amount 1820, merchant Uber, and category transport from the keyword map. It handles the various ways people write numbers: with or without a dollar sign, with or without decimals, whole amounts.
The routing logic that follows is where things get interesting: a command check determines whether the message is "/week"—if so, it skips logging and goes straight to the summary. An amount check handles messages with no amount, like a bare "lunch?"—it doesn't guess, it asks you for a number. Then the ledger node appends the expense to a local file and reads back today's running total. The confirmation reply looks like "Logged. Uber 1820 Transport. Today so far, $41.10." The summary path pulls the last seven days, aggregates by category, compares to the prior seven days, and replies with the full breakdown.

A Webhook is a mechanism that lets an external service push data to your program proactively. Traditional APIs require you to constantly poll the server for new messages, but a webhook is like leaving a URL behind—the moment Telegram receives a message, it immediately POSTs the JSON data to that address. The JSON payload mentioned in the article is the format of this push, shaped like {"sender":"...","text":"Groceries 67","timestamp":...}, and all subsequent parsing in the workflow is based on this structure. BotFather is Telegram's official bot management entry point—send /newbot in a chat and you can create a bot for free and get a token. That token is the credential your program uses to call Telegram's API and receive messages; plug it into n8n's Telegram trigger as described in the article to complete the connection.
The Parser's Deliberate Restraint
The parser is where most demos cheat, and this one's approach deserves a closer look. The amount regex catches $4.50, $18.20, 67—with or without the dollar sign, with or without decimals. The category map covers roughly 40 keywords across dining, transport, groceries, subscriptions, housing, shopping, health, and more.
There's one deliberate trade-off in the design: any unrecognized merchant goes into "other" rather than being forced into a wrong category. The creator's reasoning: misclassification is worse than no classification—it silently poisons your data. Likewise, when a message contains no amount at all, the bot asks you rather than making something up. A tracking tool that invents amounts is a liability, not an asset.
That restraint runs through the entire product. He stresses repeatedly that a tool which hallucinates your spending records is more dangerous than no tool at all.
Heuristic rules refer to methods that don't rely on machine learning models but instead use hand-written, experience-based logic to parse data. This article uses keyword mapping plus regex: the regex extracts amounts from text (e.g., matching \$?\d+(\.\d+)?), and the keyword table maps words like "Uber" and "Starbucks" to categories like transport and food. The advantages are zero model cost, predictability, and speed (millisecond-level response); the cost is that it can only handle phrasings you've pre-taught it—unseen sentence structures, spelling variants, or multi-currency inputs may fail. This is precisely why the author explicitly recommends swapping in a vision model before going to production: heuristics work for fixed-format text input, but a vision model is needed to handle unstructured information like receipt photos.
Real Results from 51 Test Messages
This is the most convincing part of the whole piece. The creator constructed 51 test messages covering various styles: casual lowercase, with dollar signs, without, decimals, whole numbers, merchant-first, amount-first, and edge cases—"lunch?" with no amount, "coffee" with no number, a few junk messages, and the "/week" summary command.

Results: zero failures. Every message returned HTTP 200. Of the 46 messages containing amounts, all 46 logged the correct amount and the correct category—100% parsing accuracy. Messages with no amount were correctly questioned. Junk messages were filtered with no reply. Zero fabricated amounts—not one entry was logged that wasn't in the message.
On response times: fastest 0.53 seconds, median 0.82 seconds, slowest 1.53 seconds. In his words, "every single reply landed under a second." Two of his favorite cases: an 11 p.m. "Uber dollar 1820"—dollar-sign amount, merchant, late-night timestamp all parsed correctly and categorized as transport; and that bare "lunch?"—no amount, no guessing, the bot asked "try coffee 450." That restraint is the entire product's value.
Cost Comparison and Three Changes Before Going to Production
Cost is the headline selling point. For reference: an $8/month expense app subscription—if you log 100 entries a month, that's $0.08 per entry just from the subscription, before counting the manual entry time. This workflow costs a fraction of a cent per entry, and the entry method is a single text message.
The creator hides nothing and explicitly lists three things to change before launch:
- The parser is heuristic. It only handles taught formats. Real deployments facing messy receipt photos need a vision model, which is billed per image.
- The ledger is a local file. You'd point this node at Google Sheets or Airtable—same shape, swap in real storage.
- The Telegram side is simulated. Going live just takes two minutes of free bot creation on BotFather, pasting the token into n8n's Telegram trigger, and replacing the webhook node with your own trigger. The workflow logic stays the same—only the front door changes.
Why This Demo Deserves Trust
The creator makes a pointed remark: "You've probably seen those automation videos where everything runs perfectly on the first try. This is the stuff you won't see in those videos." He publicly shares his mislog—every instance where the heuristic parser got it wrong, every edge case, including the precise response time of the slowest run. His standard is sharp: if a demo has no mislog, it wasn't measured.
This is exactly what sets this content apart from other "AI automation" videos. It labels what was measured, what was estimated, and what was simulated—and it openly tells you which parts aren't production-ready. For a tool demo aimed at everyday users, that honesty is itself a rarity.
If you want to replicate this: the starter kit is the workflow JSON—import it into n8n, swap in your bot token, point the ledger at Sheets. 15 nodes, one evening, and you'll never wonder where your money went again.
Mislog is a term the creator coined, referring to a log that records "failures and deviations," as opposed to the usual screenshots of successful demos. In automation and AI demos, a video that only shows smooth results typically hides two categories of information: first, the failure rate (how many messages didn't parse correctly); second, the tail of the latency distribution (how slow the slowest run actually was). Publishing a mislog is essentially laying both categories out in the open, letting viewers estimate real-world performance for themselves. The line "if a demo has no mislog, it wasn't measured" is fundamentally distinguishing between a demo and a measurement: a demo only proves possibility; a measurement delivers success rates, latency percentiles, and failure modes—the quantitative metrics usable for decision-making.
One-line Summary
Move expense tracking into Telegram with a 15-node, AI-free workflow that logs in one line of text—51 tests, zero failures.
Paragraph Summary
The article dissects an n8n workflow that moves expense tracking out of a standalone app and into Telegram. It identifies manual entry as the real point of failure for all tracking apps, so it uses a single-line text message as the input interface. The workflow has 15 nodes, anchored by a pure-JavaScript heuristic parser: regex extracts amounts, keyword mapping assigns categories, and it handles styles with or without dollar signs, decimals, or whole numbers. The design is deliberately restrained—unrecognized merchants go to "other" rather than being forced into a wrong bucket, and messages with no amount get a question rather than a guess. 51 test messages, zero failures; 46 messages with amounts parsed 100% correctly; slowest response 1.53 seconds. The author publishes his mislog and notes three pre-launch changes: swap heuristics for a vision model, replace the local ledger with Sheets/Airtable, and replace the simulated Telegram side with a BotFather token.
Related articles

Gemini 4 Argon Hands-On: AI Builds Board Games, Constructs Temples, and Trains Robots Autonomously
Gemini 4 Argon hands-on roundup: AI autonomously builds a desk racetrack and temple in Blender, writes a ray tracing engine, trains a humanoid robot to sink 7 shots, plus API pricing and developer access.

The Magic Octagonal Coin: Why Only 9% of People Can Predict Its Flip?
Only 9% of people can correctly predict the Magic Octagon coin flip. This article explains its spatial rotation mechanism, common cognitive pitfalls, and a new hypothesis based on Relevance Theory, exploring the limits of human spatial reasoning.

Sam Altman: AI Is Entering the Era of Scientific Discovery — Math Breakthroughs Will Replicate in Biology and Energy
Sam Altman says AI is entering the era of scientific discovery — math breakthroughs will replicate in biology, materials science, and energy to help develop new drugs and energy sources.