Automate Expense Tracking with n8n, Google Sheets & Telegram

Struggling to manually track receipts and expenses? This n8n workflow automates expense data extraction from receipts sent via Telegram, adds them to Google Sheets, and sends smart SMS and Telegram confirmations to save hours and reduce errors.
telegramTrigger
httpRequest
set
+3
Workflow Identifier: 1025
NODES in Use: telegramTrigger, httpRequest, set, googleSheets, telegram, twilio

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

Opening Problem Statement

Meet Sarah, a freelance consultant who juggles dozens of client projects each month. Every time she makes a purchase for business needs, she receives a paper or email receipt. Overwhelmed, Sarah spends nearly 3 hours each week manually entering receipt data into a spreadsheet to keep track for tax and expense reporting. Missing or incorrect entries often cause issues with reimbursements and tax deductions, costing her significant money and time. The process is frustrating, error-prone, and takes away from her core consulting work.

This is where BillBot, an automated receipt processing workflow built in n8n, comes in. It transforms how Sarah captures, organizes, and confirms expense data without touching a keyboard, saving her precious hours every week and ensuring accurate records logged consistently.

What This Automation Does

BillBot automates the entire life cycle of expense receipt processing when a user sends a receipt image through Telegram. Here’s what happens automatically:

  • Receipt images sent via Telegram are instantly captured by a Telegram Trigger node.
  • Each receipt image is sent to Mindee’s AI-powered API that extracts detailed expense data (date, merchant, amount, category, currency).
  • The extracted data is organized and set in structured fields using the Set node for consistent downstream use.
  • Data from the receipt is appended to a Google Sheets spreadsheet, maintaining a real-time expense record.
  • A confirmation message is sent back to the user via Telegram, including transaction details for immediate verification.
  • An SMS notification is sent to a designated phone number alerting that a new receipt was added, including a link to the Google Sheets record.

This automation saves Sarah at least 3 hours per week, eliminates manual entry errors, and sends instant confirmations to keep her and her team informed.

Prerequisites ⚙️

  • n8n account (cloud or self-hosted) with workflow permissions
  • Telegram account and a Telegram bot (for sending and receiving messages)
  • Mindee API account for receipt OCR and data extraction
  • Google Sheets with an accessible spreadsheet and OAuth2 credentials set up in n8n
  • Twilio account configured for Programmable SMS to send notifications

Step-by-Step Guide

1. Set up Telegram Trigger to Receive Receipts

In n8n, drag in the Telegram Trigger node. Navigate: Click “+” → Search “Telegram Trigger” → Select it. Configure by adding your Telegram bot credentials under credentials and selecting updates * to catch all messages. Enable the option to download media so receipt images are captured. You will configure a webhook URL from n8n that Telegram will call when a receipt message is received. Test by sending a receipt image in your Telegram chat with the bot; you should see the node trigger with the incoming message.

Common mistake: Forgetting to enable media downloads means no image gets sent for processing.

2. Add HTTP Request Node to Parse Receipt Data Using Mindee API

Add an HTTP Request node next to the Telegram Trigger. Set the method as POST and URL to https://api.mindee.net/products/expense_receipts/v2/predict. In the options, set the body content type to multipart-form-data and enable sending binary data. Under Authentication, add your Mindee API key as header authentication.

This node sends the receipt image received from Telegram to Mindee for extraction. The response includes JSON with the expense details.

Common mistake: Not configuring the binary property correctly results in empty or failed submissions.

3. Extract and Set Relevant Data Fields with Set Node

Use a Set node to map Mindee’s complex response into clean, specific fields for use downstream. Set each field with expressions referencing parsed JSON, e.g., for amount: {{$node["Parse details from receipt"].json["predictions"][0]["total"]["amount"]}}.

Fields extracted include Category, Date, Merchant, Time, Amount, Currency, and who added the expense (from Telegram user data). Enabling keepOnlySet ensures only these clean fields go forward.

4. Append Data to Google Sheets

