Daily
Keep your YouTube titles and tags in line with a sheet
Your videos' titles, tags and visibility follow rules you keep in a sheet, and every change is logged.
- Runs
- Daily
- Apps
- Google Sheets, YouTube
- AI
- Yes, uses the built-in AI allowance
- Access
- YouTube OAuth youtube (manage); Sheets edit
Send this to your assistant
Create a ClickRuntime automation: every day, compare my channel's videos with the rules in my Metadata sheet: required tags, a title suffix and which videos should be unlisted. Update any video that doesn't match, log each change in the sheet and post a summary to #content.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A brand channel with a few hundred videos needs consistent tags, a standard title format and old product videos hidden when a product is retired. Different people have uploaded over the years, and fixing each video by hand in YouTube Studio is slow and error-prone.
Keeping the rules in a sheet and applying them daily brings the whole back catalogue into line, and keeps it there as new videos are added.
What you get out of it
A consistent channel
Every video carries the right tags and title format, which helps search and makes the channel look looked-after.
Rules anyone can edit
Marketing changes the rules in a sheet, with no YouTube Studio access needed.
Retired products disappear
Marking a video unlisted in the sheet hides it on the next run, so outdated videos stop confusing customers.
Every change is logged
A log tab records what changed on which video, so nothing is altered without a trace.
How it works
What happens, step by step
Every day, ClickRuntime reads your rules from the Metadata sheet: required tags, title format and videos to hide.
It lists your channel's videos with their current titles, tags and visibility.
Videos that break a rule are updated on YouTube.
Each change is added to the Log tab with the old and new value, and a short summary goes to #content in Slack.
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
- 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 Sheets and YouTube steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import date
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, yt = api("sheets", "v4").spreadsheets().values(), api("youtube", "v3")
rules = dict(r for r in sheet.get(spreadsheetId=SHEET_ID, range="Rules!A2:B").execute().get("values", []) if len(r) == 2)
tags, suffix = [t.strip() for t in rules.get("required_tags", "").split(",") if t.strip()], rules.get("title_suffix", "")
hide = {r[0] for r in sheet.get(spreadsheetId=SHEET_ID, range="Hide!A2:A").execute().get("values", []) if r}
uploads = yt.channels().list(part="contentDetails", mine=True).execute()["items"][0]["contentDetails"]["relatedPlaylists"]["uploads"]
ids = [i["contentDetails"]["videoId"] for i in yt.playlistItems().list(part="contentDetails", playlistId=uploads, maxResults=50).execute()["items"]]
log = []
for v in yt.videos().list(part="snippet,status", id=",".join(ids)).execute()["items"]:
s, st, before = v["snippet"], v["status"], v["snippet"]["title"]
s["tags"] = sorted(set(s.get("tags", [])) | set(tags))
s["title"] = before if before.endswith(suffix) else f"{before}{suffix}"[:100]
st["privacyStatus"] = "unlisted" if v["id"] in hide else st["privacyStatus"]
if s["title"] != before or set(tags) - set(v["snippet"].get("tags", [])) or v["id"] in hide:
yt.videos().update(part="snippet,status", body={"id": v["id"], "snippet": {k: s[k] for k in ("title", "description", "tags", "categoryId")}, "status": st}).execute()
log.append([date.today().isoformat(), v["id"], before, s["title"], st["privacyStatus"]])
if log:
sheet.append(spreadsheetId=SHEET_ID, range="Log!A:E", valueInputOption="RAW", body={"values": log}).execute()
notify.slack(f"Updated {len(log)} videos to match the Metadata sheet.", channel="#content")
return {"updated": len(log)}FAQ
Common questions
Will it rewrite titles completely?
Can I undo a change?
Does it touch videos that already match?
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
Publish 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 worksGet a weekly report on what your YouTube viewers say
Comments on your recent videos are collected into a sheet, and every week you get an email on what viewers liked, asked and complained about.
See how it worksSummarise new videos in a playlist every day
Each day, new videos added to a playlist you follow are summarised in a sheet, and you get a short email with the list.
See how it worksKeep exploring
Set up “Keep your YouTube titles and tags in line with a sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.