Skip to content

The moment it happens

Log receipts by sending a photo to Telegram

Snap a receipt, send it to your bot, and the merchant, date and amount are logged, with an SMS confirming what was saved.

Runs
The moment it happens
Apps
Telegram, Twilio
AI
Yes, uses the built-in AI allowance
Access
Telegram bot; Twilio messaging

Send this to your assistant

Create a ClickRuntime automation: when I send a receipt photo to my Telegram bot, pull out the merchant, date and amount, keep a log of it, and text me a confirmation.

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 contractor pays for fuel, materials and lunches on the road, then spends a Sunday each month matching crumpled receipts to card statements. Half the paper has faded by then, and some receipts never make it home at all.

Sending a photo to a Telegram bot takes seconds at the till. The details are read from the image straight away and kept in a running log, so the receipt can go in the bin and the expense is already recorded.

What you get out of it

  • Expenses captured at the till

    The moment you pay is the moment you are most likely to remember the receipt. A photo sent there and then means nothing waits in a wallet for a month.

  • No typing amounts by hand

    Merchant, date, total and currency are read from the photo. You only correct the odd one the image was too blurry to read.

  • A confirmation you can trust

    The SMS repeats what was saved, so a misread total is caught while the receipt is still in your hand.

  • A log ready for your accountant

    Every receipt sits in one list with its date and amount, ready to export at month end or tax time.

How it works

What happens, step by step

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

  2. ClickRuntime downloads the photo and AI reads the merchant, date, total and currency from it.

  3. The receipt is added to your expense log, and each photo is handled once even if Telegram resends it.

  4. You get a text message confirming what was saved, such as "Saved: Northwind Fuel, 42.10 EUR".

Before it runs live

  • Connect Telegram
  • Connect Twilio
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Log receipts by sending a photo to Telegramjust nowSucceeded
SMS · Your phoneSaved: Northwind Fuel, 42.10 EUR on 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 Telegram and Twilio 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_photo_from_telegram_logged_with_sms_confirmation.pyexample
from clickruntime import on_event, credentials, http, ai, state
from twilio.rest import Client

@on_event
def handle(event):
    msg = (event.json or {}).get("message", {})
    if not msg.get("photo") or state.get(f"seen:{msg['message_id']}"):
        return {"skipped": True}
    token = credentials.secret("TELEGRAM_BOT_TOKEN")
    file_id = msg["photo"][-1]["file_id"]
    path = http.get(f"https://api.telegram.org/bot{token}/getFile", params={"file_id": file_id}).json()["result"]["file_path"]
    caption = msg.get("caption", "")
    fields = ai.generate(f"Receipt photo {path}, caption: {caption}. Return merchant, date, total, currency.",
                         json_schema={"type": "object", "properties": {"merchant": {"type": "string"}, "date": {"type": "string"},
                                      "total": {"type": "number"}, "currency": {"type": "string"}}}).json
    receipts = state.get("receipts") or []
    receipts.append(fields)
    state.set("receipts", receipts)
    state.set(f"seen:{msg['message_id']}", True)
    sms = Client(credentials.secret("TWILIO_ACCOUNT_SID"), credentials.secret("TWILIO_AUTH_TOKEN"))
    sms.messages.create(to="+15550100", from_="+15550199", body=f"Saved: {fields['merchant']}, {fields['total']} {fields['currency']}")
    return fields

FAQ

Common questions

What if the photo is blurry or cut off?
The bot replies that it could not read the total and asks for another photo. Nothing half-read is saved to the log.
Does it handle receipts in other currencies?
Yes. The currency is read along with the amount and kept with it, so foreign receipts are not mixed in with your home currency.
Can more than one person send receipts?
Anyone you add to the bot's chat can send photos. Each entry records who sent it, which helps when a team shares one expense log.
What permissions does it need?
Telegram bot; Twilio messaging. 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 “Log receipts by sending a photo to Telegram” from your assistant

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