Skip to content

Hourly

Upload Drive videos to YouTube at the time in your sheet

Videos you have put in Drive go up to YouTube at the date and time you set in a sheet, and the row is updated with the link.

Runs
Hourly
Apps
Google Sheets, YouTube
AI
Not needed
Access
Sheets edit; YouTube youtube.upload

Send this to your assistant

Create a ClickRuntime automation: every hour, check my Upload Schedule sheet. For any row whose publish time has passed and isn't uploaded yet, upload the Drive file to YouTube with the title and description from the row, then mark it uploaded with 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 small agency produces videos for several clients and plans release dates weeks ahead in a shared sheet. Finished files sit in Drive. Someone still has to log in on the right day and upload each one, and when they are off sick a client's launch video goes out late.

Uploading straight from the sheet means release dates are kept without anyone being at a desk at the right moment.

What you get out of it

  • Release dates are kept

    Videos go out when the sheet says, including weekends and holidays.

  • Plan in a familiar tool

    The whole team plans releases in a spreadsheet, with no extra scheduling software to learn.

  • Titles and descriptions are agreed in advance

    What goes live is exactly what the client approved in the sheet.

  • A clear record

    Each row shows when its video went up and the link, which is handy for client reports.

How it works

What happens, step by step

  1. Every hour, ClickRuntime reads your Upload Schedule sheet.

  2. It picks out rows whose publish time has passed and that are not marked uploaded.

  3. Each video is fetched from Google Drive and uploaded to YouTube with the title and description from its row.

  4. The row is marked uploaded with the video link, and you get an email confirming it.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect YouTube

What you get

RunsHourly
Upload Drive videos to YouTube at the time in your sheettoday, 9:00Succeeded
Email · Upload confirmationUploaded: Northwind spring collection teaser, https://youtu.be/Lm9Nb8Vc7Xz

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

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

SHEET_ID = "your-spreadsheet-id"

@on_trigger
def run(event):
    sheet = api("sheets", "v4").spreadsheets().values()
    rows = sheet.get(spreadsheetId=SHEET_ID, range="Upload Schedule!A2:F").execute().get("values", [])
    now = datetime.now(timezone.utc).isoformat()
    done = 0
    for n, r in enumerate(rows, start=2):
        if len(r) < 4 or r[3] > now or (len(r) > 4 and r[4] == "uploaded"):
            continue
        title, description, file_id = r[0], r[1], r[2]
        data = api("drive", "v3").files().get_media(fileId=file_id).execute()
        video = api("youtube", "v3").videos().insert(part="snippet,status", body={"snippet": {"title": title, "description": description},
                "status": {"privacyStatus": "public"}}, media_body=MediaIoBaseUpload(io.BytesIO(data), mimetype="video/mp4", resumable=True)).execute()
        sheet.update(spreadsheetId=SHEET_ID, range=f"Upload Schedule!E{n}:F{n}", valueInputOption="RAW",
                     body={"values": [["uploaded", f"https://youtu.be/{video['id']}"]]}).execute()
        notify.email_me(f"Uploaded: {title}", f"https://youtu.be/{video['id']}")
        done += 1
    return {"uploaded": done}

FAQ

Common questions

How exact is the timing?
It checks every hour, so a video goes up within the hour after the time in the sheet.
How are the Drive files found?
Each row holds the Drive file ID or link of the video to upload.
What if a file is missing?
The row is left as it is and you get an email saying which file could not be found.
What permissions does it need?
Sheets edit; 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 (hourly). 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 “Upload Drive videos to YouTube at the time in your sheet” from your assistant

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