Skip to content

Every hour

Add AI chapters to your new YouTube videos

New videos get timestamped chapters added to their description, and each one is logged in Airtable.

Runs
Every hour
Apps
Airtable, YouTube
AI
Yes, uses the built-in AI allowance
Access
YouTube youtube; Airtable write

Send this to your assistant

Create a ClickRuntime automation: every hour, check for new videos on my channel. Use the captions to write timestamped chapters with AI, add them to the video description, and log the video and chapters in my Chapters table in Airtable.

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

Chapters make long videos easier to navigate and can show up in Google search results, but writing them means scrubbing through the whole video noting times. On a channel publishing hour-long interviews every week, it rarely gets done.

Writing chapters from the captions and adding them to the description gives every video that boost, and the Airtable log shows which videos have them.

What you get out of it

  • Easier to watch

    Viewers jump straight to the part they want, which keeps them watching longer.

  • Better in search

    Google can show chapters as key moments, which brings in viewers searching for a specific topic.

  • No scrubbing through footage

    Chapters come from the captions in minutes, not an hour of note-taking.

  • A record in Airtable

    Each video and its chapters are logged, so you can check or reuse them.

How it works

What happens, step by step

  1. Every hour, ClickRuntime checks your channel for new videos it has not handled.

  2. It downloads the video's captions with their timings.

  3. AI writes a list of chapters with start times from the captions.

  4. The chapters are added to the video's description on YouTube and logged in your Chapters table in Airtable.

Before it runs live

  • Connect Airtable
  • Connect YouTube

What you get

RunsEvery hour
Add AI chapters to your new YouTube videostoday, 9:00Succeeded
YouTube · DescriptionChapters 00:00 Intro 03:12 How Acme sources its beans 11:45 Roasting on a small budget 24:30 Questions from viewers

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

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

AT = "https://api.airtable.com/v0/appXXXXXXXXXXXXXX"

def at(method, path, **kw):
    r = http.request(method, f"{AT}/{path}", headers={"Authorization": f"Bearer {credentials.connection('airtable', 'work')}"}, **kw)
    return r.raise_for_status() or r.json()

@on_trigger
def run(event):
    yt, done = api("youtube", "v3"), set(state.get("done") or [])
    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 v not in done and yt.captions().list(part="id", videoId=v).execute().get("items")]
    report_fetched(len(new))
    if not new:
        return {"summary": "No new videos with captions"}
    for vid in new:
        track = yt.captions().list(part="id", videoId=vid).execute()["items"][0]["id"]
        srt = yt.captions().download(id=track, tfmt="srt").execute().decode()[:30000]
        chapters = ai.generate(srt, system="Write 5-10 YouTube chapters as 'MM:SS Title' lines. The first must be 00:00.", max_output_tokens=300).text.strip()
        s = yt.videos().list(part="snippet", id=vid).execute()["items"][0]["snippet"]
        if "00:00" not in s["description"]:
            yt.videos().update(part="snippet", body={"id": vid, "snippet": {"title": s["title"], "categoryId": s["categoryId"],
                               "description": f"{s['description']}\n\nChapters\n{chapters}"}}).execute()
            at("POST", "Chapters", json={"records": [{"fields": {"Video ID": vid, "Title": s["title"], "Chapters": chapters}}]})
        done.add(vid)
    state.set("done", sorted(done)[-500:])
    return {"chaptered": len(new)}

FAQ

Common questions

Where do the captions come from?
From the captions on your own videos, including YouTube's automatic ones once they are ready, usually within an hour of upload.
Will it overwrite my description?
No. The chapters are added to the end of your existing description.
What if a video already has chapters?
It is skipped, so your own chapters are never replaced.
What permissions does it need?
YouTube youtube; Airtable 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 “Add AI chapters to your new YouTube videos” from your assistant

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