Every 30 minutes
Announce each new YouTube video on X
Every time your channel publishes a video, a post written for X goes out with the link, and you get an email copy.
- Runs
- Every 30 minutes
- Apps
- X, YouTube
- AI
- Yes, uses the built-in AI allowance
- Access
- YouTube API key; X tweet.write
Send this to your assistant
Create a ClickRuntime automation: every 30 minutes, check my YouTube channel for new videos. For each one, write a short X post with AI from the title and description, post it with the link, and email me a copy.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A software company publishes tutorials on YouTube and has a following on X. Announcing each video means someone writing a post, finding the link and remembering to do it on the day. Half the videos never get announced.
Posting automatically when each video goes live means every tutorial gets its announcement, written to suit X rather than copied from the YouTube title.
What you get out of it
Every video gets announced
No upload goes out quietly because someone forgot to post.
Written for X
AI writes a short, natural post rather than repeating the YouTube title.
Announced while it is fresh
The post goes out within half an hour of the video going live.
A copy in your inbox
You see exactly what was posted, so you can follow up or adjust the style.
How it works
What happens, step by step
Every 30 minutes, ClickRuntime checks your channel's latest uploads.
It skips any video it has already announced.
AI writes a short X post from the video's title and description.
The post goes out on X with the link, and you get an email copy.
Before it runs live
- Connect X
- 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
- 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 X and YouTube steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, report_fetched, http, credentials, ai, state, notify
YT = "https://www.googleapis.com/youtube/v3"
def yt(path, **params):
return http.get(f"{YT}/{path}", params={**params, "key": credentials.secret("YOUTUBE_API_KEY")}).json().get("items", [])
UPLOADS = "UUxxxxxxxxxxxxxxxxxxxxxx"
@on_trigger
def run(event):
seen = state.get("seen")
items = yt("playlistItems", part="snippet", playlistId=UPLOADS, maxResults=5)
new = [i["snippet"] for i in items if seen is not None and i["snippet"]["resourceId"]["videoId"] not in seen]
report_fetched(len(new))
if not new:
if seen is None:
state.set("seen", [i["snippet"]["resourceId"]["videoId"] for i in items])
return {"summary": "No new videos"}
for s in new:
vid = s["resourceId"]["videoId"]
text = ai.generate(f"{s['title']}\n\n{s['description'][:1500]}", system="Write one X post under 240 characters announcing "
"this video. Plain, friendly, no more than one hashtag. No link.", max_output_tokens=100).text.strip()
post = f"{text[:250]} https://youtu.be/{vid}"
http.post("https://api.x.com/2/tweets", headers={"Authorization": f"Bearer {credentials.connection('x', 'main')}"}, json={"text": post}).raise_for_status()
notify.email_me("Posted on X", post)
seen.append(vid)
state.set("seen", seen[-500:])
return {"posted": len(new)}FAQ
Common questions
Can I set the tone of the posts?
Does it post Shorts too?
What if I don't want a post for a video?
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
Improve a new video's title and description, then post it on X
When you publish a video, AI tightens its title, description and tags on YouTube, then announces it on X.
See how it worksLabel new emails automatically
New mail is sorted into labels like Inquiry, Invoice and Newsletter within minutes of arriving.
See how it worksGet draft replies to emails that need an answer
Emails that need a reply get a draft in the same thread, ready for you to edit and send.
See how it worksKeep exploring
Set up “Announce each new YouTube video on X” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.