Every 15 minutes
Publish rendered videos from Drive to YouTube
Videos your editing or AI video tool saves to Drive are uploaded to YouTube with a title and description, then moved to a Published folder.
- Runs
- Every 15 minutes
- Apps
- Google Drive, YouTube
- AI
- Yes, uses the built-in AI allowance
- Access
- Drive read+write; YouTube youtube.upload
Send this to your assistant
Create a ClickRuntime automation: every 15 minutes, check my Renders folder in Drive. For each new video, write a title and description with AI from the file name and any matching script file, upload it to YouTube and move the file to my Published folder.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A content team makes videos with an AI video tool that saves each render to Google Drive. The renders come out at all hours, and someone has to collect them, write metadata and upload them. Files pile up and it is hard to tell which have been published.
Publishing straight from the Renders folder and moving each file afterwards keeps the channel up to date and makes the folder itself show what is still waiting.
What you get out of it
Renders go live without waiting
A finished render is on YouTube within a quarter of an hour.
The folder shows what is left
Published files move out of the Renders folder, so what remains is the real backlog.
Metadata written for you
AI writes the title and description from the file name or the script saved next to it.
Works with any tool that saves to Drive
Editing software, AI video tools and freelancers can all drop files in the same folder.
How it works
What happens, step by step
Every 15 minutes, ClickRuntime checks your Renders folder in Google Drive for video files.
AI writes a title and description for each one from its file name.
The video is uploaded to your YouTube channel.
The file is moved to your Published folder, so it is never uploaded twice, and you get an email with the link.
Before it runs live
- Connect Google Drive
- 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
- 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 Google Drive 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 clickruntime import on_trigger, report_fetched, credentials, ai, notify
def api(name, version):
return build(name, version, credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
RENDERS, PUBLISHED = "renders-folder-id", "published-folder-id"
@on_trigger
def run(event):
drive = api("drive", "v3").files()
files = drive.list(q=f"'{RENDERS}' in parents and mimeType contains 'video/' and trashed=false", fields="files(id,name)").execute()["files"]
report_fetched(len(files))
if not files:
return {"summary": "No new renders"}
for f in files:
meta = ai.generate(f"File: {f['name']}", system="Write a YouTube title (max 90 chars), a 3-sentence description and 8 tags.",
json_schema={"type": "object", "properties": {"title": {"type": "string"}, "description": {"type": "string"}, "tags": {"type": "array", "items": {"type": "string"}}}}, max_output_tokens=300).json
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": meta, "status": {"privacyStatus": "public"}}).execute()
drive.update(fileId=f["id"], addParents=PUBLISHED, removeParents=RENDERS).execute()
notify.email_me(f"Published: {meta['title']}", f"https://youtu.be/{video['id']}")
return {"published": len(files)}FAQ
Common questions
Can it use the script to write the description?
What happens if an upload fails?
Can I choose the privacy setting?
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
Upload Drive videos to YouTube with AI titles, descriptions and tags
Drop a video into a Drive folder and it goes to YouTube with a search-friendly title, description and tags, and you get the link by email.
See how it worksSave a YouTube video's summary and social posts to Drive
Send a YouTube link and a Google Doc with a summary and ready-to-use social posts appears in your Drive folder.
See how it worksPublish 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.
See how it worksKeep exploring
Set up “Publish rendered videos from Drive to YouTube” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.