Skip to content

Every hour

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.

Runs
Every hour
Apps
X, YouTube
AI
Yes, uses the built-in AI allowance
Access
YouTube OAuth youtube; X tweet.write

Send this to your assistant

Create a ClickRuntime automation: every hour, check for new videos on my channel. Use AI to improve the title, description and tags for search, update the video, then post an announcement with the link on X.

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 creator uploads from their phone straight after editing and writes the title in a hurry. By the time they think of a better one, the video's first and most important day is over. Announcing it on X is another job that often gets skipped.

Tidying the metadata within the hour and then announcing it gives each video a better start, while the creator moves on to the next one.

What you get out of it

  • A stronger first day

    Better titles and descriptions are in place while YouTube is deciding who to show the video to.

  • Search-friendly tags

    AI adds tags based on what the video is about, which helps it turn up in search.

  • Announced with the improved title

    The X post uses the improved wording, so both places match.

  • Your original is kept

    The old title goes into the run log, so you can switch back if you prefer it.

How it works

What happens, step by step

  1. Every hour, ClickRuntime checks your channel for videos it has not seen before.

  2. AI reads the title and description and writes an improved title, description and tags.

  3. The video is updated on YouTube with the new wording.

  4. An announcement with the link is posted on X.

Before it runs live

  • Connect X
  • Connect YouTube

What you get

RunsEvery hour
Improve a new video's title and description, then post it on Xtoday, 9:00Succeeded
X · @acmekitchenCrispy oven fries without a deep fryer: the trick is in the soak. https://youtu.be/Lk9Jh8Gf7Ds

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.
optimise_a_new_video_s_metadata_then_announce_on_x.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, report_fetched, http, credentials, ai, state, log

def api(name, version):
    return build(name, version, credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)

SCHEMA = {"type": "object", "properties": {"title": {"type": "string"}, "description": {"type": "string"},
          "tags": {"type": "array", "items": {"type": "string"}}, "post": {"type": "string"}}}

@on_trigger
def run(event):
    yt, seen = api("youtube", "v3"), state.get("seen")
    uploads = yt.channels().list(part="contentDetails", mine=True).execute()["items"][0]["contentDetails"]["relatedPlaylists"]["uploads"]
    ids = [i["contentDetails"]["videoId"] for i in yt.playlistItems().list(part="contentDetails", playlistId=uploads, maxResults=5).execute()["items"]]
    new = [v for v in ids if seen is not None and v not in seen]
    report_fetched(len(new))
    if not new:
        if seen is None:
            state.set("seen", ids)
        return {"summary": "No new videos"}
    for v in yt.videos().list(part="snippet", id=",".join(new)).execute()["items"]:
        s = v["snippet"]
        out = ai.generate(f"{s['title']}\n\n{s['description']}", system="Improve this YouTube title (max 90 chars), description and 10 tags for search, "
                          "and write an X post under 240 chars without a link.", json_schema=SCHEMA, max_output_tokens=600).json
        log.info("Title changed", {"video": v["id"], "old": s["title"]})
        yt.videos().update(part="snippet", body={"id": v["id"], "snippet": {"title": out["title"], "description": out["description"],
                           "tags": out["tags"], "categoryId": s["categoryId"]}}).execute()
        http.post("https://api.x.com/2/tweets", headers={"Authorization": f"Bearer {credentials.connection('x', 'main')}"},
                  json={"text": f"{out['post'][:250]} https://youtu.be/{v['id']}"}).raise_for_status()
    state.set("seen", (seen + new)[-500:])
    return {"optimised": len(new)}

FAQ

Common questions

Will it change videos I uploaded before it started?
No. It only works on videos published after the automation is turned on.
Can I keep my own title?
Yes. Ask it to improve only the description and tags, and the title is left alone.
Does it change thumbnails?
No. Thumbnails stay as you set them.
What permissions does it need?
YouTube OAuth youtube; 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 “Improve a new video's title and description, then post it on X” from your assistant

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