Skip to content

The moment it happens

Summarise any link with a bot command

Send /summary with a link and get a five-line summary of the page.

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

Send this to your assistant

Create a ClickRuntime automation: set up my Telegram bot with /help and /summary commands. /summary takes a link, reads the page and replies with a 5-line 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 researcher reads dozens of articles a week and wants a quick summary before deciding whether to read the whole thing. Opening a separate tool, pasting the link, waiting and copying the result back is slow on a phone. A Telegram bot with simple commands would be ideal, but building one means writing and hosting a server. It all adds up to wasted reading time.

When a message arrives, ClickRuntime routes it by command. For /summary followed by a link, it fetches the page, passes the text to ClickRuntime's built-in AI to write a short summary and replies in the same chat. Commands like /help return a fixed answer, and the command menu is registered once with setMyCommands so users see the options. No server of your own is needed.

It is handy for researchers, journalists, students and anyone who reads on a phone.

What you get out of it

  • Summaries are one tap away

    Pasting a link into a chat you already use is faster than any other path on a phone. You decide in seconds whether an article deserves your time. On a small screen, that saves several taps and a context switch every time.

  • Your reading list gets triaged

    With a quick summary, long reads that are not relevant can be dropped. You spend your attention on the few pieces that matter and skim the rest. Spend your reading time on what is actually relevant to your work.

  • Commands are discoverable

    Registering them with setMyCommands makes them appear in Telegram's menu. Colleagues and friends who use the bot can find features without a manual. A new teammate can see what the bot does just by opening the menu.

  • Fixed commands are predictable

    Unlike a free-form chatbot, each command does one thing. That makes behavior easy to understand, easy to test and safe to share with a team. Predictable behavior is safer to hand over to other people.

  • You can add commands as you need them

    Extra commands such as /translate or /keypoints follow the same routing pattern. The bot grows with your needs without turning into a project. Each new command is a small addition, not a new project.

How it works

What happens, step by step

  1. When someone sends your Telegram bot a command, ClickRuntime picks it up straight away.

  2. For /help, the bot replies with the list of commands it understands.

  3. For /summary followed by a link, it opens the page and AI writes a short numbered summary.

  4. The reply is sent in the chat. The command menu is set up in Telegram once, so people can tap a command instead of typing it.

Before it runs live

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

What you get

RunsThe moment it happens
Summarise any link with a bot commandjust nowSucceeded
Telegram · /summary1. Acme raised prices 8% on annual plans. 2. Existing customers keep their rate until renewal.

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 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.
command_menu_bot_help_summary_url.pyexample
import re
from clickruntime import on_event, state_initializer, http, credentials, ai

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

@state_initializer
def setup():
    tg("setMyCommands", commands=[{"command": "help", "description": "What I can do"},
                                  {"command": "summary", "description": "Summarise a web page: /summary <url>"}])

@on_event
def handle(event):
    msg = (event.json or {}).get("message") or {}
    text, chat = msg.get("text", ""), msg.get("chat", {}).get("id")
    if text.startswith("/help"):
        tg("sendMessage", chat_id=chat, text="/summary <link> - I'll read the page and send a 5-line summary.")
    elif text.startswith("/summary "):
        html = http.get(text.split(maxsplit=1)[1]).text
        page = re.sub(r"<[^>]+>", " ", re.sub(r"(?s)<(script|style).*?</\1>", "", html))
        summary = ai.generate(f"Summarise in 5 lines:\n{' '.join(page.split())[:8000]}", max_output_tokens=250).text
        tg("sendMessage", chat_id=chat, text=summary)
    return {"command": text.split(" ")[0]}

FAQ

Common questions

Does it work with paywalled or JavaScript-heavy pages?
It fetches the page like a simple browser would. Paywalled articles and pages that build their content with scripts may return little text, and the bot will say it could not read the page instead of inventing a summary.
How long are the summaries?
A short paragraph by default, usually three to five sentences. You can ask for bullet points, a one-line version or a longer one, and the instruction for /summary changes accordingly after you approve it. Mention length when you set it up.
Can other people use the bot or only me?
Anyone who finds the bot can message it unless you restrict it. To keep it private, limit replies to your own Telegram user ID or a list of approved IDs, so strangers cannot use up your runs.
What permissions does it need?
bot token. 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 “Summarise any link with a bot command” from your assistant

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