What This Workflow Does
The AI Multimodal Expense Tracker is a Telegram-based financial assistant powered by Gemini AI that transforms how you log expenses. It accepts multiple input formats including text messages, voice notes, and photo receipts, automatically processing them into organized expense records stored in Google Sheets. The workflow intelligently categorizes expenses, converts between currencies, and generates daily budget reports without requiring manual data entry.
How It Works
This workflow operates through a sophisticated routing system that handles different types of input data:
- The telegramTrigger node listens for all incoming Telegram messages from your account
- A switch node routes messages based on content type: text commands, audio files, or image attachments
- Each input type is sent to a specialized Gemini AI agent that understands the context and extracts relevant expense information
- The code node processes the AI response and formats it for storage
- Expense data is automatically written to a Google Sheets spreadsheet for persistent record-keeping
- The workflow generates daily summaries and sends them back via Telegram for budget awareness
- A wait node handles timing between requests to prevent rate limiting
Use Cases
- Receipt Scanning: Photograph a receipt while traveling and the AI instantly extracts the amount, merchant, and category, storing it in your expense tracker without manual typing
- Voice Logging: Record a quick voice memo saying “spent 25 dollars on coffee” and the workflow transcribes and logs it automatically
- Multi-Currency Tracking: Expenses in different currencies are recognized and converted to your base currency for accurate budget tracking across international transactions
- Smart Budget Management: The workflow monitors spending patterns and alerts you when you approach budget limits in specific categories
- Daily Financial Reports: Receive automated daily summaries showing total spending, category breakdowns, and remaining budget via Telegram
Nodes Used
- telegramTrigger: Listens for incoming messages, voice notes, and photo uploads from Telegram
- switch: Routes messages to appropriate handlers based on message type and content
- @n8n/googleGemini: AI engine that understands and processes multimodal input to extract expense details
- googleSheets: Cloud storage for expense records with built-in spreadsheet functionality for analysis
- code: Custom JavaScript processing for data transformation and business logic
- set: Sets variables and prepares data for downstream nodes
- if: Conditional logic for decision branching in the workflow
- telegram: Sends messages and reports back to the user
- wait: Implements delays to manage API rate limits and avoid throttling
- dataTable: Visualizes and manages expense data within the workflow interface
- stickyNote: Documentation nodes for workflow explanations and setup instructions
Prerequisites
- A Telegram account with the ability to create a bot token via BotFather
- A Google account with Google Sheets access for expense storage
- A Google Cloud project with Gemini AI API enabled and configured
- n8n instance running locally or on a cloud server with outbound internet access
- API credentials for Google Sheets and Gemini configured in n8n
- Basic knowledge of setting up Telegram bots and Google API credentials
Difficulty Level
Intermediate. This workflow requires basic setup of external services (Telegram bot, Google APIs) but provides detailed configuration through its UI. No custom code modifications are necessary for basic functionality, though users can customize the Gemini AI prompts and expense categories to fit their needs. Understanding of workflow routing logic and API authentication is recommended.
This workflow template is shared under the n8n fair-code license. Free to use and modify.
Leave a Reply