Skip to content

The moment it happens

Log receipts sent to Telegram in a Notion expenses database

Send a photo of a receipt or invoice to your Telegram bot and it is logged in your Notion expenses database, with a spending summary every Sunday.

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

Send this to your assistant

Create a ClickRuntime automation: when I send a receipt photo to my Telegram bot, extract vendor, date, amount and category into my Notion Expenses database. Every Sunday, send me a spending summary.

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 freelance photographer collects receipts everywhere: fuel, equipment, train tickets, client lunches. They pile up in a wallet and a camera roll, and once a quarter there is a long evening of typing them into a spreadsheet for the accountant, with a few always missing.

This automation makes logging a receipt as quick as taking a photo. Send it to your Telegram bot and AI reads the vendor, date, amount and category into a new entry in your Notion Expenses database. Every Sunday the bot sends you a summary of the week's spending by category.

What you get out of it

  • Log a receipt in ten seconds

    Snap it and send it, right at the till. Receipts are recorded before they can get lost.

  • Fewer missed expenses

    Expenses that are logged straight away are the ones you can claim. Fewer missing receipts at tax time means money saved.

  • A tidy record your accountant can use

    Each expense is a Notion entry with vendor, date, amount and category. Filter by quarter and export when the accountant asks.

  • A weekly view of your spending

    The Sunday summary shows totals by category. Unusual weeks stand out before they become an unusual month.

How it works

What happens, step by step

  1. When you send a receipt photo to your Telegram bot, ClickRuntime downloads the image and reads the text on it.

  2. AI picks out the vendor, date, total and a category from the receipt.

  3. A new entry with those details is added to your Notion Expenses database, and the bot replies with what it logged.

  4. Every Sunday, ClickRuntime totals the week's expenses by category and sends you the summary on Telegram.

Before it runs live

  • Connect Notion and share the database you want it to use
  • Connect Telegram
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Log receipts sent to Telegram in a Notion expenses databasejust nowSucceeded
Telegram · Expenses botLogged Northwind Fuel, 64.20 (Travel, 2026-10-14)

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 Notion 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.
send_invoices_by_telegram_into_a_notion_finance_tracker.pyexample
import base64
from datetime import date, timedelta
from clickruntime import on_event, on_trigger, credentials, http, ai

DB_ID, CHAT_ID = "your-notion-expenses-db-id", "your-telegram-chat-id"
SCHEMA = {"type": "object", "properties": {"vendor": {"type": "string"}, "date": {"type": "string"}, "amount": {"type": "number"}, "category": {"type": "string"}}}

def tg(method, **kw):
    return http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{method}", json=kw).json()

def notion(path, body):
    return http.post(f"https://api.notion.com/v1/{path}", json=body, headers={"Authorization": f"Bearer {credentials.connection('notion', 'work')}", "Notion-Version": "2022-06-28"}).json()

@on_event
def receipt(event):
    photo = ((event.json or {}).get("message") or {}).get("photo")
    if not photo:
        return {"skipped": True}
    path = tg("getFile", file_id=photo[-1]["file_id"])["result"]["file_path"]
    img = http.get(f"https://api.telegram.org/file/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{path}").content
    ocr = http.post("https://vision.googleapis.com/v1/images:annotate", headers={"Authorization": f"Bearer {credentials.connection('google', 'work')}"},
                    json={"requests": [{"image": {"content": base64.b64encode(img).decode()}, "features": [{"type": "TEXT_DETECTION"}]}]}).json()
    text = ocr["responses"][0].get("fullTextAnnotation", {}).get("text", "")[:3000]
    try:
        r = ai.generate(f"Receipt text:\n{text}\nExtract vendor, date (YYYY-MM-DD), total and category (Travel, Equipment, Meals, Office, Other).", json_schema=SCHEMA, max_output_tokens=100).json
    except ai.AIError:
        tg("sendMessage", chat_id=CHAT_ID, text="Could not read that receipt right now; please log it by hand.")
        return {"logged": False}
    notion("pages", {"parent": {"database_id": DB_ID}, "properties": {"Vendor": {"title": [{"text": {"content": r["vendor"]}}]}, "Date": {"date": {"start": r["date"]}},
                     "Amount": {"number": r["amount"]}, "Category": {"select": {"name": r["category"]}}}})
    tg("sendMessage", chat_id=CHAT_ID, text=f"Logged {r['vendor']}, {r['amount']:.2f} ({r['category']}, {r['date']})")
    return {"logged": True}

@on_trigger
def weekly(event):
    since = str(date.today() - timedelta(days=7))
    pages = notion(f"databases/{DB_ID}/query", {"filter": {"property": "Date", "date": {"on_or_after": since}}})["results"]
    totals = {}
    for p in pages:
        cat = (p["properties"]["Category"]["select"] or {}).get("name", "Other")
        totals[cat] = totals.get(cat, 0) + (p["properties"]["Amount"]["number"] or 0)
    tg("sendMessage", chat_id=CHAT_ID, text="This week: " + ", ".join(f"{k} {v:.2f}" for k, v in totals.items()) if totals else "No expenses this week.")
    return {"expenses": len(pages)}

FAQ

Common questions

What if the AI reads an amount wrong?
The bot replies with what it logged, so you can spot a mistake straight away. Fix it in Notion, or send the photo again with a short correction in the caption.
What does the Notion database need?
Properties for vendor (title), date, amount (number) and category (select). The category options you set in Notion are the ones the AI picks from.
Can it handle PDF invoices?
Photos work best, and the text is read with Google's text recognition. For a PDF, send a screenshot of the page with the totals, or forward the file and log it from its text.
What permissions does it need?
bot token; Notion 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 “Log receipts sent to Telegram in a Notion expenses database” from your assistant

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