On a schedule
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.
- Runs
- On a schedule
- Apps
- Google Sheets, YouTube
- AI
- Not needed
- Access
- youtube.readonly; Google Sheets read+write
Send this to your assistant
Create a ClickRuntime automation: every day at 9am, log subscribers, total views and video count for my channel and two competitor channels to the Channel stats tab of my sheet, with the change since yesterday.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
YouTube Studio shows your own channel's growth, but not in a form you can chart against competitors or combine with other data. Many creators keep a sheet of subscriber counts by hand and forget to update it.
This automation records each listed channel's subscribers, total views and video count every day, with the change since the day before, in one tab.
Creators, brand marketers and agencies managing several channels use it to follow growth and compare with peers.
What you get out of it
Daily growth in one table
Changes since yesterday make good and bad days obvious.
Compare with competitors
Public stats for other channels sit next to yours.
Upload impact visible
A rise in video count next to a jump in views shows which uploads moved the channel.
History you keep
Months of daily rows can be charted any way you like.
Light on quota
One API call covers up to 50 channels.
How it works
What happens, step by step
Every day at 9am ClickRuntime looks up public statistics for the YouTube channels you list.
It reads subscribers, total views and number of videos for each.
Each channel gets a row with today's numbers and the change since yesterday's run.
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
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import date
from clickruntime import on_trigger, credentials, state
CHANNEL_IDS = ["UCxxxxxxxxxxxxxxxxxxxxxx", "UCyyyyyyyyyyyyyyyyyyyyyy", "UCzzzzzzzzzzzzzzzzzzzzzz"]
SHEET_ID = "your-spreadsheet-id"
@on_trigger
def run(event):
creds = Credentials(credentials.connection("google", "work"))
yt = build("youtube", "v3", credentials=creds, cache_discovery=False)
items = yt.channels().list(part="snippet,statistics", id=",".join(CHANNEL_IDS)).execute().get("items", [])
prev, rows, today = state.get("prev") or {}, [], date.today().isoformat()
for c in items:
s = c["statistics"]
now = [int(s.get("subscriberCount", 0)), int(s.get("viewCount", 0)), int(s.get("videoCount", 0))]
before = prev.get(c["id"], now)
rows.append([today, c["snippet"]["title"], now[0], now[0] - before[0], now[1], now[1] - before[1], now[2], now[2] - before[2]])
prev[c["id"]] = now
build("sheets", "v4", credentials=creds, cache_discovery=False).spreadsheets().values().append(
spreadsheetId=SHEET_ID, range="Channel stats!A:H", valueInputOption="RAW", body={"values": rows}).execute()
state.set("prev", prev)
return {"channels": len(rows)}FAQ
Common questions
Can I track channels I do not own?
Why do subscriber numbers move in steps?
Can it log watch time or revenue?
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 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.
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 “Log daily YouTube channel stats to Google Sheets” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.