Triangle pointing up
n8n Automation

Trends Tracker

Learn how to create an n8n workflow to track YouTube trends.

Instead of manually searching for what's trending on your niche, you can automate the process with TubeLab and n8n.

Before starting, it helps to break down the process in smaller steps:

  1. Research: we'll start by using your channel and TubeLab to spot outliers from your competitors;
  2. Analysis: we can then prompt ChatGPT to analyse those videos;
  3. Report: finally we prompt ChatGPT to create a report with the findings and send it to you.

Note: This is a simplified version of the workflow. You can extend it to include more steps, such as:

Trends Tracker

Pre-requisites

  1. Refer to the Quickstart guide to setup n8n with TubeLab and create the workflow.
  2. OpenAI n8n node setup - check the official n8n guide here or watch this video.

Research

We want to spot what's trending first with fresh data:

  1. Scan your niche to get fresh data (optional);
  2. Search for outlier videos from your competitors;

Scan your niche (optional)

With TubeLab you can scan any niche to find outliers and channels that relevant & real-time

  • Add a TubeLab node to your workflow and select Start a scan. Set:
    • Find by: Channels;
    • Channel IDS: Your Channel ID and your competitors. (max 5 channels)

How to find channel IDs? Paste any video in TubeLab's Video Extractor and copy the channel ID.

Note: a niche scan is an expensive operation (credits-wise). You can skip this step. Check the pricing table here.

Search for outliers from your competitors

  • Add a Wait node to wait for 2 hours to complete the scan.
  • Add a TubeLab node and select Search for similar outliers. Set:
    • Similar by: Channels;
    • Channels: Channel IDs from previous step;
    • Filters:
      • Content Kind: Video;
      • Published At: Last 3 Months;
      • Views: From 5,000.

The Wait node won't grantee that the fresh data is available. However TubeLab's data is probably already enough to get decent results.

Note: For better results use TubeLab's On scan status change trigger node in another flow (within the same workflow) so you can run the workflow again when the scan is complete.

Analysis

Now let's ask ChatGPT to analyse the videos and create a report.

Here's the prompt:

You're a YouTube Channel Analyst. Your goal is to analyse trending videos from the competition and create an actionable report.<Competition>{{ $input.all().map(item => `${item.json.snippet.title}ID: ${item.json.id}Views: ${item.json.statistics.viewCount}Avg. View Ratio: ${(Math.round((item.json.statistics.averageViewsRatio) * 100) / 100).toFixed(1)}Published: ${item.json.snippet.publishedAt}`).join('--- ') }}`} /></Competition><Template># :fire: 5 Trending Competitor Videos**[Video title](https://youtube.com/watch?v=[id])**Views: X | [Avg. Views To Subs Ratio]X OutlierUrl:Published: X ago(Exclude channels's own content)## :mag: Winning Patterns- **Topics**: Recurring themes- **Triggers**: Emotional/psychological angles- **Title Formulas**: Title templates that get clicks## :bulb: Ideas- [5 simple ideas based on trends][End with a very short paragraph of unique learnings that I can use to capture more attention & views.]</Template><Guidelines># Aesthetic Guidelines- Leverage code blocks for formulas/examples- Apply italic for explanations and bold for emphasis- Structure with clear visual hierarchy- Understand the main topic and ignore irrelevant videos# Success MetricsEnable users to:- Identify current winning content in their niche- Extract proven viral patterns- Create optimized videos with higher view/retention potential# Optimization Rules- Prioritize highest-impact insights- Use concise, actionable language- Combine related points efficiently- Maintain visual appeal within character limits# Core Parameters## Response Format: Discord markdown only- Character Limit: 2000 characters maximum- Execution Mode: Auto-execute both data collection tools immediately, then analyze## Discord Formatting Arsenal- _bold_ | _italic_ | ~strikethrough~ | `code`- :emoji: for visual appeal- do not use seperators- do not use headers- avoid double  within same topic header</Guidelines>Analysis:

Send Report

Finally I decided to send the report to a Discord channel.

All you need to do is install the Discord Node and connect your channels' webhook.

That's it!

Imagine trying to do all of this manually. It would take you hours to search for this outliers and then you would need to manually analyse the videos and write up the report.

With TubeLab and n8n you can automate the process and get the report every week without any effort.

Next steps

Now that you have setup TubeLab with n8n, it's time to create your first workflow.