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.
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
When someone sends your Telegram bot a command, ClickRuntime picks it up straight away.
For /help, the bot replies with the list of commands it understands.
For /summary followed by a link, it opens the page and AI writes a short numbered summary.
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
Build your own
Need it to work differently?
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
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?
How long are the summaries?
Can other people use the bot or only me?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Have your Telegram bot answer messages
Anyone who messages your bot gets a helpful reply straight away, and the bot remembers the last few messages.
See how it worksTurn voice notes into text with a reply
Send your bot a voice note and get the transcript back with a short answer.
See how it worksTranslate messages you send your bot
Send your bot text in one language and get it back in another.
See how it worksKeep exploring
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.