📊 Track top YouTube videos by view count with Google Sheets
⚡ 410 views · 📊 Market Research & Insights
💡 Pro Tip — YouTube’s API quotas can be a bottleneck when you’re pulling data at scale. ScraperNode is a community node with dedicated scrapers for channels, videos, and comments — no quota limits, just structured data.
Description
Workflow Setup Guide
This workflow collects the most-viewed videos from specified YouTube channels and saves the data to a Google Sheet. Follow these steps to set it up:
1. Credentials Setup
- Google Sheets: You need to have a Google Sheets credential configured in your n8n instance. If you don’t have one, go to the ‘Credentials’ section in n8n and add a new credential for Google Sheets.
- YouTube API Key: You need a YouTube Data API v3 key.
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Go to ‘APIs & Services’ > ‘Library’ and enable the YouTube Data API v3.
- Go to ‘APIs & Services’ > ‘Credentials’, click ‘Create Credentials’, and choose ‘API key’.
- Copy the generated API key.
2. Google Sheet Setup
You will need one Google Sheet with two separate sheets (tabs) inside it.
Input Sheet
Use Template This sheet provides the list of YouTube channels to process.
- Required Columns: Create a sheet with the following two columns:
ChannelID: The ID of the YouTube channel (e.g.,T7M3PpjBZzw).video_num_to_get: The number of top videos to retrieve for that channel (e.g.,5).
Output Sheet
This sheet is where the results will be saved.
- Required Columns: The workflow will automatically append data to the following columns. You can create them beforehand or let the workflow do it.
channelNametitlevideoIdvideoLink
3. Node Configuration
- Read Channel Info from Sheet:
- Select your Google Sheets credential.
- Enter your Spreadsheet ID.
- Enter the name of your Input Sheet.
- Fetch Most-Viewed Videos via YouTube API:
- Replace
YOUR_YOUTUBE_API_KEYwith the API key you generated in Step 1.
- Replace
- Append Video Details to Sheet:
- Select your Google Sheets credential.
- Enter your Spreadsheet ID (the same one as before).
- Enter the name of your Output Sheet.
🔗 Nodes Used
Google Sheets, HTTP Request
📥 Import
Download workflow.json and import into n8n:
Workflow menu → Import from File