Telegram Google Sheets OCR Expense Tracking n8n

Track Expenses from Receipt Photos with Telegram & Google Sheets using OCR.space

Automatically extract and log expense data from receipt photos sent via Telegram to Google Sheets using free OCR.space API. Save time and money with this n8n automation.

Download Template JSON · n8n compatible · Free
Visual diagram showing a receipt photo sent to Telegram, processed by OCR.space, with data flowing into Google Sheets

What This Workflow Does

Manual expense tracking is a universal pain point for freelancers, small business owners, and teams. This n8n automation solves that by creating a seamless, touchless pipeline from a receipt photo to a structured financial record. You simply take a picture of a receipt and send it to a dedicated Telegram bot. The workflow then uses the free OCR.space API to extract key details like the date, vendor, total amount, and taxes. This data is automatically validated, formatted, and appended to a designated Google Sheet, creating a real-time, searchable expense ledger.

The beauty of this system is its flexibility. It also supports manual text entries for cash transactions or receipts you don't have on hand. You can send a simple command like "expense coffee 5.50 food" directly to the bot, and it will be logged instantly. This dual-input method ensures no expense goes unrecorded, whether you have a physical receipt or not.

Beyond simple logging, this template establishes a foundational system for financial clarity. It eliminates data entry drudgery, reduces human error, and provides immediate visibility into spending patterns. By centralizing expenses in Google Sheets, you create a single source of truth that's ready for analysis, tax preparation, or integration with other business tools.

How It Works

The workflow is an elegant sequence of automated steps that transforms a messy receipt into clean, actionable data.

Step 1: Trigger via Telegram

The automation is initiated when you send a photo or a text command to your private Telegram bot. The Telegram Trigger node listens for new messages. If a photo is detected, it downloads the image file and prepares it for processing. If a text command is received (e.g., "income 1000 consulting"), it parses the message for amount, description, and category.

Step 2: Optical Character Recognition (OCR)

For photos, the image file is sent to the OCR.space API via an HTTP Request node. This free service analyzes the image, detects text regions, and converts the visual text into machine-readable data. It returns a JSON object containing all the text found on the receipt, often with coordinates and confidence scores for each detected word.

Step 3: Data Parsing & Cleaning

This is where the magic happens. A Function node takes the raw OCR text and applies logic to identify and extract the relevant information: the total amount, date, merchant name, and tax. This involves searching for patterns like currency symbols ($, €, £), date formats, and common retailer names. The code cleans the data, ensuring amounts are numeric and dates are standardized.

Step 4: Writing to Google Sheets

The cleaned and structured data—whether from OCR or a manual text command—is then sent to Google Sheets. The Google Sheets node appends a new row to your predefined spreadsheet. The row typically includes columns for Date, Description, Amount, Category, Type (Income/Expense), and Source (e.g., "Telegram OCR"). This creates a live, updating financial log.

Step 5: Confirmation & Logging

Finally, the workflow sends a confirmation message back to you on Telegram, confirming the entry was successfully recorded. It also includes a summary of what was logged. All actions are logged within n8n for debugging and audit purposes, giving you full visibility into the automation's operation.

Who This Is For

This template is a game-changer for individuals and businesses drowning in paper receipts and manual data entry.

Freelancers & Solopreneurs: Perfect for independent contractors, consultants, and digital nomads who need to track business expenses for tax deductions without administrative overhead. Snap a photo after a client lunch or a co-working space purchase, and it's logged.

Small Business Owners: Owners can use this to capture all business-related receipts, creating an organized digital paper trail for accounting, VAT returns, and profit/loss analysis. It's far more efficient than a shoebox full of receipts.

Remote Teams & Startups: Teams can use a shared Telegram group or bot to submit expenses. The automation can be extended to include basic approval flows or notifications to a manager, streamlining the reimbursement process.

Finance-conscious Individuals: Anyone wanting to get a better handle on personal spending can use this to automatically build a budget tracker from their daily purchases.

Pro tip: Use a dedicated Telegram channel for your business expenses. This keeps all receipt submissions in one searchable thread, providing a secondary visual audit trail alongside the structured data in Sheets.

What You'll Need

  1. An n8n Instance: A self-hosted n8n setup or a n8n.cloud account.
  2. A Telegram Bot: Created via BotFather on Telegram. You'll need the Bot Token for authentication.
  3. OCR.space API Key: A free API key from ocr.space/OCRAPI.
  4. A Google Account & Google Sheet: Create a new Google Sheet with two tabs named "Income" and "Expenses". Set up columns like: Date, Description, Amount, Category, Type, Source. You'll need to share this sheet with a service account or enable the Google Sheets API.
  5. Basic n8n Credentials Setup: Ability to set up credentials in n8n for Telegram Bot, Google Sheets, and HTTP Request (for OCR.space).

Quick Setup Guide

