🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Telegram to Google Sheets, expenses logged clean

Lisa Granqvist Partner Workflow Automation Expert

You jot an expense in a chat, promise you’ll “log it later,” and then… it vanishes. Or it lands in a spreadsheet with a weird format, the wrong date, and a note like “coffee??” that means nothing a week later.

Freelancers feel this when reimbursements pile up. A small business owner sees it at month-end. And marketing leads who run lean budgets still need Telegram expense logging that doesn’t turn into another admin chore.

This n8n workflow turns a simple Telegram message into a clean Google Sheets row using GPT-4.1 Mini, so you get a ledger you can actually trust. You’ll see how it works, what you need, and where people usually get stuck.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Telegram to Google Sheets, expenses logged clean

The Problem: Expense logging breaks when you’re busy

Tracking expenses sounds simple until it’s Tuesday afternoon, you’re in transit, and you’ve already had three “small” purchases that need to be remembered later. Receipts end up in pockets, in email, in a camera roll, and in Slack DMs to yourself. Then you sit down to reconcile everything and realize half the details are missing (was that parking cash or card, and what day was it?). The result is a messy sheet, delayed reimbursements, and a nagging sense you’re undercounting spend.

It adds up fast. The friction compounds in a few predictable places.

  • Manual logging steals about 10 minutes per day, which turns into a couple hours by the end of the month.
  • Everyone writes expenses differently, so your sheet becomes impossible to filter or summarize cleanly.
  • Non-text inputs (photos, PDFs, random forwards) derail the habit, and then the whole system collapses.
  • You spend extra time second-guessing categories and dates, honestly the worst kind of admin work.

The Solution: Log expenses in Telegram, save structured rows to Sheets

This workflow gives you a lightweight way to capture spending the moment it happens. You send a normal text message to your Telegram bot, like “Bought coffee for 50k at Highlands,” and n8n takes it from there. First it validates that the incoming message is text (so you don’t accidentally feed the AI a sticker or a file). Then GPT-4.1 Mini reads your message and returns structured fields like date, amount, currency, category, and description, plus a friendly confirmation message. If the message is relevant and usable, the workflow replies in Telegram and appends a new row to your Google Sheet. If it’s not usable, you get a helpful fallback instead of silent failure.

The workflow starts with a Telegram intake trigger. From there, an AI agent extracts consistent JSON, and a structured parser keeps it safe and predictable. Finally, a small code step maps fields into the exact Google Sheets columns you set up, so every entry lands cleanly.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you log 6 expenses per week. Manually, even a “quick” spreadsheet entry takes about 3 minutes once you find the sheet, pick a category, and type a description, so that’s roughly 20 minutes weekly and about 90 minutes a month. With this workflow, sending a Telegram message is maybe 20 seconds per expense, so you’re closer to 2 minutes per week total, while the AI and Sheets update runs in the background. That’s over an hour back each month, plus cleaner data.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Telegram to receive expense messages via a bot
  • Google Sheets to store a clean expense ledger
  • OpenAI API key (get it from your OpenAI dashboard)

Skill level: Intermediate. You’ll connect accounts, add a sheet, and adjust a prompt, but you won’t be writing an app.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A Telegram message triggers the workflow. When you send your expense text to the bot, n8n receives it instantly and prepares the message content for validation.

Text-only validation keeps inputs reliable. If you send a photo, file, or anything that isn’t plain text, the workflow routes you to a friendly “unsupported” response so the automation doesn’t break.

AI turns your sentence into structured fields. The Finance Chat Agent uses the OpenAI chat model (GPT-4.1 Mini) to extract the key details and return JSON, which is then parsed using a structured output parser for consistency.

Relevant expenses get saved and confirmed. If the AI marks the message as relevant, n8n sends you a confirmation in Telegram, maps fields with a small code step, and appends a new row to your Google Sheet.

You can easily modify the category list to match your chart of accounts based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Telegram Trigger

Set up the Telegram webhook intake so incoming messages are captured and routed for validation.

  1. Add and configure Telegram Intake Trigger with Updates set to message and Additional Fields → Download enabled.
  2. Credential Required: Connect your telegramApi credentials to Telegram Intake Trigger.
  3. Connect Telegram Intake Trigger to Validate Text Message to begin message filtering.

Step 2: Validate Incoming Text Messages

Filter out non-text messages before sending content to the AI agent.

  1. In Validate Text Message, set the condition to check whether Left Value ={{ $json.message.toJsonString() }} contains text.
  2. Ensure the true output connects to Finance Chat Agent and the false output connects to Handle Non-Text Message.

⚠️ Common Pitfall: If the condition is misconfigured, all messages may be treated as non-text and skip the AI parsing.

Step 3: Set Up AI Parsing with Finance Chat Agent

