A Telegram bot that tracks your spending
A Telegram bot that logs each expense from a short message and sends a weekly summary by category, free and with no code.
The steps
1. Create a new bot in Telegram
A new Telegram bot with your own name and a saved token. The token is the key Make will use to receive the expenses you text the bot. About 3 minutes.
2. A Make account, and the bot starts listening
A free account in Make, the service that runs your bot in the cloud, and a scenario that wakes up every time you message the bot. In Make a workflow is called a scenario and each circle in it is a module. About 6 minutes.
3. Open an expenses store inside Make
A store where each expense is saved as a row, like a small spreadsheet inside Make. In Make it's called a data store. Before it goes a router, a fork that will later separate an expense from a summary request. About 4 minutes.
4. The bot logs and confirms
Every message is saved in the store with the week it was written in, and the bot answers that the expense was logged. About 3 minutes.
5. Switch it on, and your first expense is logged
You text the bot an expense, and it answers that it's logged. A new scenario starts switched off, so this step turns it on. From then on it works 24/7, even while your phone is locked. About 2 minutes.
6. Only you, and a second route for a summary request
First a filter that lets in only messages from your own chat, so strangers can't ask for your summary or add expenses to your totals. Then summary isn't logged as an expense, and a second route fetches all of this week's expenses from the store. About 7 minutes.
7. Gemini reads the list and sums it up
All of this week's expenses join into one list, and Gemini, Google's AI, finds the amounts in it and sorts them by category. About 6 minutes.
8. Text summary, and get your week
Gemini's summary comes back to you in Telegram, and you know how much you spent this week and on what. About 4 minutes.
What you'll have at the end
A bot you text coffee 18 and it logs the expense. Text it summary, and Gemini sends back this week's spending by category, with a total.
What it proves
Accounts to create
TelegramWhere you chat with the bot; freeDocsFree offerWhat it costs: Free. Make gives 1,000 credits a month. Logging an expense uses about 3 credits, and a summary a few more, depending on how many expenses the week has. The free plan has room for one data store, which is all the bot needs.
Have this ready
- A phone with Telegram
- An email address to sign up to Make. If you built the AI bot already, you can use the same account
- About 30 minutes. The bot logs its first expense after about 15
How it fits together
- Telegram: you text coffee 18
- Make: Router: an expense or a summary?
- Data store: the expense is saved
- Gemini: sums up the week
- Telegram: the confirmation or summary comes back