Track Money Via Telegram Bot
Log income and expenses from Telegram messages. An AI agent parses transactions by category and currency, updates a Google Sheet, and sends instant confirmations.
Money Tracker Bot
This workflow helps you track your expenses and income by analyzing your Telegram messages. When you send a message to your Telegram bot describing a financial transaction, it automatically logs the details into a Google Sheet and confirms the entry back to you.
It does 5 things:
- Listens for new messages sent to your Telegram bot.
- Uses an AI agent to convert text messages into structured transaction data (type, amount, currency, category, description).
- Filters out messages that are not financial transactions.
- Records the transaction details into a designated Google Sheet.
- Sends a confirmation message back to your Telegram chat.
What You Need
- A Telegram bot with API access (you'll need the bot token).
- A Needle account connected to your Telegram bot.
- A Google Sheets account with access to a spreadsheet for logging transactions.
- Google Sheets connector authenticated in Needle.
- Access to Needle's AI node for message parsing.
How the Flow Works
| Node | Description |
|---|---|
| Telegram Bot API – Message Updates | Triggers the workflow whenever a new message is received by your Telegram bot. |
| AI Node | Processes the Telegram message text to extract structured JSON with transaction details, or marks it as "ignore" if the message isn't financial. |
| Code Node | Filters out messages labeled as "ignore" to prevent logging irrelevant data. |
| Google Sheets – Upsert Row | Adds the extracted transaction (type, amount, currency, category, description) as a new row in your Google Sheet. |
| Telegram Bot API – Send Text Message | Sends a confirmation message back to you, indicating the transaction was logged successfully. |
Output
At the end of this workflow, your Google Sheet will have a new row for each valid transaction parsed from your Telegram messages. You'll also receive a reply message in Telegram confirming the logged transaction details, including the amount, currency, and category.
Setup Tips
- Make sure your Google Sheet has the following columns starting from column A:
| Column | Field |
|---|---|
| A | transaction_type |
| B | amount |
| C | currency |
| D | category |
| E | description |
- Connect your Telegram bot token and Google Sheets account in the respective connector nodes.
- Point the Google Sheets node to your target spreadsheet and worksheet.
Notes
- The AI agent is configured to recognize Indian rupees (₹, rs, rupees) and US dollars ($, usd) based on message content. You can adjust the prompt to support additional currencies.
- Messages not related to money are automatically ignored and not logged.
- For best results, send transaction messages with clear amounts and context keywords (e.g., "Spent ₹500 on food", "Received $100 salary").
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.
