Skip to content

Daily

Publish the next ready video from your Airtable queue

On schedule, the next video marked ready in Airtable is uploaded to YouTube and its record is updated with the link.

Runs
Daily
Apps
Airtable, YouTube
AI
Not needed
Access
Airtable data.records:read/write; YouTube youtube.upload

Send this to your assistant

Create a ClickRuntime automation: every day at 4pm, find the first record in my Content table with status Ready, upload its video file to YouTube with the title and description from the record, then set the status to Published and save the link.

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 content team plans every video in Airtable, from idea to final cut. When a video is approved, the status changes to Ready, and then someone has to upload it, copy the title and description across and paste the link back. It is the one step that still depends on a person being free.

Publishing straight from the base means approval is the last manual step. The record shows the live link as soon as the video is up.

What you get out of it

  • Approval is the last step

    Marking a record Ready is all it takes to get the video published.

  • The base stays accurate

    Status and link are filled in automatically, so the calendar always matches the channel.

  • Copy approved in one place

    Titles and descriptions are written and approved in Airtable, and go live exactly as written.

  • A steady schedule

    One video a day, at the time your audience is watching.

How it works

What happens, step by step

  1. Every day at the time you set, ClickRuntime looks in your Content table for the first record marked Ready.

  2. It downloads the video file attached to that record.

  3. The video is uploaded to YouTube with the title and description from the record.

  4. The record is set to Published with the video link, and you get an email confirming it.

Before it runs live

  • Connect Airtable
  • Connect YouTube

What you get

RunsDaily
Publish the next ready video from your Airtable queuetoday, 9:00Succeeded
Airtable · ContentWhy Northwind switched to reusable packaging | Published | https://youtu.be/Po0Iu9Yt8Re

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

  • 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 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.
publish_videos_from_an_airtable_content_queue_to_youtube.pyexample
import io
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from googleapiclient.http import MediaIoBaseUpload
from clickruntime import on_trigger, http, credentials, notify

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):
    records = at("GET", "Content", params={"filterByFormula": "{Status}='Ready'", "maxRecords": 1, "sort[0][field]": "Publish date"})["records"]
    if not records:
        return {"published": False}
    rec = records[0]
    f = rec["fields"]
    media = MediaIoBaseUpload(io.BytesIO(http.get(f["Video"][0]["url"], timeout=120).content), mimetype="video/mp4", resumable=True)
    video = api("youtube", "v3").videos().insert(part="snippet,status", media_body=media, body={
        "snippet": {"title": f["Title"], "description": f.get("Description", "")}, "status": {"privacyStatus": "public"}}).execute()
    link = f"https://youtu.be/{video['id']}"
    at("PATCH", "Content", json={"records": [{"id": rec["id"], "fields": {"Status": "Published", "YouTube link": link}}]})
    notify.email_me(f"Published: {f['Title']}", link)
    return {"video": video["id"]}

FAQ

Common questions

Where does the video file come from?
From an attachment or a file link field in the record.
Can it publish more than one a day?
Yes, up to YouTube's daily upload quota. Ask for the first two or three ready records each run.
What if an upload fails?
The record stays Ready and you get an email with the reason, so it is tried again next time.
What permissions does it need?
Airtable data.records:read/write; YouTube youtube.upload. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (daily). Checks that find nothing to do 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 “Publish the next ready video from your Airtable queue” from your assistant

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