Daily
Build a daily playlist from your favourite channels
Each morning a fresh YouTube playlist of the last day's videos from channels you choose is created, and the link lands in Telegram.
- Runs
- Daily
- Apps
- Telegram, YouTube
- AI
- Not needed
- Access
- youtube (write); bot token
Send this to your assistant
Create a ClickRuntime automation: every morning at 7am, create a YouTube playlist with the videos published in the last 24 hours by the channels I list, and send me the playlist link on Telegram.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Someone who follows a dozen channels for work and learning finds the YouTube home page full of distractions. They want one list of just the new videos from the channels they chose, ready to play on the commute.
A daily playlist sent to Telegram gives them exactly that: press play and work through the day's videos without browsing.
What you get out of it
Only the channels you chose
No recommendations or distractions, just the day's uploads from your list.
Ready to play
Open the link and the whole list plays in order, on your phone or TV.
Arrives every morning
The link is waiting in Telegram before you leave the house.
Private by default
Playlists are created as private or unlisted, so they do not clutter your public channel.
How it works
What happens, step by step
Every morning, ClickRuntime checks the latest uploads from each channel you listed.
It keeps the videos published in the last 24 hours.
A new private playlist is created on your YouTube account and those videos are added to it.
The playlist link is sent to you on Telegram.
Before it runs live
- Connect Telegram
- Connect YouTube
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
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Telegram and YouTube steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import datetime, timezone, timedelta
from clickruntime import on_trigger, http, credentials
def api(name, version):
return build(name, version, credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
CHAT_ID = "123456789"
def tg(method, **params):
r = http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{method}", json=params)
return r.raise_for_status() or r.json()["result"]
UPLOADS = ["UUxxxxxxxxxxxxxxxxxxxxxx", "UUyyyyyyyyyyyyyyyyyyyyyy"]
@on_trigger
def run(event):
yt = api("youtube", "v3")
since = (datetime.now(timezone.utc) - timedelta(days=1)).isoformat()
videos = []
for playlist in UPLOADS:
items = yt.playlistItems().list(part="contentDetails", playlistId=playlist, maxResults=10).execute()["items"]
videos += [i["contentDetails"]["videoId"] for i in items if i["contentDetails"]["videoPublishedAt"] >= since]
if not videos:
return {"videos": 0}
title = f"Today {datetime.now(timezone.utc):%d %b}"
pl = yt.playlists().insert(part="snippet,status", body={"snippet": {"title": title}, "status": {"privacyStatus": "unlisted"}}).execute()
for vid in videos:
yt.playlistItems().insert(part="snippet", body={"snippet": {"playlistId": pl["id"], "resourceId": {"kind": "youtube#video", "videoId": vid}}}).execute()
tg("sendMessage", chat_id=CHAT_ID, text=f"▶️ {title}: {len(videos)} new videos\nhttps://www.youtube.com/playlist?list={pl['id']}")
return {"videos": len(videos), "playlist": pl["id"]}FAQ
Common questions
Will my channel fill up with playlists?
What if no new videos were published?
Does it use much YouTube quota?
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
Get a morning news digest from feeds and YouTube in Telegram
Each morning Telegram brings you a short AI digest of new videos and headlines on the topics you follow.
See how it worksGet new YouTube uploads from your favourite channels in Telegram
Every new video from the channels you follow is posted to your Telegram chat or channel with its title and link.
See how it worksSend a YouTube link to Telegram and get a summary back
Share a YouTube link with your Telegram bot and it replies with a short summary and the key points.
See how it worksKeep exploring
Set up “Build a daily playlist from your favourite channels” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.