On a schedule
Get a weekly email on your YouTube channel's numbers
Every week you get an email with your latest videos, their views and likes, and what changed since last time.
- Runs
- On a schedule
- Apps
- Gmail, YouTube
- AI
- Optional
- Access
- YouTube API key; Gmail gmail.send
Send this to your assistant
Create a ClickRuntime automation: every Monday, email me my channel's latest videos with views, likes and comments, and how much each grew since last week. Add a short AI summary of what's working.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small business publishes a video a week and wants to know whether it is worth the effort. YouTube Studio has the numbers, but nobody opens it. When the owner asks how the channel is doing, nobody can say.
A weekly email with the numbers and how they changed gives everyone an honest picture, and makes it easy to spot which kinds of video are working.
What you get out of it
Know how the channel is doing
Views, likes and comments for each recent video, without opening YouTube Studio.
See the change, not just the total
Each number shows how much it grew since last week, which is what tells you if a video is still finding viewers.
Spot what works
With AI on, a short summary points out which topics or formats are doing better.
Easy to share
Forward the email to your team or client, or send it to them directly.
How it works
What happens, step by step
Every week, ClickRuntime fetches your channel's most recent videos and their views, likes and comments.
It compares each number with what it saved last time.
If AI is available, it adds a short summary of what is working.
The report is emailed to you, and this week's numbers are saved for next time.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- 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 Gmail and YouTube steps into one automation
Under the hood
The code that runs this automation
import base64
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, http, credentials, ai, state
YT = "https://www.googleapis.com/youtube/v3"
def yt(path, **params):
return http.get(f"{YT}/{path}", params={**params, "key": credentials.secret("YOUTUBE_API_KEY")}).json().get("items", [])
def api(name, version):
return build(name, version, credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
def send_gmail(to, subject, text):
raw = base64.urlsafe_b64encode(f"To: {to}\r\nSubject: {subject}\r\nContent-Type: text/plain; charset=utf-8\r\n\r\n{text}".encode()).decode()
api("gmail", "v1").users().messages().send(userId="me", body={"raw": raw}).execute()
UPLOADS = "UUxxxxxxxxxxxxxxxxxxxxxx"
@on_trigger
def run(event):
ids = [i["contentDetails"]["videoId"] for i in yt("playlistItems", part="contentDetails", playlistId=UPLOADS, maxResults=15)]
last, now, lines = state.get("stats") or {}, {}, []
for v in yt("videos", part="snippet,statistics", id=",".join(ids)):
s = v["statistics"]
views, before = int(s.get("viewCount", 0)), last.get(v["id"], {}).get("views", 0)
now[v["id"]] = {"views": views}
lines.append(f"{v['snippet']['title']}: {views:,} views (+{views - before:,}), {s.get('likeCount', 0)} likes, {s.get('commentCount', 0)} comments")
text = "\n".join(lines)
try:
text = ai.generate(text, system="In 3 sentences, say what's working on this channel.", max_output_tokens=200).text + "\n\n" + text
except ai.AIError:
pass
send_gmail("you@example.com", "Your YouTube week", text)
state.set("stats", now)
return {"videos": len(lines)}FAQ
Common questions
Does it need access to YouTube Analytics?
Can it send daily instead?
Can it report on several channels?
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
Email yourself an analysis of your YouTube comments
Every week you get an email on what viewers are saying in your comments, with the main themes, questions and ideas for new videos.
See how it worksUpload finished videos as private and email you to approve
Each finished video is uploaded to YouTube as private and you get an email with the link, ready to approve and make public.
See how it worksGet alerts about security issues that affect you
When a serious vulnerability is published for software you use, your security channel hears about it the same hour.
See how it worksKeep exploring
Set up “Get a weekly email on your YouTube channel's numbers” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.