🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

YouTube to Google Sheets, stats logged without errors

Lisa Granqvist Partner Workflow Automation Expert

You know the drill. Someone drops a list of YouTube URLs into a sheet, and now you’re stuck opening tabs, copying view counts, pasting numbers, and hoping nothing shifts one row down.

This YouTube Sheets automation hits content strategists first, but growth marketers tracking competitors and small teams running weekly reporting feel it too. You get clean, repeatable stats logging (with a “Finished” or “Error” status per URL) without babysitting the process.

Below, you’ll see how the workflow runs, what it changes day-to-day, and how to set it up in a way that stays reliable when your list grows.

How This Automation Works

See how this solves the problem:

n8n Workflow Template: YouTube to Google Sheets, stats logged without errors

The Challenge: Logging YouTube stats without messy spreadsheets

Tracking YouTube performance sounds simple until you do it at scale. A “quick check” becomes a weekly ritual of opening 20 videos, copying a handful of metrics, pasting them into the right row, and then second-guessing everything when one URL redirects or a number doesn’t match what you saw yesterday. The worst part is the mental load. You can’t focus on analysis because you’re busy verifying basic data entry. And if you’re doing competitor research, the list never stops growing, which means the busywork never stops either.

It adds up fast. Here’s where it breaks down in real teams.

  • Manual copy-paste turns into about 2 hours of low-value work every week once you track more than a few videos.
  • One misaligned paste can corrupt an entire report, so you end up rechecking rows instead of making decisions.
  • Without a clear status like “Finished” or “Error,” you don’t know what’s complete and what quietly failed.
  • Teams delay updates because it’s annoying work, which means you’re always looking at stale numbers.

The Fix: Auto-fetch YouTube video stats into Google Sheets

This n8n workflow takes a simple input (a list of YouTube URLs in Google Sheets) and turns it into a repeatable stats pipeline. You mark rows as “Ready,” run the workflow, and it loops through each URL in batches. For every video, it extracts the video ID, calls the YouTube API, and checks if the response came back clean. When it works, the workflow writes metrics like title, views, likes, and comment count into the same row and flips the status to “Finished.” If something fails, it doesn’t guess. It marks that row as “Error” so you can fix the URL, permissions, or API issue later without losing your place.

The workflow starts with a manual run in n8n (Execute or Test). Google Sheets supplies the URLs and statuses, the HTTP request pulls stats from YouTube, and an If check decides which update path to take. In the end, your sheet becomes the source of truth instead of a fragile scratchpad.

What Changes: Before vs. After

Real-World Impact

Say you track 40 videos each week for a content audit. Manually, even a quick routine (open the URL, find stats, paste into the right cells, and sanity-check the row) is about 3 minutes per video, so you’re spending roughly 2 hours weekly. With this workflow, you paste URLs once, set the status to Ready, and run it. The “work” is more like 5 minutes of setup plus waiting for the API calls to finish, and the sheet tells you exactly what succeeded.

Requirements

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Sheets to store URLs, metrics, and statuses.
  • YouTube Data API to fetch video statistics by ID.
  • Google Cloud credentials (create in Google Cloud Console for Sheets + YouTube access).

Skill level: Beginner. You’ll connect Google accounts, enable an API, and paste a sheet ID/tab name into the right places.

Need help implementing this? Talk to an automation expert (free 15-minute consultation).

The Workflow Flow

Manual run from n8n. You click Execute Workflow (or Test) when you want to refresh stats. If you prefer, you can later swap this for a Google Sheets trigger that runs when new rows appear.

Pull “Ready” URLs from Google Sheets. The workflow reads the “Video URLs” tab and filters down to rows marked Ready so you don’t reprocess old items.

Fetch metrics from YouTube. It loops through rows in batches, extracts the video ID from each URL, then makes an HTTP request to the YouTube API for the stats you care about.

Write results back with a clear status. A success path updates the row with metrics and sets the status to Finished. A failure path marks the row Error, which keeps your list clean and reviewable.

You can easily modify which fields you store (for example tags or category ID) based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Manual Trigger

Set the workflow to start on demand so you can run updates whenever you need fresh video metrics.

  1. Add or confirm the Manual Execution Start node as the trigger.
  2. Leave default settings, as this node has no parameters to configure.
  3. Ensure the main flow connects from Manual Execution Start to Retrieve Sheet Video Links.

Step 2: Connect Google Sheets

Pull the list of video URLs marked as ready from your spreadsheet.

  1. Open Retrieve Sheet Video Links and select the spreadsheet Document with ID 1I9gyb27WiRHz--g-xi-QH1W3WppZJdSfY6L32-DyUw0.
  2. Set the Sheet to Video Urls.
  3. Under filters, set status to ready so only queued rows are processed.
  4. Credential Required: Connect your googleSheetsOAuth2Api credentials.

If your sheet uses different column headers, update the filter field in Retrieve Sheet Video Links to match your exact column name.

Step 3: Set Up Batch Processing and API Call

