Back to Templates

Multi-modal expense tracking with GPT-4, Gemini OCR, and voice via Telegram

Created by

Created by: Oussama || oussama
Oussama

Last update

Last update 4 months ago

Categories

Share


This n8n template creates an intelligent expense tracking system πŸ€– that processes text, voice, and receipt images through Telegram. The assistant automatically categorizes expenses, handles currency conversions 🌍, and maintains financial records in Google Sheets while providing smart spending insights πŸ’‘.

Use Cases:

  • πŸ—£οΈ Personal expense tracking via Telegram chat
  • 🧾 Receipt scanning and data extraction
  • πŸ’± Multi-currency expense management
  • πŸ“‚ Automated financial categorization
  • πŸŽ™οΈ Voice-to-expense logging
  • πŸ“Š Daily/weekly/monthly spending analysis

How it works:

  1. Multi-Input Processing: Telegram trigger captures text messages, voice notes, and receipt images.
  2. Content Analysis: A Switch node routes different input types (text, audio, images) to appropriate processors.
  3. Voice Processing: ElevenLabs converts voice messages to text for expense extraction.
  4. Receipt OCR: Google Gemini analyzes receipt images to extract amounts and descriptions.
  5. Expense Classification: An LLM determines if the input is an expense or a general query.
  6. Expense Parsing: For multiple expenses, the AI splits and normalizes each item.
  7. Currency Conversion: An exchange rate API converts foreign currencies to USD.
  8. Smart Categorization: The AI agent assigns expenses to predefined categories with emojis.
  9. Data Storage: Google Sheets stores all expense records with automatic totals.
  10. Intelligent Responses: The agent provides spending summaries, alerts, and financial insights.

Requirements:

  • 🌐 Telegram Bot API access
  • πŸ€– OpenAI, Gemini, or any other AI model
  • πŸ—£οΈ ElevenLabs API for voice processing
  • πŸ“ Google Sheets API access
  • πŸ’Ή Exchange rate API access

Good to know:

  • ⚠️ Daily spending alerts trigger when expenses exceed 100 USD.
  • 🏷️ Supports 12 predefined expense categories with emoji indicators.
  • πŸ”„ Automatic currency detection and conversion to USD.
  • 🎀 Voice messages are processed through speech-to-text.
  • πŸ“Έ Receipt images are analyzed using computer vision.

Customizing this workflow:

  • ✏️ Modify expense categories in the system prompt.
  • πŸ“ˆ Adjust spending alert thresholds.
  • πŸ’΅ Change the base currency from USD to your preferred currency.
  • βœ… Add additional expense validation rules.
  • πŸ”— Integrate with other financial platforms.