Skip to content

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.

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 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

  1. Every 30 minutes, ClickRuntime checks your channel's latest uploads.

  2. It skips any video it has already announced.

  3. AI writes a short X post from the video's title and description.

  4. 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

RunsEvery 30 minutes
Announce each new YouTube video on Xtoday, 9:00Succeeded
X · @northwindappNew tutorial: set up automatic stock alerts in under ten minutes, no spreadsheets required. https://youtu.be/Vb3Nm4Qw5Er

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 X and YouTube 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.
post_new_youtube_videos_to_x.pyexample
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?
Yes. Describe your voice in the prompt, such as plain and helpful with no hashtags, and every post follows it.
Does it post Shorts too?
It posts every upload by default. You can ask it to skip Shorts.
What if I don't want a post for a video?
Add a word like noannounce to the video's description and it will be skipped.
What permissions does it need?
YouTube API key; X tweet.write. 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 each time it checks. Checks that find nothing new and stop right away aren't counted.
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 “Announce each new YouTube video on X” from your assistant

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