Skip to content

On a schedule

Publish one video a day from a Drive folder

One video from your Drive queue folder is published at the same time every day, and you get an email confirming it.

Runs
On a schedule
Apps
Google Drive, YouTube
AI
Not needed
Access
Drive read+write; YouTube youtube.upload

Send this to your assistant

Create a ClickRuntime automation: every day at 5pm, take the oldest video in my Queue folder in Drive, upload it to YouTube using the file name as the title, move it to my Done folder and email me 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 creator batch-records a month of videos in one weekend. Publishing them on a steady schedule means remembering to upload one every day for four weeks, which falls apart the first time they travel.

A Drive folder that releases one video a day keeps the schedule going for as long as the queue lasts, with nothing to remember.

What you get out of it

  • Batch-record, release steadily

    Film everything in one go and let the queue release a video a day.

  • A consistent time slot

    Videos go out at the same hour, when your audience is most active.

  • Easy to see what is left

    The queue folder shows how many days of videos you have in hand.

  • A confirmation every day

    An email with the link confirms each release, so a missed day never goes unnoticed.

How it works

What happens, step by step

  1. Every day at the time you set, ClickRuntime takes the oldest video in your Drive queue folder.

  2. It uploads the video to YouTube, using the file name as the title.

  3. The file is moved to your Done folder so it is not used again.

  4. You get an email with the video link and how many videos are left in the queue.

Before it runs live

  • Connect Google Drive
  • Connect YouTube

What you get

RunsOn a schedule
Publish one video a day from a Drive foldertoday, 9:00Succeeded
Email · Daily releasePublished: Day 12 – Sourdough starter troubleshooting, https://youtu.be/Mn8Bv7Cx6Za. 16 videos left in the queue.

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

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

QUEUE, DONE = "queue-folder-id", "done-folder-id"

@on_trigger
def run(event):
    drive = api("drive", "v3").files()
    files = drive.list(q=f"'{QUEUE}' in parents and mimeType contains 'video/' and trashed=false",
                       orderBy="createdTime", fields="files(id,name)").execute()["files"]
    if not files:
        notify.email_me("YouTube queue is empty", "Add more videos to the Queue folder in Drive.")
        return {"uploaded": False}
    f = files[0]
    title = os.path.splitext(f["name"])[0][:100]
    media = MediaIoBaseUpload(io.BytesIO(drive.get_media(fileId=f["id"]).execute()), mimetype="video/mp4", resumable=True)
    video = api("youtube", "v3").videos().insert(part="snippet,status", media_body=media,
            body={"snippet": {"title": title}, "status": {"privacyStatus": "public"}}).execute()
    drive.update(fileId=f["id"], addParents=DONE, removeParents=QUEUE).execute()
    notify.email_me(f"Published: {title}", f"https://youtu.be/{video['id']}\n{len(files) - 1} videos left in the queue.")
    return {"uploaded": video["id"], "left": len(files) - 1}

FAQ

Common questions

In what order are videos released?
Oldest first by default. You can number the file names to control the order, or ask for a random pick.
What happens when the queue is empty?
Nothing is uploaded and you get an email saying the queue has run out.
Can it schedule videos in YouTube instead?
Yes. It can upload them as private with a publish time, so YouTube makes them public at the set moment.
What permissions does it need?
Drive 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 (on a schedule). 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 one video a day from a Drive folder” from your assistant

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