YouTube to Google Sheets, channel stats filled in
Channel research sounds simple until you’re staring at 40 tabs, copying subscriber counts by hand, and realizing half the numbers changed since you opened the pages.
This YouTube Sheets automation hits marketing managers hardest, but agency strategists and creator-economy analysts feel it too. You get a ready-to-use Google Sheet that fills itself with channel titles, IDs, views, subscribers, and more, without the copy-paste mistakes.
Below is the workflow, what it replaces, and how to make it fit your research process so your sheet stays current instead of slowly rotting.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: YouTube to Google Sheets, channel stats filled in
flowchart LR
subgraph sg0["When clicking ‘Test workflow’ Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Test workflow’", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If - Check Success Response", pos: "b", h: 48 }
n2@{ icon: "mdi:database", form: "rounded", label: "Google Sheets - Update Data", pos: "b", h: 48 }
n3@{ icon: "mdi:database", form: "rounded", label: "Google Sheets - Update Data ..", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n5@{ icon: "mdi:database", form: "rounded", label: "Google Sheets - Get Channel ..", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>HTTP Request - Get Channel I.."]
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>HTTP Request - Get Channel I.."]
n8@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Switch - Detect URL Type", pos: "b", h: 48 }
n4 --> n8
n8 --> n6
n8 --> n7
n2 --> n4
n1 --> n2
n1 --> n3
n5 --> n4
n0 --> n5
n3 --> n4
n6 --> n1
n7 --> n1
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n1,n8 decision
class n2,n3,n5 database
class n6,n7 api
classDef customIcon fill:none,stroke:none
class n6,n7 customIcon
The Challenge: Keeping YouTube Channel Research Accurate
YouTube channel stats are moving targets. You grab subscriber counts for a pitch deck on Monday, and by Thursday the client asks why your numbers don’t match what they see on the channel page. Then there’s the messy part: channels can be shared as full URLs, handles, or custom URLs, so one “quick lookup” turns into a mini detective job. And when you’re benchmarking 30 to 200 channels, the mental load is real. You start second-guessing your sheet, you miss a row, and suddenly your “source of truth” becomes the thing nobody trusts.
It adds up fast. Here’s where it usually breaks down.
- You end up re-checking the same channels every week because yesterday’s numbers are already stale.
- Copying subscriber and view counts by hand invites tiny mistakes that ruin comparisons later.
- Different URL formats slow everything down, especially when you’re working from client-provided lists.
- When a lookup fails, teams often don’t notice until the final sheet is full of blanks.
The Fix: Auto-Fill Channel Stats in Google Sheets
This workflow turns a plain Google Sheet into a YouTube channel research machine. You paste a list of channel URLs (full links or custom/handle-style links) into the “Channel URLs” tab, mark the rows as Ready, and run the workflow in n8n. From there, it loops through each ready row, figures out what kind of URL it’s looking at, and calls the right YouTube API endpoint to fetch the details you care about. If the API responds correctly, the workflow writes everything back into the same row and flips the status to Finished. If something fails, it marks that row as Error so you can fix the bad input instead of quietly shipping a broken dataset.
The flow starts with a manual run in n8n, then pulls your “Ready” rows from Google Sheets. Next, it routes each URL to the correct YouTube lookup and validates the response. Finally, it updates the sheet with fresh channel data and a clear success or error status.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you’re auditing 60 channels for a brand partnership shortlist. Manually, you’ll usually spend about 3 minutes per channel to open the page, find subscribers and views, copy the ID or URL, and paste it cleanly, which is roughly 3 hours of focused work. With this workflow, you paste the 60 URLs once, set them to Ready, and run it; the hands-on time is closer to 10 minutes. The rest is just processing time while the sheet fills itself.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to store inputs and write results.
- YouTube Data API (Google Cloud) to fetch channel stats.
- Google Cloud API key or OAuth (get it from Google Cloud Console).
Skill level: Intermediate. You’ll connect Google credentials and paste API settings, but you won’t be writing code.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
Manual run from n8n. You click Execute (or Test Workflow) when you want a refresh, which is perfect for weekly research sweeps or pre-pitch updates.
Sheet rows are pulled in batches. The workflow reads the “Channel URLs” tab in Google Sheets and only processes rows marked Ready, so you can queue work without touching the automation.
URL type is detected and routed. A Switch step separates full channel URLs from custom/handle-style URLs, then an HTTP request hits the right YouTube API endpoint for that format.
Results are validated and written back. If the API response looks good, the channel title, ID, and stats are saved into the same row and the status becomes Finished. If it fails, the row is marked Error so it’s obvious what needs attention.
You can easily modify the “Ready/Finished/Error” logic to match your internal workflow (for example, “Queued/In Review/Done”) based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
This workflow starts manually so you can test and run the YouTube channel enrichment on demand.
- Add and open Manual Launch Trigger.
- Leave all fields at their defaults since this node does not require parameters.
- Confirm the connection flow: Manual Launch Trigger → Retrieve Channel Links.
Step 2: Connect Google Sheets
Set up the spreadsheet input and ensure each row has a status of ready to be picked up.
- Open Retrieve Channel Links and select the spreadsheet Document with
YouTube - Get Channel Information. - Set the Sheet Name to
Channel Urls. - In Filters, ensure status equals
ready. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials in Retrieve Channel Links.
⚠️ Common Pitfall: If the row_number column is missing in your sheet, updates in Update Sheet Records and Mark Sheet Error will fail because matching uses row_number.
Step 3: Set Up URL Routing and API Retrieval
This step routes each channel URL to the correct API request and validates the response.
- Open Iterate Channel Rows to confirm it batches rows; connect it between Retrieve Channel Links and Route URL Pattern.
- In Route URL Pattern, verify the two regex rules use
{{ $json.channel_url }}to match channel ID (/UC[A-Za-z0-9_-]{22}/) and handle (/@([^/]+)/). - Configure Fetch Channel by ID with URL
https://www.googleapis.com/youtube/v3/channelsand query parameter id set to{{ $json.channel_url.match(/channel\/([A-Za-z0-9_-]+)/)[1] || ''}}. - Configure Fetch Channel by Handle with URL
https://www.googleapis.com/youtube/v3/channelsand query parameter forHandle set to{{ $json.channel_url.split('@')[1] || ''}}. - Credential Required: Connect your
youTubeOAuth2Apicredentials in both Fetch Channel by ID and Fetch Channel by Handle. - In Validate API Result, confirm the condition
{{ $json.body.pageInfo.totalResults }}is greater than0.
Step 4: Configure Output Updates
Successful API calls update the sheet; failures are marked with an error status and timestamp.
- Open Update Sheet Records and confirm Operation is
updatewith Matching Columns set torow_number. - Map the key fields using these expressions: title
{{ $json.body.items[0].snippet.title }}, channel_id{{ $json.body.items[0].id }}, custom_url{{ $json.body.items[0].snippet.customUrl }}, and last_fetched_time{{ $now.toISO().toString().slice(0, 19).replace('T', ' ') }}. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials in Update Sheet Records. - Open Mark Sheet Error and confirm it sets status to
errorwith row_number{{ $('Retrieve Channel Links').item.json.row_number }}and last_fetched_time{{ $now.toISO().toString().slice(0, 19).replace('T', ' ') }}. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials in Mark Sheet Error. - Confirm the loopback: Update Sheet Records → Iterate Channel Rows and Mark Sheet Error → Iterate Channel Rows.
Step 5: Test and Activate Your Workflow
Run a manual test to verify successful sheet updates and error handling before activating the workflow.
- Click Execute Workflow on Manual Launch Trigger to run a test.
- Check that rows with valid URLs are updated by Update Sheet Records with
statusset tofinish. - Verify invalid URLs route through Validate API Result to Mark Sheet Error with
statusset toerror. - Once successful, toggle the workflow to Active to use it in production.
Watch Out For
- Google Sheets credentials can expire or need specific permissions. If things break, check the Credentials section in n8n and the sharing access on the target spreadsheet first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- YouTube Data API quotas are real. If you suddenly see more Error rows, check Google Cloud Console for quota limits or a disabled API.
Common Questions
About 30 minutes if your Google Cloud credentials are ready.
Yes, but someone needs to handle the Google Cloud Console setup once. After that, running it is basically updating rows to Ready and clicking Execute.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in YouTube Data API usage, which is usually low-cost but limited by quota.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
You can swap the manual trigger for a Google Sheets trigger so the workflow runs when new rows are added or when Status changes to Ready. Many teams also add extra columns (for example, “Segment” or “Client”) and pass them through untouched so the enriched data stays grouped. If you need different outputs, adjust the “Update Sheet Records” mapping so it writes only the fields you care about, like subscribers and channel ID.
Usually it’s expired OAuth credentials or the sheet wasn’t shared with the right Google account. Reconnect the Google Sheets credential in n8n, then confirm the spreadsheet and the “Channel URLs” tab are selected in the Get and Update nodes. If it still fails, check Google Cloud Console to ensure the Sheets API is enabled.
On n8n Cloud Starter you can run thousands of executions per month, which is plenty for most research teams refreshing lists weekly. If you self-host, there’s no platform execution limit, but your server and the YouTube API quota become the bottlenecks. In practice, this workflow comfortably handles hundreds of channels in a run as long as your quota is set appropriately.
Often, yes. This workflow relies on conditional routing (different URL types) plus API validation and looping through rows, and n8n handles that without turning it into a pile of separate zaps or scenarios. You also get the option to self-host, which matters when you’re doing large research refreshes and don’t want execution costs to creep up. Zapier or Make can still work if you’re enriching a tiny list and you want the simplest UI. If you’re unsure, Talk to an automation expert and we’ll sanity-check your use case.
Once this is in place, your channel research sheet stays trustworthy without someone babysitting it. Set it up, run it when you need a refresh, and move on.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.