Add a Google Sheets node to append the new receipt data. Set your Google Sheet ID and the range (e.g., A:G columns). Use OAuth2 credentials for authentication. Map the fields from the Set node to columns that correspond with your sheet headers like category, date, amount, and merchant.

Common mistake: Mismatch in column order or empty sheet ID will cause failures.

5. Send Confirmation Message on Telegram

After successful insertion, add a Telegram node to send a confirmation message back to the original sender. Craft the text with variables to include the amount, currency, merchant, date, time, and category for transparency. Use expressions to personalize the message dynamically.

6. Send SMS Notification via Twilio

Finally, use a Twilio node to send an SMS alert to a configured phone number. The message includes who added the receipt, amount, currency, and a direct Google Sheets link for quick oversight.

Customizations ✏️

  • Change notification method: Replace the Twilio SMS node with an email node to notify via email instead. Configure message fields accordingly.
  • Use alternative expense extraction API: Substitute Mindee API with another OCR service by swapping the HTTP Request node’s endpoint and authentication.
  • Add approval step: Insert a code or conditional node after extraction to request manual approval via Telegram before appending to Google Sheets.
  • Customize categories: Modify the Set node to map the category field into your company-specific expense categories.
  • Multiple user support: Use the Telegram user data field to sort expenses by user in Google Sheets automatically.

Troubleshooting 🔧

Problem: Telegram downloads receipts but HTTP Request fails

Cause: Binary data not properly passed or Mindee API key misconfigured.

Solution: Check sendBinaryData is enabled in HTTP Request node, and validate HTTP Header Auth credentials.

Problem: Google Sheets new rows are not added

Cause: Incorrect sheet ID or OAuth2 scope missing.

Solution: Confirm the Sheet ID, share sheet with your service account, and re-authenticate OAuth2 credentials.

Problem: SMS not sent after receipt

Cause: Twilio credentials or phone numbers configured incorrectly.

Solution: Recheck Twilio keys, sender/receiver numbers, and SMS permissions in the Twilio console.

Pre-Production Checklist ✅

  • Test Telegram bot receives and downloads receipt images properly.
  • Verify HTTP Request node returns detailed JSON with correct fields.
  • Confirm Set node extracts and formats each field correctly.
  • Check Google Sheets appends new rows matching your spreadsheet headers.
  • Send test Telegram confirmation and SMS notifications to valid contacts.
  • Backup your Google Sheets data before live use.

Deployment Guide

Activate the workflow in your n8n instance by toggling it to active. Ensure your Telegram bot webhook URL is publicly accessible so Telegram can post updates. Regularly monitor the execution log in n8n for errors and review the Google Sheets data integrity. The SMS and Telegram confirmations provide immediate feedback loop that your automation works as intended.

FAQs

Can I use a different messaging app instead of Telegram?

Currently, this workflow is designed to use Telegram for receiving receipts due to its reliable bot API and media download feature. However, you could extend this concept using other messaging nodes if they support media and webhook triggers.

Is Mindee API free to use?

Mindee typically offers a free tier with a limited number of requests per month. For higher volume use, paid plans are available. Check the Mindee pricing page for details.

How secure is my receipt data?

Data is only transmitted via secure HTTPS calls in the HTTP Request node and stored in Google Sheets with access controls you configure. Use encrypted credentials and restrict Google Sheets sharing to trusted users.

Can this handle hundreds of receipts daily?

The workflow is designed for moderate volume typical of small businesses or freelancers. For very high volume, consider batching receipts or using n8n’s scaling options.

Conclusion

By setting up this BillBot workflow in n8n, you’ve automated the tedious task of entering receipt information manually. From Telegram receipt capture to detailed expense extraction via Mindee’s AI, this solution streamlines your expense tracking and bookkeeping effortlessly. You’ll save hours per week, reduce costly errors, and maintain an organized expense spreadsheet with built-in real-time confirmations through Telegram and SMS.

Next steps could include expanding the workflow to auto-categorize expenses for tax purposes, integrate with accounting software like QuickBooks, or add multi-user approval flows to enhance control. You now have a powerful foundation to build smarter expense automations tailored to your business needs.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free