Skip to content

The moment it happens

Send payment screenshots to a Telegram bot and file them in Drive

Forward a payment screenshot to your Telegram bot and it replies with the amount, date and payer, and files the image in Drive.

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

Send this to your assistant

Create a ClickRuntime automation: when I send a payment receipt screenshot to my bot, pull out the amount, date and payer, save the image to Drive and reply with the details.

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 tutor gets paid by bank transfer and mobile payment apps. Parents send screenshots as proof of payment over chat, and those images end up scattered across conversations. At tax time, matching payments to lessons means scrolling back through months of messages.

This automation gives you a Telegram bot to forward each screenshot to. It reads the amount, date and payer, saves the image to a Drive folder and replies with what it found, so every payment has a filed record within seconds.

What you get out of it

  • Every receipt in one folder

    Proof of payment is saved to Drive the moment you forward it, not lost in a chat history.

  • Check the details on the spot

    The bot replies with the amount, date and payer, so you can confirm it read the screenshot correctly while it is in front of you.

  • Easier records at tax time

    Files are named with the date and payer, so sorting a year of payments takes minutes instead of an evening.

  • Works from your phone

    Forwarding an image to a bot is quicker than downloading it, renaming it and uploading it to Drive by hand.

How it works

What happens, step by step

  1. ClickRuntime starts when you send a screenshot to your Telegram bot.

  2. AI reads the image and picks out the amount, the date and who paid.

  3. The image is saved in your Drive folder, named with those details.

  4. The bot replies in Telegram with the amount, date, payer and a link to the file.

Before it runs live

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

What you get

RunsThe moment it happens
Send payment screenshots to a Telegram bot and file them in Drivejust nowSucceeded
Telegram · Receipts bot✅ £120.00 from Acme Ltd on 2026-10-19, saved to Drive/Receipts.

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 Drive 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.
payment_receipts_via_telegram_stored_in_drive.pyexample
import base64
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from googleapiclient.http import MediaInMemoryUpload
from clickruntime import on_event, credentials, http, ai

FOLDER_ID, ALLOWED = "your-receipts-folder-id", {123456789}
SCHEMA = {"type": "object", "properties": {k: {"type": "string"} for k in ("amount", "date", "payer")}}

@on_event
def handle(event):
    msg = (event.json or {}).get("message", {})
    chat = msg.get("chat", {}).get("id")
    if chat not in ALLOWED or not msg.get("photo"):
        return {"skipped": True}
    api = f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}"
    path = http.get(f"{api}/getFile", params={"file_id": msg["photo"][-1]["file_id"]}).json()["result"]["file_path"]
    image = http.get(f"{api.replace('/bot', '/file/bot')}/{path}").content
    x = ai.generate(f"Payment screenshot caption: {msg.get('caption', '')}. Extract amount, date (YYYY-MM-DD) and payer.",
                    json_schema=SCHEMA, max_output_tokens=80).json
    drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    f = drive.files().create(body={"name": f"{x.get('date')} {x.get('payer')} {x.get('amount')}.jpg", "parents": [FOLDER_ID]},
                             media_body=MediaInMemoryUpload(image, mimetype="image/jpeg"), fields="id,webViewLink").execute()
    http.post(f"{api}/sendMessage", json={"chat_id": chat,
              "text": f"✅ {x.get('amount')} from {x.get('payer')} on {x.get('date')}\n{f['webViewLink']}"})
    return {"file": f["id"]}

FAQ

Common questions

What kinds of screenshots work?
Payment confirmations from banking and payment apps that show an amount, a date and a name. Clear, uncropped screenshots give the best results.
Who can send images to the bot?
Only the chat IDs you allow. Messages from anyone else are ignored.
How are the files named?
With the payment date, payer and amount, for example 2026-10-19 Acme Ltd 120.00.jpg, so they sort in date order.
What permissions does it need?
Telegram bot token; Drive 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 “Send payment screenshots to a Telegram bot and file them in Drive” from your assistant

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