YouTube to Google Sheets, ranked training videos
You open YouTube to “quickly find a good tutorial” and, two hours later, you’ve got 17 tabs, three half-watched videos, and zero confidence you picked the best one.
This hits content marketers who need credible training sources, but educators building resource lists and consultants doing fast research feel it too. With YouTube Sheets ranking, you end up with a single Google Sheet that’s already filtered, scored, and easy to share.
This workflow searches YouTube with multiple queries, weeds out junk, ranks what’s worth your time, and logs the top results into Sheets. You’ll see exactly what it automates, what you get back, and what you need to run it.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: YouTube to Google Sheets, ranked training videos
flowchart LR
subgraph sg0["When clicking ‘Execute workflow’ Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Query", pos: "b", h: 48 }
n2["<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/>Search YouTube"]
n3@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Filter for Quality", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Query", pos: "b", h: 48 }
n6@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Results", pos: "b", h: 48 }
n7@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Filter for Relevance", pos: "b", h: 48 }
n8@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop over Items", pos: "b", h: 48 }
n9["<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/>Get Video Metadata"]
n10@{ icon: "mdi:swap-vertical", form: "rounded", label: "Remove Unnecessary Fields", pos: "b", h: 48 }
n11@{ icon: "mdi:cog", form: "rounded", label: "Remove Duplicate Videos", pos: "b", h: 48 }
n12@{ icon: "mdi:swap-vertical", form: "rounded", label: "Generate Relevance Score", pos: "b", h: 48 }
n13@{ icon: "mdi:cog", form: "rounded", label: "Sort by Relevance", pos: "b", h: 48 }
n14@{ icon: "mdi:cog", form: "rounded", label: "Force Limit", pos: "b", h: 48 }
n15@{ icon: "mdi:database", form: "rounded", label: "Send to Google Sheets", pos: "b", h: 48 }
n3 --> n15
n1 --> n5
n14 --> n3
n5 --> n2
n6 --> n7
n2 --> n6
n8 --> n11
n8 --> n9
n13 --> n14
n4 --> n10
n9 --> n4
n7 --> n8
n11 --> n12
n12 --> n13
n10 --> n8
n0 --> 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 n4,n7 decision
class n15 database
class n2,n9 api
classDef customIcon fill:none,stroke:none
class n2,n9 customIcon
The Problem: Finding Good Training Videos Is Weirdly Hard
YouTube is great at giving you “more videos.” It’s not great at giving you the right videos, consistently, for a specific learning goal. You search, open a handful, skim intros, then second-guess because the titles are clicky, the content is thin, or the video is a short that doesn’t actually teach anything. Then the real mess starts: copying links into a doc, losing notes, and trying to remember why Video #12 felt better than Video #3. By the time you’re done, the research time cost is bigger than the training itself.
The friction compounds. Small gaps create big delays.
- Searching one query at a time leaves you with blind spots and repeats.
- Shorts and “hype” videos pollute your results, so you waste time filtering manually.
- You end up judging quality by vibe instead of signals like views, likes, and freshness.
- Your final “list” lives in tabs and DMs, which makes it painful to share or reuse.
The Solution: Automatically Search, Filter, Score, and Rank
This n8n workflow turns YouTube discovery into a repeatable research system. You start it manually when you want a fresh batch of training videos (weekly, for a new client project, or whenever a topic changes). It runs multiple YouTube searches using an array of queries, expands the results into individual video items, and filters out low-quality content using relevance rules (including patterns that catch shorts and clickbait). Next, it fetches video details for each candidate and checks quality signals like views, likes, and publication date. Finally, it computes a relevance score, sorts the list, keeps the top set, and appends clean rows into Google Sheets so you’ve got a ranked, shareable training library.
The workflow starts with a query list, then uses YouTube API requests to collect results and enrich them with details. After filtering and scoring, the final ranked list (top 50 by default) lands in Google Sheets with the metadata you actually need.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you build a weekly “training picks” list for your team. Manually, you might run 10 searches, open about 8 videos per search, then spend maybe 2 minutes skimming each just to decide if it’s even worth saving. That’s roughly 160 minutes, plus another 30 minutes copying links and notes into a sheet. With this workflow, you launch once, let it process in the background (often around 10–20 minutes depending on volume and API speed), then review a ranked top 50 inside Google Sheets. Your human time drops to a quick review pass.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- YouTube Data API v3 to search and fetch video details.
- Google Sheets to store the ranked results.
- YouTube OAuth / API credentials (get them from Google Cloud Console).
Skill level: Intermediate. You’ll connect credentials, paste a Sheet ID, and tweak a query list and a few filters.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
You launch it when you need fresh results. A manual trigger kicks things off, which is perfect for weekly research or a one-off sprint before a workshop.
The workflow builds a list of search terms. It loads your query array (10 by default), then splits that list so each term can be searched cleanly via HTTP requests to the YouTube Data API.
Results get filtered, enriched, and scored. It expands each search response into video items, filters out obvious junk using relevance rules, then fetches per-video details. After that, it applies quality thresholds (views, likes, recency) and computes a relevance score so the “best training” rises to the top.
The ranked list lands in Google Sheets. Duplicates are removed, items are sorted, the list is limited (top 50 by default), and the final rows are appended to your target sheet after a short wait to avoid timing issues.
You can easily modify the search queries to match your niche, and you can adjust quality thresholds to be stricter (or looser) based on how broad the topic is. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Configure the Manual Trigger
Set up the workflow to start on demand and define the initial list of search queries to run against YouTube.
- Add Manual Launch Trigger as your starting node to run the workflow on demand.
- In Assign Search Terms, add an array field named query and set it to
{{["AI agents tutorial step by step","AI tools tutorial for beginners","AI agent building tutorial","AI prompt engineering techniques","best AI tools training","prompt engineering best practices"]}}. - In Expand Term List, set Field to Split Out to
queryto iterate each search term.
Connect YouTube
Configure YouTube API calls to find videos and fetch detailed statistics for each result.
- Open YouTube Search Request and set URL to
https://www.googleapis.com/youtube/v3/search. - In YouTube Search Request, set query parameters: part
id,snippet, q{{ $json.query }}, typevideo, maxResults50, orderrelevance, and videoCategoryId27. - Credential Required: Connect your youTubeOAuth2Api credentials in YouTube Search Request.
- In Expand Search Results, set Field to Split Out to
items. - Open Fetch Video Details and set URL to
https://www.googleapis.com/youtube/v3/videoswith parameters partsnippet,statisticsand id{{ $json.id.videoId }}. - Credential Required: Connect your youTubeOAuth2Api credentials in Fetch Video Details.
Iterate Video Items outputs to both Eliminate Duplicate Clips and Fetch Video Details in parallel, so duplicates are handled while details are fetched.
Set Up Content Filtering and Scoring
Filter video titles for relevance, apply quality thresholds, map fields, remove duplicates, and compute a relevance score for ranking.
- In Relevance Content Filter, keep the title checks using
{{ $json.snippet.title.toLowerCase() }}with the regex and not-regex rules for educational and anti-monetization keywords. - In Quality Metrics Filter, verify the conditions: viewCount
{{ $json.items[0].statistics.viewCount }}>10000, likeCount{{ $json.items[0].statistics.likeCount }}>100, and publishedAt{{ $json.items[0].snippet.publishedAt }}after2023-12-01T00:00:00. - In Map Output Fields, map fields to: Title
{{ $json.items[0].snippet.title }}, Channel{{ $json.items[0].snippet.channelTitle }}, Published At{{ $json.items[0].snippet.publishedAt }}, Views{{ $json.items[0].statistics.viewCount }}, Likes{{ $json.items[0].statistics.likeCount }}, Description{{ $json.items[0].snippet.description }}, and URLhttps://www.youtube.com/watch?v={{ $json.items[0].id }}. - In Eliminate Duplicate Clips, set Compare to
{{ $json.URL }}. - In Compute Relevance Score, set RelevanceScore to the provided multi-line scoring expression that evaluates tutorial keywords, AI terms, and quality indicators.
- In Rank by Relevance, sort by RelevanceScore in
descendingorder. - In Apply Result Limit, set Max Items to
50.
⚠️ Common Pitfall: The field name Descriptoin in Compute Relevance Score is misspelled. Keep it consistent with Append to Sheets or correct both nodes if you fix the typo.
Configure Google Sheets Output
Append the final ranked results to your Google Sheet after a brief delay to avoid rate limits.
- In Delay Processing, set Amount to
3to pause before writing results. - Open Append to Sheets and set Operation to
append. - Set the Document to
[YOUR_ID](YouTube AI Resources) and the Sheet togid=[YOUR_ID](Sheet1). - Map columns in Append to Sheets: URL
{{ $json.URL }}, Likes{{ $json.Likes }}, Title{{ $json.Title }}, Views{{ $json.Views }}, Channel{{ $json.Channel }}, Description{{ $json.Descriptoin }}, and Published At{{ $json['Published at'] }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Append to Sheets.
Tip: If your sheet columns are named differently, update the column mapping in Append to Sheets to avoid empty cells.
Test and Activate Your Workflow
Run a manual test to verify YouTube results are filtered, scored, and appended to your sheet.
- Click Execute Workflow starting from Manual Launch Trigger to run a test.
- Confirm that Relevance Content Filter and Quality Metrics Filter only pass valid educational videos.
- Verify that Append to Sheets adds rows with URLs, title, channel, stats, and published date.
- Once validated, toggle the workflow to Active for production use.
Common Gotchas
- YouTube Data API v3 credentials can expire or lack scopes. If things break, check the Google Cloud Console credential status and the OAuth consent permissions first.
- If you’re using Wait nodes or external processing, timing varies. Bump up the wait duration if the Google Sheets append runs before the final list is ready.
- Default AI prompts are generic. Add your definition of “quality training” early (examples of good channels, banned buzzwords, preferred depth) or you will keep second-guessing the ranking.
Frequently Asked Questions
About 30 minutes if your Google and YouTube credentials are ready.
No. You’ll mostly connect accounts and paste IDs. The only “advanced” part is tweaking filters and the query list, which is just editing text.
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 API usage (usually minimal for this use case).
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.
Yes, and it’s the most common tweak. Update the query array in the “Assign Search Terms” (Set) node to your topic, then adjust the “Quality Metrics Filter” thresholds for views, likes, and recency. If you care about certain keywords, change the weighting logic in “Compute Relevance Score” so your priorities win. You can also increase or decrease the final list size in the “Apply Result Limit” node.
Usually it’s an expired OAuth token or the YouTube Data API v3 isn’t enabled on the right Google Cloud project. Re-check the API is enabled, then re-authenticate the YouTube credential inside n8n. If it fails only sometimes, you may be bumping into quota or rate limits when processing a lot of results at once.
A lot, but it depends on your YouTube API quota and how many searches you run.
Often, yes, because this workflow needs branching, filtering, de-duplication, and scoring logic that gets awkward (and pricey) in simpler tools. n8n also makes it easier to control the exact data you send to Google Sheets, which matters when you want a clean research database instead of a messy dump. If you self-host, you’re not paying per task, so running big batches is less stressful. The tradeoff is that setup takes a bit more attention up front. If you want someone to sanity-check the approach, Talk to an automation expert.
Once this is in place, “find the best training videos” stops being a time sink and becomes a button you click. Your sheet stays organized, your team stays aligned, and you get your focus back.
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.