Use the agent to extract structured expense data and classify relevance.

  1. In Finance Chat Agent, set Text to ={{ $json.message.text }} and keep Prompt Type set to define.
  2. Confirm the System Message is the provided Budget Buddy instruction block for expense extraction and response formatting.
  3. Ensure OpenAI Chat Engine is connected as the language model for Finance Chat Agent. Credential Required: Connect your openAiApi credentials to OpenAI Chat Engine.
  4. Confirm Structured JSON Parser is connected as the output parser for Finance Chat Agent, with JSON Schema Example set to the provided expense JSON. Credentials for parsers are added on the parent node (the agent), not the parser.

Step 4: Route Relevant vs. Unsupported Expenses

Split the AI output based on whether the message represents a valid expense.

  1. In Relevant Expense Check, set the boolean condition with Left Value ={{ $json.output.relevant }} and operator true.
  2. Connect the true output to both Send Expense Confirmation and Map Expense Fields in parallel.
  3. Connect the false output to Send Unsupported Notice.

Parallel Execution: Relevant Expense Check outputs to both Send Expense Confirmation and Map Expense Fields in parallel, so confirmations send while data is prepared for the sheet.

Step 5: Configure Telegram Responses

Send confirmations for valid expenses or guidance when unsupported content arrives.

  1. In Send Expense Confirmation, set Text to ={{ $json.output.message }} and Chat ID to ={{ $('Telegram Intake Trigger').item.json.message.chat.id }}.
  2. Credential Required: Connect your telegramApi credentials to Send Expense Confirmation.
  3. In Send Unsupported Notice, set Text to ={{ $json.output.message }} and Chat ID to ={{ $('Telegram Intake Trigger').item.json.message.chat.id }}.
  4. Credential Required: Connect your telegramApi credentials to Send Unsupported Notice.
  5. In Handle Non-Text Message, set Text to =Sorry, I can’t read files or images right now. Just send me a message describing what you spent, and I’ll help you track it! 💬💸 and Chat ID to ={{ $('Telegram Intake Trigger').item.json.message.chat.id }}.
  6. Credential Required: Connect your telegramApi credentials to Handle Non-Text Message.

Step 6: Map Fields and Append to Google Sheets

Transform the structured AI output into rows and append them to your expense tracker.

  1. In Map Expense Fields, keep the JavaScript Code that maps Date, Amount, Currency, Category, Description, MessageID, and ChatID from the AI output and trigger payload.
  2. Connect Map Expense Fields to Append to Expense Sheet.
  3. In Append to Expense Sheet, set Operation to append, Document to [YOUR_ID], and Sheet to [YOUR_ID] (cached name: Expense TrackingSheet1).
  4. Credential Required: Connect your googleSheetsOAuth2Api credentials to Append to Expense Sheet.

⚠️ Common Pitfall: If your Google Sheet headers do not match the mapped field names (e.g., Date, Amount, Currency), the append may fail or create empty cells.

Step 7: Test and Activate Your Workflow

Run a manual test to confirm Telegram intake, AI extraction, and Google Sheets logging.

  1. Click Execute Workflow and send a test message to your Telegram bot like Lunch 120000 VND at Phở Hòa.
  2. Verify that Send Expense Confirmation replies with a friendly confirmation and that Append to Expense Sheet appends a new row.
  3. Send a non-expense message or image to confirm that Send Unsupported Notice or Handle Non-Text Message responds correctly.
  4. When testing is successful, toggle the workflow to Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Telegram credentials can expire or be mis-pasted. If things break, check the bot token in the Telegram Trigger node and confirm the bot still responds in Telegram.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Telegram expense logging automation?

About 30 minutes if your bot, sheet, and API key are ready.

Do I need coding skills to automate Telegram expense logging?

No. You’ll connect accounts and paste in credentials, then tweak a prompt and map fields.

Is n8n free to use for this Telegram expense logging workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API usage costs, which are usually small for short messages.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Telegram expense logging workflow for multiple users?

Yes, but you’ll want to add a column for Telegram username or chat ID, then include it in the mapped fields before the Google Sheets append. Common tweaks include a stricter category list, multi-currency extraction, and separate sheets per person based on chat ID.

Why is my Telegram connection failing in this workflow?

Usually it’s the bot token. Re-check the token in your Telegram Trigger node, confirm the bot is still active in BotFather, and make sure you’re messaging the correct bot account. If the trigger works but replies fail, review permissions and any rate limiting if many people are testing at once.

How many expenses can this Telegram expense logging automation handle?

A lot. On n8n Cloud, capacity is tied to your plan’s monthly executions, and each message is typically one execution. If you self-host, there’s no fixed execution limit; it mainly depends on your server and OpenAI rate limits.

Is this Telegram expense logging automation better than using Zapier or Make?

Often, yes. n8n is more forgiving when you need branching logic (text vs non-text, relevant vs not relevant) and it’s easier to self-host when volume grows. The structured output parser approach is also a big deal because it reduces random formatting errors from AI. Zapier or Make can be faster for a very simple two-step flow, but this one benefits from “real” logic and validation. Talk to an automation expert if you want a quick recommendation based on your volume and setup tolerance.

Once this is running, expense capture becomes a quick message, not a weekly chore. The workflow handles the boring parts so your sheet stays clean without you babysitting it.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal