⚡ Track expenses from Telegram to Google Sheets with GPT-4.1 Mini

2,768 views · ⚡ Personal Productivity

Description

📒 Telegram Expense Tracker to Google Sheets with GPT-4.1

Watch the video > A lightweight automation that lets users log daily expenses via a Telegram bot and instantly saves them into Google Sheets—perfect for anyone looking to manage spending on the go with AI-powered structure and ease.

👤 Who’s it for

This workflow is for anyone who wants to log their daily expenses by simply chatting with a Telegram bot. Ideal for:

⚙️ How it works / What it does

  1. User sends a text message on Telegram describing an expense
    (e.g., “Bought coffee for 50k at Highlands”)

  2. Message format is validated

    • If the message is text, it proceeds to GPT-4.1 Mini for processing.
    • If it’s not text (e.g. image or file), the bot sends a fallback message.
  3. OpenAI GPT-4.1 Mini parses the message and returns:

    • relevant: true/false
    • expense_record: structured fields (date, amount, currency, category, description, source)
    • message: a friendly confirmation or fallback
  4. If valid:

    • The bot replies with a fun acknowledgment
    • The data is saved to a connected Google Sheet
  5. If invalid:

    • A fallback message is sent to encourage proper input

🛠️ How to set up

1. Telegram Bot Setup

2. Google Sheet Setup

3. OpenAI Configuration

4. Add Parser

5. Conditional Logic Nodes

6. Final Actions

✅ Requirements

🧩 How to customize the workflow

FeatureHow to Customize
Add multi-currency supportUpdate system prompt to detect and extract different currencies
Add more categoriesModify the list of categories in the system prompt
Track multiple usersAdd username or chat ID column to the Google Sheet
Trigger alertsAdd Slack, Email, or Telegram alerts for specific expense types
Weekly summariesUse a cron node + Google Sheet query + Telegram message
Visual dashboardsConnect the sheet to Looker Studio or Google Data Studio

Built with 💬 Telegram + 🧠 GPT-4.1 Mini + 📊 Google Sheets + ⚡ n8n

🔗 Nodes Used

Google Sheets, Telegram, Telegram Trigger, AI Agent, OpenAI Chat Model, Structured Output Parser

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup