🔓 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, receipts logged instantly

Lisa Granqvist Partner Workflow Automation Expert

Receipts don’t fail because you don’t care. They fail because they live in five places: your camera roll, WhatsApp, email, a crumpled pocket copy, and “I’ll do it later.” Then month-end hits and you’re guessing.

If you’re a business owner trying to keep spend clean, a marketer juggling card charges across tools, or a freelancer who just wants tax season to be painless, Telegram receipt logging automation fixes the annoying part. You send a receipt. It becomes a tidy row in Sheets. Done.

This guide shows what the workflow does, the results you can expect, and what you’ll need before you switch it on in n8n.

How This Automation Works

Here’s the complete workflow you’ll be setting up:

n8n Workflow Template: Telegram to Google Sheets, receipts logged instantly

Why This Matters: Receipt Tracking Breaks First

Expense tracking usually starts with good intentions and ends with a messy spreadsheet. You buy something, tell yourself you’ll log it later, and the receipt disappears into your phone. When you finally do sit down, the “quick update” becomes a slow hunt for dates, amounts, vendors, and categories. Worse, manual entry invites small errors that create big confusion. One duplicated charge or a missing receipt is all it takes to ruin your confidence in the numbers, which makes budgeting and cash decisions feel like guesswork.

It adds up fast. Here’s where it breaks down in real life.

  • You spend about 10 minutes per receipt finding it, reading it, and typing it into a sheet.
  • Photos and PDFs don’t copy cleanly, so amounts get mistyped and categories drift over time.
  • Receipts live outside your accounting trail, which means you can’t quickly prove a purchase later.
  • Even when you do log everything, you still can’t easily answer questions like “food last month vs this month” without extra work.

What You’ll Build: A Telegram Bot That Logs Receipts for You

This workflow turns Telegram into your intake inbox for expenses. You message your bot with a receipt photo, a PDF, or even plain text like “Nov 10 – 2500 NGN – Uber.” n8n detects what you sent, grabs the file from Telegram, and uploads it to your Google Drive (so you always have the original on record). If it’s an image, it runs OCR and extraction with a Gemini Vision model. If it’s a PDF, it pulls the document text. Then an AI agent turns that raw text into clean, structured fields like date, amount, description, and category, and appends a new row into Google Sheets. Finally, you get a friendly confirmation back in Telegram, so you know it’s logged.

The workflow also includes a second “query” path. When you type a question instead of sending a receipt, an AI agent reads your live Google Sheet, uses a calculator tool for totals, and replies with real answers right inside Telegram.

What You’re Building

Expected Results

Say you collect about 20 receipts a week. Manually, at roughly 10 minutes each, that’s about 3 hours of tiny tasks that you’ll probably push to Friday night. With this workflow, logging is basically the time it takes to forward a photo or PDF in Telegram (call it a minute), plus a short processing wait while OCR and the AI agent run. You get those 3 hours back, and your Sheet stays current instead of “eventually updated.”

Before You Start

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Telegram for sending receipts to your bot
  • Google Sheets to store your expense rows
  • Google Drive for saving receipt files
  • Gemini API key (get it from Google Cloud Console)

Skill level: Intermediate. You’ll be copying IDs, connecting OAuth credentials, and testing a few message types in Telegram.

Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).

Step by Step

A Telegram message triggers everything. The workflow starts when your Telegram bot receives a photo, a document (like a PDF), or a plain text message.

Message type routing decides the path. A Switch node checks what came in and sends it to image handling, PDF handling, or the “ask a question” finance agent.

Receipts get stored and interpreted. For photos and PDFs, the file is downloaded from Telegram, uploaded to Google Drive, then converted into usable text (Gemini Vision for images, PDF extraction for documents). That text is merged with the Drive link and passed to the receipt-processing AI agent.

Clean rows land in Google Sheets (and you get a reply). The AI agent outputs structured fields like date, amount, description, and category, then n8n appends them to your Sheet and confirms in Telegram. For questions, the query agent reads the Sheet via a tool node and sends an answer back in chat.

You can easily modify the categories and the destination sheet to match how you track spend. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Telegram Trigger