Process rows one at a time and fetch metadata for each YouTube URL.

  1. Open Batch Through Records and keep default settings to iterate through items.
  2. In YouTube API Request, set URL to https://www.googleapis.com/youtube/v3/videos?.
  3. Enable Send Query and add the following query parameters: id set to {{ $json.video_url.match(/(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/)[1] }}, and part set to contentDetails,snippet,statistics.
  4. Set Authentication to predefinedCredentialType and confirm nodeCredentialType is youTubeOAuth2Api.
  5. Credential Required: Connect your youTubeOAuth2Api credentials.

⚠️ Common Pitfall: If the video URL format differs, the regex in the id parameter may fail. Test a few URLs to confirm IDs extract correctly.

Step 4: Configure Output Updates to Google Sheets

Write the fetched video metrics back into the sheet for each row.

  1. In Verify API Response, keep the condition that checks {{ $json.pageInfo.totalResults }} exists to validate a successful response.
  2. Open Update Sheet Metrics and set Operation to update.
  3. Confirm Matching Columns includes row_number and is mapped to {{ $('Retrieve Sheet Video Links').item.json.row_number }}.
  4. Map output columns to the YouTube response: title to {{ $json.items[0].snippet.title }}, tags to {{ $json.items[0].snippet.tags.join(", ") }}, view_count to {{ $json.items[0].statistics.viewCount }}, like_count to {{ $json.items[0].statistics.likeCount }}, comment_count to {{ $json.items[0].statistics.commentCount }}, published_at to {{ $json.items[0].snippet.publishedAt.toString().slice(0, 19).replace('T', ' ') }}, and last_fetched_time to {{ $now.toISO().toString().slice(0, 19).replace('T', ' ') }}.
  5. Credential Required: Connect your googleSheetsOAuth2Api credentials.

Step 5: Add Error Handling

Flag records that fail the API response check and continue processing the next item.

  1. Use Verify API Response to route unsuccessful results to Mark Sheet Error.
  2. In Mark Sheet Error, set Operation to update and map status to error.
  3. Map row_number to {{ $('Retrieve Sheet Video Links').item.json.row_number }} and last_fetched_time to {{ $now.toISO().toString().slice(0, 19).replace('T', ' ') }}.
  4. Credential Required: Connect your googleSheetsOAuth2Api credentials.

The flow loops back to Batch Through Records after both success and error paths, ensuring all rows are processed.

Final Step: Test and Activate Your Workflow

Run a manual test and then turn on the workflow for production use.

  1. Click Execute Workflow to trigger Manual Execution Start.
  2. Verify that rows with status set to ready are updated with titles, counts, and timestamps in Update Sheet Metrics.
  3. Confirm any invalid or missing video IDs are marked error by Mark Sheet Error.
  4. When results look correct, toggle the workflow to Active for ongoing use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Watch Out For

  • Google Cloud credentials can expire or lack the right scopes. If the Google Sheets update nodes start failing, check the credential settings in n8n and confirm the sheet is shared with the connected account.
  • YouTube Data API quotas are real. If you run huge batches or refresh too frequently, you may hit quota limits and see more rows marked Error until the quota resets.
  • The URL formats vary (short links, playlists, extra parameters). If some videos fail, make sure your video ID extraction handles the URL patterns your team pastes in.

Common Questions

How quickly can I implement this YouTube Sheets automation automation?

About 30 minutes if your Google Cloud project is ready.

Can non-technical teams implement this YouTube Sheets automation?

Yes, but someone needs to handle the Google Cloud Console setup once. After that, day-to-day use is just adding URLs and setting rows to Ready.

Is n8n free to use for this YouTube Sheets automation workflow?

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 (usually covered by free quota for light reporting).

Where can I host n8n to run this automation?

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.

How do I adapt this YouTube Sheets automation solution to my specific challenges?

You can expand the HTTP – Find Video Data request to pull additional fields like tags or category ID, then map them into new columns in the Google Sheets update node. Many teams also replace the manual trigger with a Google Sheets trigger so new “Ready” rows kick off processing automatically. If you’re tracking competitors, adding a “Channel” column per row makes filtering and pivot tables much easier.

Why is my Google Sheets connection failing in this workflow?

Usually it’s an expired or mis-scoped Google credential in n8n. Reconnect the Google Sheets credential, confirm the spreadsheet is shared with that Google account, and double-check the node is pointing at the correct tab (“Video URLs”).

What’s the capacity of this YouTube Sheets automation solution?

If you self-host, capacity mostly comes down to your server and YouTube API quota, not n8n itself. On n8n Cloud, your monthly execution limit depends on plan, and each video processed counts toward that total. Practically, this workflow can handle long lists because it runs in batches; the main constraint is how aggressively you’re calling the YouTube API.

Is this YouTube Sheets automation automation better than using Zapier or Make?

Often, yes. Zapier and Make can do basic “URL in, row out” workflows, but handling batching, branching on API failures, and reprocessing only the “Ready” rows gets fiddly and can become expensive as volume grows. n8n is more forgiving here because you can loop through items, add logic checks, and keep the whole thing in one workflow. If you self-host, you also avoid paying more just because you ran more updates this month. That said, if you only ever track five videos at a time, Zapier can be quicker to set up. Talk to an automation expert if you want an honest recommendation for your situation.

Once this is running, your sheet stays clean and your reporting stops being fragile. The workflow handles the repetitive checking and logging, so you can spend your time actually interpreting what the numbers mean.

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.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal