---
title: "Best-performing YouTube videos on a topic in Google Sheets"
kind: "Kit"
category: "Marketing & SEO"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/7cd0d8ed-fac6-4e46-9e45-c860fc927765"
updated: "2026-11-09"
---

# Best-performing YouTube videos on a topic in Google Sheets

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that searches YouTube for a topic you type in n8n’s chat and keeps the videos from the past year that perform well. Each one that OpenAI finds on topic, with an English title, becomes a Google Sheets row with its views, likes and ratios.

Best-performing YouTube videos on a topic in Google Sheets is an n8n workflow in the Marketing \& SEO category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-09. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow finds the YouTube videos on a topic that did well over the past year and logs them in a Google Sheet. You type the topic in n8n’s chat. The YouTube node searches for it, an HTTP request fetches each result’s statistics, and a Code node works out its age, views per day and engagement ratios. Videos that clear four thresholds go to OpenAI’s gpt-4o-mini, which keeps the ones with an English title on your topic. Each of those becomes a row with eleven columns. Nothing changes on YouTube.

You type a topic in n8n’s chat → YouTube returns videos on it from the past year → Each video’s counts become ratios and a daily view rate → Four thresholds and an OpenAI check drop the weak ones → The rest are appended to your Google Sheet

### Who it suits

YouTubers and strategists who choose topics by what already performs, and agencies that research niches for clients. It gives you a list of proven videos to study. It writes no titles or ideas of its own. Skip it for research in another language, since the AI check drops every title that is not in English.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Creators | YouTubers planning their next video | Type a topic before scripting and study what the top rows share | A cooking channel types air fryer recipes and sorts the sheet by views per day. |
| Agencies | Strategists who research niches | Run several topics for a client and compare the rows | An agency runs five topics for a new client and copies each set to its own tab. |
| Brand marketing | Teams that plan video campaigns | Check that a subject draws steady views before paying for videos on it | A software brand checks how videos on spreadsheet tips perform before it commits. |
| Education | Course makers | Find the lessons on a subject that viewers keep watching | A tutor runs a topic and reads the titles of the fastest-growing videos. |
| Sponsorships | Teams that pick creators to work with | Open the strongest videos from the Youtube URL column | A sponsor team lists the best videos on a topic and contacts the channels behind them. |

### Where to use it

Any n8n that can reach Google and OpenAI will run it, on n8n Cloud or your own server. The results live in a spreadsheet, so sorting, filters, charts and sharing all happen in Google Sheets.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file and steps
- n8n’s chat: the panel that opens from the canvas is where you type each topic
- Google Sheets: sort the rows, chart them, or share the sheet with a team

### How to set it up

Get it saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Its author puts setup at about 13 minutes. Make the sheet first: a tab named `YT Topic Ideas` with the eleven headers below in its first row.

```text
Topic | Title | View Count | Like Count | Commet Count | Like Ratio | Comment Ratio | Views per day | Engagement Score | Days ago | Youtube URL
```

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| Google Cloud | A project with the YouTube Data API v3 turned on, and an OAuth client for n8n’s YouTube credential |
| OpenAI | An API key, for the title check |
| Google Sheets | The sheet above, and a Google Sheets OAuth2 credential |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add a YouTube OAuth2 credential and select it in `Get Videos` and in `Get Video Data`.
3. In `Get Video Data`, replace `YOUR_YOUTUBE_API_KEY` in the query with a YouTube Data API key, or delete that row. The OAuth credential signs the call on its own.
4. Add an OpenAI credential and select it in `ChatGPT`.
5. Add a Google Sheets credential and select it in `Update Data to Sheet`, then replace `YOUR_SHEET_ID` with the ID in your sheet’s address, between `/d/` and the next slash.
6. Save, open the chat, type a topic and check the rows that land.

`Commet Count` is spelled that way in the node. Keep that spelling in the sheet, or fix it in both places.

### How to use it

Type a topic of a few words, as you would in YouTube’s search box. The search covers videos published in the last 12 months, ordered by relevance with moderate safe search. Every video that passes lands as a new row. A second run on the same topic adds its rows again, because the sheet node appends and never looks for a match.

What to change for a different result