Set up the Telegram listener that starts the workflow whenever a new message arrives.

  1. Add the Telegram Incoming Trigger node and set Updates to message.
  2. Credential Required: Connect your telegramApi credentials in Telegram Incoming Trigger.
  3. Save the workflow so n8n registers the Telegram webhook.
Tip: If Telegram doesn’t send messages, re-save the workflow to re-register the webhook.

Step 2: Route Messages by Type

Route incoming messages into image, document, or text query paths.

  1. In Route by Message Type, confirm the first rule checks image presence with {{ $json.message.photo[0].height }}.
  2. Confirm the second rule checks document presence with {{ $json.message.document.mime_type }}.
  3. Ensure output 1 connects to Fetch Image File, output 2 to Retrieve Document File, and output 3 to Finance Query Agent.
⚠️ Common Pitfall: If rules are empty or misconfigured, all text queries may skip the correct path. Verify the rule expressions are present.

Step 3: Configure Image and Document Intake (Parallel Branches)

Handle image and PDF receipts, store files in Drive, and extract content for OCR.

  1. In Fetch Image File, set File ID to {{ $json.message.photo[0].file_id }} and Resource to file. Credential Required: Connect your telegramApi credentials.
  2. In Transform Binary Script, keep the default JavaScript that maps binary data to base64Image.
  3. Transform Binary Script outputs to both Drive Upload Image and Gemini Image Analysis in parallel.
  4. In Drive Upload Image, set Name to {{ $json.result.file_unique_id }} and choose your Drive Folder ID (replace [YOUR_ID]). Credential Required: Connect your googleDriveOAuth2Api credentials.
  5. In Gemini Image Analysis, set Resource to image, Input Type to binary, and Operation to analyze. Credential Required: Connect your googlePalmApi credentials.
  6. In Retrieve Document File, set File ID to {{ $json.message.document.file_id }} and Resource to file. Credential Required: Connect your telegramApi credentials.
  7. Retrieve Document File outputs to both Drive Upload Document and Extract PDF Content in parallel.
  8. In Drive Upload Document, set Name to {{ $('Retrieve Document File').item.json.result.file_id }} and select the destination folder (replace [YOUR_ID]). Credential Required: Connect your googleDriveOAuth2Api credentials.
  9. In Extract PDF Content, set Operation to pdf.
  10. Connect Drive Upload Image and Gemini Image Analysis into Combine Image Streams; connect Drive Upload Document and Extract PDF Content into Combine Document Streams.
⚠️ Common Pitfall: The Drive and Sheets nodes include [YOUR_ID] placeholders. Replace them with your real Google Drive folder and Sheet IDs.

Step 4: Build the Receipt Processing Pipeline

Validate combined inputs, aggregate data, and use the AI agent to extract receipt details.

  1. From Combine Image Streams and Combine Document Streams, connect to Validate Combined Input, then to Aggregate Receipt Data.
  2. In Aggregate Receipt Data, set Aggregate to aggregateAllItemData.
  3. In Receipt Processing Agent, set Text to {{ $json.data }}, and keep Prompt Type as define.
  4. Connect Gemini Chat Model as the language model for Receipt Processing Agent. Credential Required: Connect your googlePalmApi credentials in Gemini Chat Model.
  5. Connect Conversation Memory and Structured Output Formatter as AI sub-nodes for Receipt Processing Agent. Add credentials to Gemini Chat Model (parent), not these sub-nodes.
  6. Connect Math Utility and Fetch Sheet Records as tools for Receipt Processing Agent. Credential Required: Connect your googleSheetsOAuth2Api credentials in Fetch Sheet Records.
Tip: The Structured Output Formatter JSON schema guides the AI output structure—keep it aligned with your Google Sheets columns.

Step 5: Configure Receipt Storage and Telegram Reply

Store extracted receipt data in Google Sheets and confirm back to the user in Telegram.

  1. In Append Expense Row, set Operation to append, select your Document ID ([YOUR_ID]) and Sheet Name Sheet1.
  2. Map columns: Date to {{ $json.output.data.date }}, Category to {{ $json.output.data.category }}, Discription to {{ $json.output.data.description }}, Amount in Naira to {{ $json.output.data.amount }}, and google drive image to {{ $('Aggregate Receipt Data').item.json.data[1].webViewLink }}.
  3. Credential Required: Connect your googleSheetsOAuth2Api credentials in Append Expense Row.
  4. In Send Telegram Reply, set Text to {{ $('Receipt Processing Agent').item.json.output.message }} and Chat ID to {{ $('Telegram Incoming Trigger').item.json.message.chat.id }}.
  5. Credential Required: Connect your telegramApi credentials in Send Telegram Reply.

