On a schedule
Track competitor YouTube channel stats in Airtable
Every Monday, each YouTube channel listed in an Airtable table gets a new row with subscribers, total views, video count and growth since last week.
- Runs
- On a schedule
- Apps
- Airtable, YouTube
- AI
- Not needed
- Access
- YouTube API key; Airtable data.records:read, data.records:write
Send this to your assistant
Create a ClickRuntime automation: every Monday, read the channel IDs in my Channels table in Airtable, fetch subscribers, views and video count from YouTube, and add a dated row to my Weekly stats table with the change since last week.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Knowing how fast other channels in your niche are growing helps you judge your own numbers. Checking each channel page by hand every week is dull, and the numbers are gone the moment they change.
This reads a list of channels from Airtable and adds a dated row for each one every Monday. Over a few months the table becomes a growth history you can chart, filter and share.
It suits creators benchmarking against peers, agencies reporting on a client's competitors and marketing teams deciding where to spend on sponsorships.
What you get out of it
History YouTube does not keep for you
Public channel pages only show today's numbers. A weekly row in Airtable keeps the past, so you can see when a competitor's growth sped up.
Edit the list without touching code
Add or remove a channel by editing the Channels table. The next Monday run picks up the change.
Publishing pace in one column
The new videos count shows who is uploading weekly and who has gone quiet. That context explains a lot of growth differences.
Ready for Airtable charts
Because each row has a week and a channel, Airtable's chart and grouping views work without extra setup.
Only public data
A YouTube API key reads public statistics. No one needs to grant access to their channel.
How it works
What happens, step by step
You list the YouTube channels you want to watch in an Airtable table.
Every Monday ClickRuntime reads that list and looks up each channel's subscribers, total views and number of videos.
It works out the change since last week and how many videos each channel published.
A dated row per channel is added to a stats table, so Airtable charts and views show the trend.
Before it runs live
- Connect Airtable
- 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 Airtable and YouTube steps into one automation
Under the hood
The code that runs this automation
from datetime import date
from clickruntime import on_trigger, credentials, http, state
BASE = "https://api.airtable.com/v0/appXXXXXXXXXXXXXX"
def at(method, table, **kw):
r = http.request(method, f"{BASE}/{table}", headers={"Authorization": f"Bearer {credentials.connection('airtable', 'work')}"}, **kw)
r.raise_for_status()
return r.json()
@on_trigger
def run(event):
ids = [r["fields"]["Channel ID"] for r in at("GET", "Channels", params={"fields[]": "Channel ID"})["records"]
if r["fields"].get("Channel ID")]
stats = []
for i in range(0, len(ids), 50):
stats += http.get("https://www.googleapis.com/youtube/v3/channels", params={
"part": "snippet,statistics", "id": ",".join(ids[i:i + 50]), "key": credentials.secret("YOUTUBE_API_KEY")}).json().get("items", [])
last, now, rows = state.get("last") or {}, {}, []
for ch in stats:
s = ch["statistics"]
cur = {"subs": int(s.get("subscriberCount", 0)), "views": int(s["viewCount"]), "videos": int(s["videoCount"])}
prev = last.get(ch["id"], cur)
rows.append({"fields": {"Week": date.today().isoformat(), "Channel": ch["snippet"]["title"], "Channel ID": ch["id"],
"Subscribers": cur["subs"], "Subscriber change": cur["subs"] - prev["subs"],
"Views": cur["views"], "View change": cur["views"] - prev["views"],
"Videos": cur["videos"], "New videos": cur["videos"] - prev["videos"]}})
now[ch["id"]] = cur
for i in range(0, len(rows), 10):
at("POST", "Weekly stats", json={"records": rows[i:i + 10], "typecast": True})
state.set("last", now)
return {"channels": len(rows)}FAQ
Common questions
Where do I find a channel ID?
Why are subscriber numbers rounded?
Can it list the titles of the new videos?
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 ready video from your Airtable queue
On schedule, the next video marked ready in Airtable is uploaded to YouTube and its record is updated with the link.
See how it worksKeep your YouTube videos and stats in Airtable
Your Airtable base lists every video on your channel with its views, likes and comments, refreshed every day.
See how it worksCollect new YouTube videos on your topics into Airtable
Each day, new videos on the topics you follow are summarised and saved as records in Airtable.
See how it worksKeep exploring
Set up “Track competitor YouTube channel stats in Airtable” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.