| To change | Where |
| --- | --- |
| Thresholds | The four conditions in \`Filter Bad Videos\` |
| Time span | \`publishedAfter\` in \`Get Videos\`, which looks back one year |
| Order and safe search | The options of \`Get Videos\` |
| Language and relevance check | The prompt in \`Filter Title \& Language\` |
| Columns | The mapping in \`Update Data to Sheet\` |

### Example

You type `home espresso`. Say one result has 250,000 views, 9,000 likes and 600 comments, and went up 100 days ago. The Code node gives it a like ratio of 3.60, an engagement score of 0.0384 and 2,500 views per day. All four thresholds pass. OpenAI answers Yes for its English title, and this row lands, trimmed here:

```json
{ "Topic": "home espresso", "View Count": 250000, "Like Ratio": "3.60", "Comment Ratio": "0.24", "Engagement Score": "0.0384", "Views per day": 2500, "Days ago": 100 }
```

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This one has 11 nodes and no sticky notes. A ratio here is a share, such as likes per hundred views. A credential is a key n8n keeps for you and hands to the node you pick it in. Try a narrow topic first, so the first run stays small.

**For experts.** `Performance Ratio Calculation` scores one item at a time, and two of its fields come out as strings with fixed decimals. `Filter Bad Videos` compares them with loose type validation. All four must hold.

The scores and their thresholds

| Field | Formula | Kept when |
| --- | --- | --- |
| \`viewCount\` | views | over 10,000 |
| \`likeRatio\` | likes ÷ views × 100, two decimals | over 1.5 |
| \`engagementScore\` | (likes + comments) ÷ views, four decimals | over 0.03 |
| \`viewsPerDay\` | views ÷ days since publishing, rounded | over 1,000 |

`Remove Duplicates` compares whole items, so it only drops a video that came back twice with the same numbers. `Filter Title & Language` holds the model to `{"Answer": "Yes or No"}` through a structured parser, and the IF after it keeps an exact `Yes`. The Code node also counts likes per day, which no column takes.

### Good to know

The search can use up YouTube quota quickly, and repeat runs add duplicate rows.

- Quota: \`Get Videos\` has Return All on, so it pages through every result YouTube offers, and a search costs far more quota than a lookup of one video
- Billing: one OpenAI call for each video that clears the thresholds
- Repeat runs: the same video can land in several rows, so sort or dedupe in the sheet
- Language: the check keeps English titles only, so rewrite its prompt for another language
- Who can run it: the chat trigger is not public, so only people who can open the workflow in n8n can start a run
- Credentials: the JSON holds none, and nothing from its author’s accounts

## README

```markdown
# Best-performing YouTube videos on a topic in Google Sheets

An n8n workflow. Type a topic in n8n's chat, and it searches YouTube for videos on it from the past year. It keeps the
ones that perform well and have an English title on topic, and appends each to a Google Sheet.

## What is inside

- `workflow.json`: the workflow as n8n exports it, 11 nodes. It holds no credential.
- Changes to the original copy: its spreadsheet ID is now `YOUR_SHEET_ID`, its tab is picked by the name
  `YT Topic Ideas`, and the key placeholder in `Get Video Data` reads `YOUR_YOUTUBE_API_KEY`.
- `README.md`: these notes.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- A Google Cloud project with the YouTube Data API v3 turned on, and an OAuth client for n8n's YouTube credential.
- An OpenAI API key.
- A Google Sheet with a tab named `YT Topic Ideas` and these eleven headers in its first row: `Topic`, `Title`,
  `View Count`, `Like Count`, `Commet Count`, `Like Ratio`, `Comment Ratio`, `Views per day`, `Engagement Score`,
  `Days ago`, `Youtube URL`. The node spells `Commet Count` that way, so keep it, or fix it in both places.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add a YouTube OAuth2 credential and select it in `Get Videos` and `Get Video Data`.
3. In `Get Video Data`, replace `YOUR_YOUTUBE_API_KEY` under Query Parameters with a YouTube Data API key from the
   same project. You can delete that row instead, since the OAuth credential signs the call by itself.
4. Add an OpenAI credential and select it in `ChatGPT`.
5. Add a Google Sheets OAuth2 credential and select it in `Update Data to Sheet`. Replace `YOUR_SHEET_ID` with the ID
   from your sheet's address, the part between `/d/` and the next slash.
6. Save. Open the chat from the canvas, type a topic and check the rows that arrive.

## How a video is scored

`Performance Ratio Calculation` works out these fields for each video, and `Filter Bad Videos` keeps a video only when
all four are over their limits:

| Field | How it is worked out | Kept when |
|---|---|---|
| `viewCount` | views | over 10,000 |
| `likeRatio` | likes ÷ views × 100 | over 1.5 |
| `engagementScore` | (likes + comments) ÷ views | over 0.03 |
| `viewsPerDay` | views ÷ days since it went up | over 1,000 |

The videos left go to `Filter Title & Language`, where gpt-4o-mini answers Yes only for an English title about your
topic.

## Change the look

- Thresholds: the four conditions in `Filter Bad Videos`.
- Time span: `publishedAfter` in `Get Videos` looks back one year.
- Search order and safe search: the options of `Get Videos` (relevance and moderate in the file).
- Language and relevance: the prompt in `Filter Title & Language`.
- Columns: the mapping in `Update Data to Sheet`.

## Good to know

- `Get Videos` has Return All on, so it reads every page of results. Searches cost far more YouTube quota than
  lookups of single videos, so watch your project's quota on broad topics.
- Each video that clears the thresholds costs one OpenAI call.
- The sheet node appends. Running the same topic twice adds the same videos again.
- The chat trigger is not public: only people who can open the workflow in n8n can start a run.
```

## What is in it

2 files, 18 KB, downloaded as a zip.

```text
README.md  3 KB
workflow.json  15 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 9 steps, starting on a chat message
- AI: 1 step calls an AI model: Filter Title & Language
- Sign-ins: Signs in to: YouTube, Google Sheets, OpenAI and www.googleapis.com
- API keys: No API key is left in the file; 1 blank in it for your own key
- Step types: Mindket’s checker reads all 8 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/7cd0d8ed-fac6-4e46-9e45-c860fc927765)
- [Its page on Mindket](https://mindket.com/p/7cd0d8ed-fac6-4e46-9e45-c860fc927765)