Step 6: Set Up the Finance Query Assistant Path

Respond to text-based finance questions using a separate AI agent and tools.

  1. In Finance Query Agent, set Text to {{ $json.message.text }} and keep Prompt Type as define.
  2. Connect Secondary Gemini Model as the language model for Finance Query Agent. Credential Required: Connect your googlePalmApi credentials in Secondary Gemini Model.
  3. Connect Conversation Memory 2, Math Utility 2, and Fetch Sheet Records 2 as AI sub-nodes/tools for Finance Query Agent. Add credentials to Fetch Sheet Records 2 (parent is the node itself): Credential Required: googleSheetsOAuth2Api.
  4. In Send Query Response, set Text to {{ $json.output }} and Chat ID to {{ $('Telegram Incoming Trigger').item.json.message.chat.id }}. Credential Required: Connect your telegramApi credentials.

Step 7: Test and Activate Your Workflow

Validate both receipt processing and finance query paths before turning the workflow on.

  1. Click Execute Workflow and send an image receipt to your Telegram bot to test the receipt path.
  2. Verify a new row appears in Google Sheets and you receive a confirmation from Send Telegram Reply.
  3. Send a text question like “How much did I spend on food last month?” and confirm Send Query Response replies.
  4. When everything works, toggle the workflow to Active to enable production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Troubleshooting Tips

  • Google Drive or Google Sheets credentials can expire or need specific permissions. If things break, check the credential status in n8n → Credentials first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Gemini prompts and extract rules start generic. Add your category list and example receipts early, or you’ll be correcting “Other stuffs” forever.

Quick Answers

What’s the setup time for this Telegram receipt logging automation?

About 30 minutes if your Google and Telegram accounts are ready.

Is coding required for this receipt logging?

No. You will mostly connect credentials and paste in a Sheet ID and a Drive folder ID.

Is n8n free to use for this Telegram receipt 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 Gemini API usage costs, which depend on how many receipts you process.

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 modify this Telegram receipt logging workflow for different use cases?

Yes, and you probably should. You can adjust the category list in the Receipt Processing Agent prompt, swap the destination spreadsheet in the Append Expense Row node, and change the Drive folder used by the Drive Upload Image/Document nodes. If you prefer a different AI provider later, the Gemini Chat Model nodes are the main pieces you would replace while keeping the Telegram and Google steps the same.

Why is my Telegram connection failing in this workflow?

Most of the time it’s a bad bot token or the wrong Telegram credential selected in one of the Telegram nodes. Regenerate the token in BotFather, update it in n8n Credentials, then confirm every Telegram node (trigger, file fetch, replies) points to that same credential. If it fails only on downloads, the bot may not have access to the chat where you’re sending receipts, so test in a direct message first. Also check execution logs; Telegram errors are usually explicit, honestly.

What volume can this Telegram receipt logging workflow process?

Self-hosted n8n has no fixed execution cap, so it mostly depends on your server and your AI API limits. On n8n Cloud, your monthly executions depend on plan tier, and receipt processing can use more than one execution per receipt because it downloads, uploads, extracts, and logs. Practically, most small teams run dozens of receipts a day without issues, then scale up once they’re confident the extraction is stable.

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

Sometimes, yes. This workflow has branching (photo vs PDF vs question), file handling into Drive, structured AI output, and a live “ask the sheet” agent, which is the kind of logic that gets awkward or expensive in Zapier-style task pricing. n8n also gives you the self-host option, which matters if you want predictable costs and more privacy. If you only need “Telegram message → create one row,” Zapier or Make can be quicker to set up. For anything involving OCR, categorization, and answering spend questions, n8n is usually the smoother long-term choice. If you want a second opinion before you commit, Talk to an automation expert.

Once this is running, receipts stop being a weekend chore and start being background admin. Your sheet stays clean, your files are organized in Drive, and the workflow answers spend questions whenever you ask.

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