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.
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
Every hour, ClickRuntime reads your Upload Schedule sheet.
It picks out rows whose publish time has passed and that are not marked uploaded.
Each video is fetched from Google Drive and uploaded to YouTube with the title and description from its row.
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
Build your own
Need it to work differently?
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
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?
How are the Drive files found?
What if a file is missing?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Log daily YouTube channel stats to Google Sheets
One row per channel per day records subscribers, total views and video count, with the change since the day before.
See how it worksExport YouTube video stats to Google Sheets
Every Sunday night a Videos tab is rewritten with every upload on the channel: title, publish date, duration, views, likes, comments and link.
See how it worksPublish the next video from your sheet's queue
Each day the next ready video in your sheet is uploaded to YouTube with an AI-written title and description, and its row is marked published.
See how it worksKeep exploring
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.