Skip to main content

Track expenses automatically with Telegram Bot using GPT-4o, OCR and voice recognition

Workflow preview

Workflow preview
100%
Track expenses automatically with Telegram Bot using GPT-4o, OCR and voice recognition preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Personal Expense Tracker Bot AI powered Telegram bot for effortless expense tracking. Send receipts, voice messages, or text the bot automatically extracts and categorizes your expenses. Key F...

Best for

  • Personal Productivity automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.telegramtrigger, @n8n/n8n-nodes-langchain.mcpclienttool, @n8n/n8n-nodes-langchain.toolcalculator, @n8n/n8n-nodes-langchain.agenttool, @n8n/n8n-nodes-langchain.lmchatopenrouter, @n8n/n8n-nodes-langchain.toolthink, n8n-nodes-base.switch

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Dmitrij Zykovic.

Original n8n.io source

1.1 Workflow description

Title
Track expenses automatically with Telegram Bot using GPT-4o, OCR and voice recognition
Workflow name
Track expenses automatically with Telegram Bot using GPT-4o, OCR and voice recognition

Personal Expense Tracker Bot πŸ’°

AI-powered Telegram bot for effortless expense tracking. Send receipts, voice messages, or text - the bot automatically extracts and categorizes your expenses.

✨ Key Features

  • πŸ“Έ Receipt & Invoice OCR - Send photos of receipts or PDF invoices, AI extracts expense data automatically
  • 🎀 Voice Messages - Speak your expenses naturally, audio is transcribed and processed
  • πŸ’¬ Natural Language - Just type "spent 50 on groceries" or any text format
  • 🌍 Multilingual - Processes documents in any language (EN, DE, PT, etc.)
  • πŸ“Š Smart Statistics - Get monthly totals, category breakdowns, multi-month comparisons
  • πŸ”’ Private & Secure - Single-user authorization, only you can access your data
  • ⚑ Zero Confirmation - Expenses are added instantly, no annoying "confirm?" prompts

🎯 How It Works

  1. Send expense data via Telegram:

    • Photo of receipt
    • PDF invoice
    • Voice message
    • Text message
  2. AI processes automatically:

    • Extracts amount, date, vendor
    • Categorizes expense
    • Stores in organized format
  3. Query your expenses:

    • "Show my expenses for November"
    • "How much did I spend on groceries?"
    • "Compare last 3 months"

πŸ“‹ Expense Categories

Groceries, Transportation, Housing, Utilities, Healthcare, Entertainment, Dining Out, Clothing, Education, Subscriptions, Personal Care, Gifts, Travel, Sports, Other

πŸ”§ Setup Requirements

1. Telegram Bot

Create a Telegram bot via @BotFather and get your API token.

Configure credentials for nodes:

  • Input, WelcomeMessage,
  • GetAudioFile, GetAttachedFile, GetAttachedPhoto
  • ReplyText, NotAuthorizedMessage, DeleteProcessing

2. OpenRouter API

Get API key from OpenRouter for AI processing.

Configure credentials for:

  • Gpt4o (main processing)
  • Sonnet45 (expense assistant)

3. Ainoflow API

Get API key from Ainoflow for storage and OCR.

Configure Bearer credentials for:

  • GetConfig, SaveConfig
  • ExtractFileText, ExtractImageText
  • TranscribeRecording
  • JsonStorageMcp (MCP tool)

πŸ—οΈ Workflow Architecture

Section Description
Message Trigger Receives all Telegram messages
Bot Privacy Locks bot to first user, rejects unauthorized access
Chat Message / Audio Routes text and voice messages to AI
Document / Photo Extracts text from files via OCR and forwards to AI
Root Agent Routes messages to Expense Assistant, validates responses
Expense Assistant Core logic: stores expenses, calculates statistics
Result / Reply Sends formatted response back to Telegram
Cleanup / Reset Manual trigger to delete all data (⚠️ use with caution)

πŸ’¬ Usage Examples

Adding Expenses

πŸ“Έ [Send receipt photo]
β†’ Added: 45.50 EUR - Groceries (Lidl)

🎀 "Bought coffee for five euros"  
β†’ Added: 5.00 EUR - Dining Out (coffee)

πŸ’¬ "50 uber"
β†’ Added: 50.00 EUR - Transportation (uber)

Querying Expenses

"Show my expenses"
β†’ November 2025: 1,250.50 EUR (23 expenses)
   Top: Groceries 450€, Transportation 280€, Dining 220€

"How much on entertainment this month?"
β†’ Entertainment: 85.00 EUR (3 expenses)

"Compare October and November"  
β†’ Oct: 980€ | Nov: 1,250€ (+27%)

πŸ“¦ Data Storage

Expenses are stored in JSON format organized by month (YYYY-MM):

{
  "id": "uuid",
  "amount": 45.50,
  "currency": "EUR",
  "category": "Groceries",
  "description": "Store name",
  "date": "2025-11-10T14:30:00Z",
  "created_at": "2025-11-10T14:35:22Z"
}

⚠️ Important Notes

  • First user locks the bot - Run /start to claim ownership
  • Default currency is EUR - AI auto-detects other currencies
  • Cleanup deletes ALL data - Use manual trigger with caution
  • No confirmation for adding - Only delete operations ask for confirmation

πŸ› οΈ Customization

  • Change default currency in agent prompts
  • Add/modify expense categories in ExpenseAssistant
  • Extend Root Agent with additional assistants
  • Adjust AI models (swap GPT-4o/Sonnet as needed)

πŸ“š Related Resources

πŸ’Ό Need Customization?

Want to adapt this template for your specific needs? Custom integrations, additional features, or enterprise deployment?

Contact us at Ainova Systems - We build AI automation solutions for businesses.


Tags: telegram, expense-tracker, ai-agent, ocr, voice-to-text, openrouter, mcp-tools, personal-finance

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 4 - JsonStorageMcp

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1.1

Block 5 - Calculator

Type / Role
@n8n/n8n-nodes-langchain.toolCalculator - toolCalculator
Config choices
Version 1

Block 6 - ExpenseAssistant

Type / Role
@n8n/n8n-nodes-langchain.agentTool - agentTool
Config choices
Version 2.2

Block 7 - Gpt4o

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 8 - Think

Type / Role
@n8n/n8n-nodes-langchain.toolThink - toolThink
Config choices
Version 1.1

Block 9 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 11 - TextOutput

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 12 - WelcomeMessage

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 13 - AudioOutput

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 14 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - AgentInput

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 16 - NotAuthorizedMessage

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 17 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - IfAccessAllowed

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 19 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - IfFirstRun

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 21 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - ReplyText

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 23 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - FileOutput

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Showing the first 24 of 53 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Track expenses automatically with Telegram Bot using GPT-4o, OCR and voice recognition
Complexity advanced
Nodes 53
Categories Personal Productivity, AI Chatbot
Author Dmitrij Zykovic
Published 30 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11368/11368.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Track expenses automatically with Telegram Bot using GPT-4o, OCR and voice recognition do?

Personal Expense Tracker Bot AI powered Telegram bot for effortless expense tracking. Send receipts, voice messages, or text the bot automatically extracts and categorizes your expenses. Key F...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Personal Productivity, AI Chatbot use case.