Get this automation running in your environment in under 15 minutes.

  1. Import the Template: Download the JSON file using the button above. In your n8n instance, go to Workflows > Import from File and select the downloaded JSON.
  2. Configure Credentials: Set up three sets of credentials in n8n:
    • Telegram Bot API: Use the token from BotFather.
    • Google Sheets: Use OAuth2 or a service account key to connect to your spreadsheet.
    • OCR.space API: Add an HTTP Request credential with your free API key as a query parameter.
  3. Update Resource IDs: In the Google Sheets node, paste the ID of your spreadsheet (from the URL) and specify the sheet names ("Income" and "Expenses").
  4. Test the Trigger: Activate the workflow. Send a photo of a receipt to your Telegram bot. You should see the n8n execution trigger and, within seconds, a new row appear in your Google Sheet.
  5. Customize Parsing Logic (Optional): Review the Function node code. You may want to adjust the regex patterns to better match your local currency format or common merchant names on your receipts.

Key Benefits

Eliminate Manual Data Entry: Save 2-5 hours per month typically spent typing receipt details into spreadsheets. The OCR extraction is instantaneous and works 24/7.

Improve Accuracy & Compliance: Reduce human typos and misplaced decimal points. Automated logging ensures every expense is captured with a timestamp and source, creating a reliable audit trail for tax or business purposes.

Gain Real-Time Financial Visibility: Your Google Sheet becomes a live dashboard of spending. You can immediately see where money is going, categorize expenses, and make informed budgeting decisions without waiting for month-end reconciliation.

Leverage Free Tools: This workflow uses Telegram (free), OCR.space's generous free tier, and Google Sheets (free), making it a zero-cost operational solution. It demonstrates how powerful automation can be built without expensive software subscriptions.

Foundation for Advanced Automation: This template is a starting point. Once data is in Google Sheets, you can easily build additional automations: monthly expense reports, alerts for overspending, integration with accounting software like QuickBooks, or automated reconciliation with bank statements.

Frequently Asked Questions

Common questions about expense tracking automation and integration

The primary benefit is massive time savings and accuracy. Manually typing data from receipts is tedious and prone to errors. Automation extracts data instantly, categorizes it, and logs it to your spreadsheet, freeing up hours each month for business owners, freelancers, and finance teams.

Beyond time saved, it creates a consistent, searchable digital record. This makes tax season preparation, expense reporting, and budget analysis significantly faster and less stressful.

Yes, OCR.space offers a free tier suitable for personal and moderate business use. It provides a limited number of API calls per month, which is often enough for individual expense tracking. For high-volume needs, paid plans are available, but this template is designed to work cost-effectively with the free tier.

The free tier is perfect for proving the concept and for individuals. If you scale to hundreds of receipts per month, you can easily upgrade the API plan or switch to another OCR service within the same n8n workflow structure.

Modern OCR services like OCR.space are highly accurate for standard receipts, especially with clear photos. Accuracy depends on receipt quality, lighting, and font. The template includes a Function node to clean and validate extracted data, improving reliability. For complex receipts, you may need minor manual adjustments.

Best practices for high accuracy include taking a well-lit, straight-on photo of the receipt and ensuring the text is not blurred. The system is designed to handle common formats from supermarkets, restaurants, and online retailers very well.

Absolutely. This is ideal for small business owners, consultants, and remote teams. It automates the collection of receipts from employees via Telegram, extracts key details (date, vendor, amount, tax), and centralizes them in a shared Google Sheet for easy reconciliation, approval, and accounting integration.

You can extend the template to include fields for project codes, client billing, and approval status. It creates a streamlined, digital-first expense reporting process that eliminates paper and spreadsheets.

The workflow is designed with fallbacks. If the OCR returns unclear data, the system can notify you via Telegram for manual review. You can also configure it to flag low-confidence extractions. The template's logic can be extended to include a manual validation step before committing data to Sheets.

In practice, for the occasional failed read, you can simply use the manual text command feature of the bot to log the expense directly, ensuring no data is lost. The workflow provides multiple paths to a successful record.

Yes, this is a common next step. Once data is structured in Google Sheets, you can use n8n's extensive app integrations to sync it with QuickBooks, Xero, or other accounting platforms. The template creates a clean, formatted data source that serves as a perfect bridge to your accounting software.

You can add another n8n workflow that runs on a schedule, reads new rows from the Google Sheet, and creates bills or expenses directly in your accounting software, fully closing the automation loop from receipt to ledger.

Telegram uses end-to-end encryption in Secret Chats, but standard chats are cloud-based. For sensitive business receipts, consider using a private bot and channel. The workflow can be adapted to use more secure messaging platforms or direct uploads if needed, though Telegram offers convenience for many users.

For higher security requirements, you can modify the trigger to use a secure web form upload or an email attachment, keeping the receipt data within your controlled environment before processing.

Yes, GrowwStacks specializes in building tailored automation solutions. While this free template is a great start, we can design a custom system that integrates with your specific accounting software, adds multi-user approval flows, enforces company expense policies, and handles high-volume processing with advanced error handling.

Our team can build a solution that matches your exact business processes, connects to your existing tools (like ERP or CRM systems), and scales with your company. We handle the technical complexity so you can focus on your business.

  • Integration with QuickBooks Online, Xero, or NetSuite
  • Multi-level approval workflows with Slack/Microsoft Teams notifications
  • Automated policy checks (e.g., flagging out-of-policy expenses)
  • Custom reporting dashboards and analytics

Need a Custom Expense Tracking Automation?

This free template is a starting point. Our team builds fully tailored automation systems for your specific business needs.