Skip to content

The moment it happens

Turn receipt photos into rows in your expense sheet

Send a photo of a receipt to your Telegram bot and the merchant, date, total and category land in your expenses sheet.

Runs
The moment it happens
Apps
Google Sheets, Telegram
AI
Yes, uses the built-in AI allowance
Access
Telegram bot token; Sheets read+write

Send this to your assistant

Create a ClickRuntime automation: when I send a receipt photo to my Telegram bot, read the merchant, date, total and category, add a row to my Expenses sheet and reply to confirm.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A consultant who travels for clients collects taxis, lunches and hotel receipts all month, then spends an evening typing them into a spreadsheet before invoicing. Paper receipts fade or go missing, and anything not logged on the day is often never claimed.

Sending a photo straight after paying takes a few seconds. The details are read from the image and written to your sheet while the receipt is still in your hand, so month-end becomes a review instead of a data-entry session.

What you get out of it

  • Expenses logged on the day

    The receipt is recorded the moment you pay, not weeks later. Fewer receipts are lost, so fewer costs go unclaimed.

  • No typing totals by hand

    Merchant, date and amount are read from the photo. You check the confirmation instead of copying numbers, which cuts typos in your claims.

  • Categories ready for reporting

    Each row gets a category such as travel or meals. Filtering the sheet for a client or a tax return takes minutes.

  • Works from your phone anywhere

    Telegram is already on your phone, so there is no extra app to open. It works the same in a taxi, an airport or a client office.

  • A confirmation you can trust

    The bot replies with what it recorded. If the total looks wrong you see it straight away and can fix the row.

How it works

What happens, step by step

  1. You send a photo of a receipt to your Telegram bot.

  2. ClickRuntime fetches the image and an AI vision service reads the merchant, date, total and category from it.

  3. A new row with those details is added to the Expenses tab of your Google Sheet.

  4. The bot replies with what it recorded so you can check it at a glance.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect Telegram
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Turn receipt photos into rows in your expense sheetjust nowSucceeded
Telegram · Expenses botAdded Northwind Cafe 18.40 EUR (Meals), 14 Oct

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Google Sheets and Telegram steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
receipt_photos_to_an_expense_sheet.pyexample
import base64, json
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http

SHEET_ID = "your-spreadsheet-id"

@on_event
def handle(event):
    msg = (event.json or {}).get("message") or {}
    if not msg.get("photo"):
        return {"skipped": "no photo"}
    token = credentials.secret("TELEGRAM_BOT_TOKEN")
    api = f"https://api.telegram.org/bot{token}"
    path = http.get(f"{api}/getFile", params={"file_id": msg["photo"][-1]["file_id"]}).json()["result"]["file_path"]
    image = base64.b64encode(http.get(f"https://api.telegram.org/file/bot{token}/{path}").content).decode()
    resp = http.post("https://api.openai.com/v1/chat/completions", headers={"Authorization": f"Bearer {credentials.secret('OPENAI_API_KEY')}"},
        json={"model": "gpt-4o-mini", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [
            {"type": "text", "text": "Return JSON with merchant, date, total and category from this receipt."},
            {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{image}"}}]}]})
    if not resp.ok:
        http.post(f"{api}/sendMessage", json={"chat_id": msg["chat"]["id"], "text": "Could not read that receipt, please try again."})
        return {"added": 0}
    r = json.loads(resp.json()["choices"][0]["message"]["content"])
    sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    sheets.spreadsheets().values().append(spreadsheetId=SHEET_ID, range="Expenses!A:E", valueInputOption="USER_ENTERED",
        body={"values": [[r.get("date"), r.get("merchant"), r.get("total"), r.get("category"), msg.get("caption", "")]]}).execute()
    http.post(f"{api}/sendMessage", json={"chat_id": msg["chat"]["id"], "text": f"Added {r.get('merchant')} {r.get('total')} ({r.get('category')})"})
    return {"added": 1}

FAQ

Common questions

What if the photo is blurry or the total cannot be read?
The bot replies that it could not read the receipt and nothing is added to the sheet. Take another photo in better light or type the amount as a caption.
Can I add a note, such as the client name?
Yes. Any caption you send with the photo can be saved in a notes column, which is handy for tagging a client or project.
Does it handle receipts in other currencies?
The currency shown on the receipt is recorded alongside the total. Conversion to your home currency can be added as a sheet formula.
What permissions does it need?
Telegram bot token; Sheets read+write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Turn receipt photos into rows in your expense sheet” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.