Data Processing & Analysisbeginner
October 30, 2025
7 min read
35 minutes
Automated Financial Tracker: From Telegram Invoices to Notion with Gemini Insights
Turn receipt photos into organized expense data automatically. Send via Telegram, process with Gemini AI, and track spending in Notion reports.
By Nayma Sultana

You finish a business lunch. The waiter brings the receipt. You snap a photo with your phone, thinking you'll log it later. Fast forward two weeks, and you're scrolling through 47 random photos trying to remember which coffee was personal and which was client-related. Tax season arrives, and you're piecing together expenses from blurry photos, crumpled papers, and vague credit card statements.
The problem isn't that you're disorganized. The problem is that expense tracking demands instant action in moments when you're busy doing literally anything else. Manual data entry feels like punishment for spending money. Nobody wants to type item names, quantities, and prices into a spreadsheet after a long day.
This n8n workflow eliminates that friction entirely. Take a photo of any receipt through Telegram. The automation handles everything else. It extracts every detail using AI vision, categorizes expenses automatically, stores everything in Notion, and even sends you visual spending reports on schedule. No typing. No data entry. No forgotten receipts.
How This Automation Transforms Receipt Management
The workflow operates on two parallel tracks. The first handles real-time receipt processing. You send a photo, and within seconds you receive a text summary of what was extracted while the system quietly files everything into your Notion database. The second track runs on autopilot, generating periodic spending reports with charts that show exactly where your money goes by category.
What makes this powerful is the intelligence layer. The AI doesn't just read text from images. It understands context. It knows that "Qty" means quantity even if the receipt uses abbreviations. It calculates tax when totals don't match item sums. It assigns logical categories based on merchant names and item descriptions. And when information is missing, like a date, it uses sensible defaults instead of breaking.
What You'll Need Before Building
Required Services and APIs
Building this expense automation requires a few connected services. You'll need an n8n instance, either self-hosted or through n8n Cloud. A Telegram bot provides your input interface. Create one through BotFather in about 30 seconds. You'll receive a bot token that connects Telegram to your workflow.
For the AI vision capabilities, you need access to Google Gemini API. Gemini handles optical character recognition and intelligent data extraction from receipt images. It's particularly good at understanding various receipt formats and layouts. Finally, you need a Notion account with API access. Set up a database called "Invoice Tracker" with specific properties: Date, Name, Quantity, Price, Tax, Total, and Category. Notion serves as your permanent expense repository.
Key n8n Nodes in This Workflow
The workflow combines several specialized nodes working in sequence:
- Telegram Trigger and Telegram nodes for receiving photos and sending responses
- Edit Image node for processing receipt images
- Basic LLM Chain with Google Gemini for AI-powered data extraction
- Structured Output Parser for consistent JSON formatting
- Split Out node for handling multi-item receipts
- Notion nodes for database operations
- Schedule Trigger for automated reporting
- Summarize node for aggregating spending by category
- Code node for chart data transformation
- Quick Chart node for visual report generation
Building Your Expense Tracker Step by Step
Step 1: Create the Telegram Receipt Intake
Start with a Telegram Trigger node configured to listen for message updates, specifically photos. When someone sends a photo to your bot, this node captures the entire message object including multiple image resolutions. Telegram provides several sizes of each photo. Connect a second Telegram node set to file retrieval mode, targeting the highest quality version using the largest file_id from the array. This ensures your AI gets the clearest possible image for text extraction. The retrieved file flows into an Edit Image node set to information mode, which prepares the binary data for processing by the AI.
img_1.png
Step 2: Extract Expense Data with AI Vision
The Basic LLM Chain node is where magic happens. Connect Google Gemini Chat Model as the language model. Configure the chain to accept image binary input using HumanMessagePromptTemplate set to imageBinary type. The prompt is detailed and specific. It instructs the AI to extract date, item names, quantities, prices, total, tax, and category from the receipt. It provides fallback logic for missing dates and explains how to calculate tax when present. Most importantly, it defines eight spending categories: Food & Beverage, Transportation, Utilities, Shopping, Healthcare, Entertainment, Housing, and Education.
img_2.png
Connect a Structured Output Parser to enforce consistent formatting. Define a JSON schema with a message field for human-readable summaries and a summary array containing all transaction objects. Each transaction object includes required fields like id, name, qty, price, total, and category, with optional tax and date fields. This structure guarantees clean data regardless of receipt format variations.
Step 3: Store Everything in Notion Database
After AI extraction, the workflow splits into two paths. One sends the summary message back to Telegram so you get instant confirmation. The other handles data storage. Use a Split Out node to separate the summary array into individual transaction items. This matters for receipts with multiple line items. A grocery receipt might have 15 products. Split Out creates 15 separate execution flows, one per item.
img_3.png
Connect a Notion node configured to create database pages. Map each JSON field to its corresponding Notion property. Date requires format conversion from DD-MM-YYYY to YYYY-MM-DD using an expression. Category, Price, Quantity, Tax, and Total map directly. The Name field becomes the page title. Every item from every receipt now lives in searchable, filterable Notion database rows.
Step 4: Send Instant Receipt Confirmations
After the AI extracts expense data, you need immediate feedback that everything worked. The workflow branches into two parallel paths from the Basic LLM Chain output. One path handles database storage while the other focuses on user communication. Connect a Telegram node configured to send messages back to the original chat. Use the message field from the AI output, which contains a human-readable summary of what was extracted.
img_4.png
This confirmation message appears in your Telegram chat within seconds of sending the receipt photo. It lists all items found, their quantities and prices, the calculated total, and the assigned category. You know instantly if the AI correctly interpreted the receipt. If something looks wrong, you can manually correct it in Notion later. This immediate feedback loop creates confidence in the automation and helps you catch any extraction errors early.
Step 5: Generate Automated Visual Spending Reports
The second workflow operates on a completely independent schedule. Start with a Schedule Trigger set to your preferred interval, whether daily, weekly, or monthly. Connect a Notion node to retrieve database pages filtered by the past month. Feed this data into a Summarize node that groups by Category and sums the Total field, transforming hundreds of transactions into clean category totals.
img_5.png
Add a Code node that restructures this data into Chart.js format with labels and values arrays, then connect a Quick Chart node to generate a bar graph PNG. Finally, send this chart image through Telegram. You receive visual spending breakdowns automatically showing exactly where money goes. The bar graph makes patterns obvious at a glance. Food & Beverage dominating? Transportation costs creeping up? You'll spot trends immediately without digging through spreadsheets.
Why This Changes Personal Finance Management
The immediate benefit is time savings. What used to take 5 to 10 minutes per receipt now takes zero minutes. But the real transformation happens in behavior change. When logging expenses requires zero effort, you actually do it consistently. Complete data enables better decisions.
The visual reports create awareness that spreadsheets never achieve. Seeing a bar chart where Entertainment dwarfs Healthcare spending provokes reflection. Numbers in rows feel abstract. Visual comparisons feel real. You start making conscious choices about category balances.
For businesses, this workflow scales beautifully. Multiple team members can send receipts to the same bot. Add a user identification step, and you maintain separate expense tracking per person while centralizing data collection. Accounting teams get clean, categorized data instead of shoebox deliveries. Month-end reconciliation becomes data export instead of data archaeology.
Freelancers and contractors gain bulletproof tax documentation. Every business expense automatically logged with date, amount, category, and even tax extracted. When tax season arrives, you filter Notion by business categories and export. No missing receipts. No estimated amounts. No audit anxiety.
The automated reporting creates financial rhythm. Weekly spending summaries establish awareness without requiring active checking. You develop intuition about spending patterns. You notice when a category spikes before it becomes a problem. Prevention beats correction every time.
Your Receipts Deserve Better Than Shoeboxes
Financial tracking shouldn't feel like homework. This automation makes it invisible. One photo replaces five minutes of typing. Scheduled reports replace manual analysis. Notion storage replaces paper piles and scattered screenshots. The workflow runs 24/7, never forgetting, never procrastinating, never losing receipts.
Build this once, and your expense tracking transforms from dreaded chore to automatic background process. Your financial data becomes complete, organized, and actually useful. That's automation worth celebrating.
Share this article
Help others discover this content
Tap and hold the link button above to access your device's native sharing options
More in Data Processing & Analysis
Continue exploring workflows in this category

Data Processing & Analysisintermediate
1 min read
# Build an AI-Powered Conversational Survey Bot with n8n: Turn Static Forms into Dynamic Interviews
Nayma Sultana
Nov 15
Est: 40 minutes

Data Processing & Analysisintermediate
1 min read
Build an AI-Powered YouTube Parser with n8n
Mahedi Hasan Nadvee
Nov 13
Est: 45 minutes

Data Processing & Analysisadvanced
1 min read
Build a Smart AI Chatbot That Actually Knows Your Documents (Using n8n RAG Workflow)
Nayma Sultana
Nov 13
Est: 1 hour