The moment it happens
Summarise YouTube videos from Telegram into a Google Doc
Send a YouTube link to your Telegram bot and get a summary back, saved in your Video notes doc as well.
- Runs
- The moment it happens
- Apps
- Google Docs, Telegram
- AI
- Yes, uses the built-in AI allowance
- Access
- doc edit; bot token
Send this to your assistant
Create a ClickRuntime automation: when I send a YouTube link to my Telegram bot, summarise the video, reply with the summary and add it to my Video notes Google Doc.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A consultant collects talks, tutorials and interviews to watch later, usually by sending links to herself. The list grows faster than she can watch, and the few she does watch leave no trace a month later when she needs the key point for a client.
With this automation you share a YouTube link to your Telegram bot from your phone. The bot replies with a short summary and appends it, with the link and date, to a Google Doc. Over time that doc becomes a searchable notebook of everything you meant to learn.
What you get out of it
Decide quickly what is worth watching
A summary in seconds tells you whether a 40-minute video deserves your evening. You can skip the ones that only repeat what you know.
Notes kept in one place
Every summary lands in the same doc with its link and date. Searching it later is faster than scrolling back through chats or browser history.
Works from the share button
Sharing a link to the bot takes two taps on your phone. Saving a video is as easy as it was before, with more value afterwards.
Useful for sharing with others
The notes doc can be shared with colleagues or a study group. Everyone gets the gist of the material you found.
How it works
What happens, step by step
When you send a YouTube link to your Telegram bot, ClickRuntime receives it straight away.
It looks up the video's title and description.
AI writes a short summary with the main points.
The bot replies with the summary, and it is added to the end of your Video notes Google Doc with the link and date.
Before it runs live
- Connect Google Docs
- 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 Google Docs and Telegram steps into one automation
Under the hood
The code that runs this automation
import re
from datetime import date
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http, ai
DOC_ID = "your-video-notes-doc-id"
@on_event
def handle(event):
msg = (event.json or {}).get("message") or {}
m = re.search(r"(?:v=|youtu\.be/|shorts/)([\w-]{11})", msg.get("text", ""))
if not m:
return {"skipped": True}
creds = Credentials(credentials.connection("google", "work"))
items = build("youtube", "v3", credentials=creds, cache_discovery=False).videos().list(part="snippet", id=m.group(1)).execute().get("items", [])
if not items:
return {"skipped": "video not found"}
s = items[0]["snippet"]
try:
summary = ai.generate(f"Title: {s['title']}\nChannel: {s['channelTitle']}\n\n{s['description'][:6000]}", system="Summarise this video in 5 short bullet points.", max_output_tokens=400).text.strip()
except ai.AIError:
summary = s["description"][:500]
token = credentials.secret("TELEGRAM_BOT_TOKEN")
http.post(f"https://api.telegram.org/bot{token}/sendMessage", json={"chat_id": msg["chat"]["id"], "text": f"{s['title']}\n\n{summary}"})
docs = build("docs", "v1", credentials=creds, cache_discovery=False).documents()
end = docs.get(documentId=DOC_ID).execute()["body"]["content"][-1]["endIndex"] - 1
entry = f"\n{date.today()}: {s['title']}\nhttps://youtu.be/{m.group(1)}\n{summary}\n"
docs.batchUpdate(documentId=DOC_ID, body={"requests": [{"insertText": {"location": {"index": end}, "text": entry}}]}).execute()
return {"saved": m.group(1)}FAQ
Common questions
What is the summary based on?
Can I send several links at once?
Does it work for private videos?
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
Chat with a Telegram assistant that remembers you
Your Telegram bot answers using the notes in your Memory Google Doc, and adds anything new you tell it to that doc.
See how it worksAnswer Telegram questions from your Google Docs
People ask your Telegram bot a question and get an answer based only on your FAQ or policy Google Doc.
See how it worksSave Telegram voice notes and photos into a Google Doc journal
Voice notes you send to Telegram are transcribed and tagged, and photos are added to the same journal doc with a link, all in date order.
See how it worksKeep exploring
Set up “Summarise YouTube videos from Telegram into a Google Doc” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.