YouTube Trend Analysis and Report Generator - n8n Workflow

Use this powerful n8n workflow to automatically find high-engagement YouTube trends in your niche, calculate performance metrics, and save filtered results to Google Sheets.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Content strategists looking for fast topic research.
Marketers needing high-performing video inspiration.
Agencies requiring automated trend reporting.
Users looking to leverage advanced n8n templates for data aggregation.

Overview

The goal of this n8n workflow is to transform manual YouTube research into a scalable, automated process. By using a frontend form as an n8n trigger, users simply input a topic and a time range. The system then searches for hundreds of relevant videos and applies sophisticated filtering. A custom n8n node calculates the crucial Engagement Rate (Likes + Comments / Views). Only videos that exceed a certain engagement threshold (e.g., 2%) and meet minimum view count criteria are selected, ensuring the output is focused only on genuinely trending content. The final, clean data is then presented in a newly created Google Sheet, providing a ready-made trend report. This particular n8n workflow saves significant research time and is a powerful example of what is possible with advanced n8n templates.

How it Works


  1. The n8n workflow starts with the "On form submission" n8n trigger, capturing the niche topic and the number of days to look back.

  2. The "Edit Fields" n8n node calculates the necessary publishedAfter timestamp for the YouTube API request using the relative time input.

  3. The "Create spreadsheet" n8n node initializes a new Google Sheet report, dynamically named based on the topic and timeframe.

  4. The "Get many videos" n8n node queries YouTube for relevant videos, filtered by topic and time constraint.

  5. The "Get Data" HTTP Request n8n node iterates over the results, fetching the full statistics (views, likes, comments) for each video using the dedicated YouTube Data API key.

  6. The subsequent "Code" n8n node calculates the exact Engagement Rate for each video item, a key metric in this n8n workflow.

  7. The "Engagement Rate Check" n8n node filters results, only allowing high-performing videos (configured to >= 2% engagement rate) to continue through the n8n workflow.

  8. The "Data Format" n8n node structures the output fields, including calculating the "Uploaded Hours Ago" for further filtering.

  9. A secondary "If" n8n node applies strict quality filters, ensuring videos have minimum views (1000+), are within the defined time range, and exclude hashtag-heavy titles.

  10. The "Remove Duplicates" n8n node cleans the final list based on "Video URL" to ensure data integrity.

  11. The "Append row in sheet" n8n node writes the high-engagement, filtered video data to the Google Sheet.

  12. Finally, the "Output Format" prepares the spreadsheet link, which is displayed to the user via the completion "Form" n8n node. This complete n8n workflow demonstrates powerful data manipulation capabilities.

Installation Guide


  1. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Configure the Trigger: Ensure the On form submission n8n trigger fields ('Topic Name', 'Last How Many Days?') are correctly configured for input.

  3. YouTube Credentials Setup: Connect your YouTube OAuth2 credentials to the Get many videos n8n node. Additionally, in the Get Data HTTP Request n8n node, replace Your Project API Key with your actual YouTube Data API Key.

  4. Google Sheets Credentials: Connect your Google Sheets OAuth2 credentials to both the Create spreadsheet and Append row in sheet n8n nodes.

  5. Review Filters: Customize the engagement rate threshold in the Engagement Rate Check n8n node and the minimum view count in the subsequent If n8n node to match your required research criteria. This optimization tailors the core logic of the n8n workflow.

  6. Activate: Save and activate the n8n workflow to start monitoring for form submissions.

Node Details

On form submission (n8n trigger): The starting point of this n8n workflow. It acts as a webhook to gather user input for the niche topic and the desired time frame.
Get many videos (YouTube n8n node): Searches YouTube for relevant videos based on the user-defined query (q) and calculated time constraints (publishedAfter). It uses OAuth2 for connection and is configured to search the 'US' region code.
Create spreadsheet (Google Sheets n8n node): Creates a dynamic Google Sheet document for the final trend report. The title is generated using data from the n8n trigger.
Get Data (HTTP Request n8n node): A critical step that uses a direct API call (requiring a separate YouTube API Key) to fetch detailed video statistics, which are not always provided by the search node.
Code (n8n node): Executes custom JavaScript to calculate the crucial Engagement Rate metric: ((likes + comments) / views) 100. This provides the necessary data point for filtering.
Engagement Rate Check (If n8n node): Filters videos, requiring an engagement rate of 2% or higher to proceed. This ensures only truly engaging content moves forward in this n8n workflow.
If (If n8n node): Applies strict quality filtering: requires views > 1000, ensures the video was uploaded within the requested timeframe, and excludes titles containing the '#' symbol to prioritize organic titles.


  • Append row in sheet (Google Sheets n8n node): Writes the final, filtered, high-engagement video data into the newly created spreadsheet, completing the automated report generation step of the n8n templates process.

Related n8n Workflows

Free

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by

Featured*