Skip to main content

AI YouTube trend finder based on niche

Workflow preview

Workflow preview
100%
AI YouTube trend finder based on niche preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Youtube Video This n8n workflow is designed to assist YouTube content creators in identifying trending topics within a specific niche. By leveraging YouTube's search...

Best for

  • Market Research automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.toolworkflow, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.stickynote, n8n-nodes-base.httprequest, n8n-nodes-base.youtube

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Leonardo Grigorio.

Original n8n.io source

1.1 Workflow description

Title
AI YouTube trend finder based on niche
Workflow name
AI YouTube trend finder based on niche

Youtube Video

This n8n workflow is designed to assist YouTube content creators in identifying trending topics within a specific niche. By leveraging YouTube's search and data APIs, it gathers and analyzes video performance metrics from the past two days to provide insights into what content is gaining traction. Here's how the workflow operates:

  1. Trigger Setup: The workflow begins when a user sends a query through the chat_message_received node. If no niche is provided, the AI prompts the user to select or input one.

  2. AI Agent (Language Model): The central node utilizes a GPT-based AI agent to:

    • Understand the user's niche or content preferences.
    • Generate tailored search terms related to the niche.
    • Process YouTube API responses and summarize trends using insights such as common themes, tags, and audience engagement metrics (views, likes, and comments).
  3. YouTube Search: The youtube_search node runs a secondary workflow to query YouTube for relevant videos published within the last two days. It retrieves basic video data such as video IDs, relevance scores, and publication dates.

  4. Video Details Retrieval: The workflow fetches additional details for each video:

    • Video Snippet: Metadata like title, description, and tags.
    • Video Statistics: Metrics such as views, likes, and comments.
    • Content Details: Video duration, ensuring only content longer than 3 minutes and 30 seconds is analyzed.
  5. Data Processing:

    • Video metadata is cleaned, sanitized, and stored in memory.
    • Tags, titles, and descriptions are analyzed to identify patterns and trends across multiple videos.
  6. Output: The workflow compiles insights and presents them to the user, highlighting:

    • The most common themes or patterns within the niche.
    • URLs to trending videos and their respective channels.
    • Engagement statistics, helping the user understand the popularity of the content.

Key Notes for Setup:

  • API Keys: Ensure valid YouTube API credentials are configured in the get_videos, find_video_snippet, find_video_statistics, and find_video_data nodes.
  • Memory Buffer: The window_buffer_memory node ensures the AI agent retains context during analysis, enhancing the quality of the generated insights.
  • Search Term Customization: The AI agent dynamically creates search terms based on the user’s niche to improve search precision.

Use Case:

This workflow is ideal for YouTubers or marketers seeking data-driven inspiration for creating content that aligns with current trends, maximizing the potential to engage their audience.

Example Output:

For the niche "digital marketing":

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.6

Block 2 - chat_message_received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 3 - youtube_search

Type / Role
@n8n/n8n-nodes-langchain.toolWorkflow - toolWorkflow
Config choices
Version 1.2

Block 4 - openai_llm

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1

Block 5 - window_buffer_memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.2

Block 6 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - find_video_data1

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - get_videos1

Type / Role
n8n-nodes-base.youTube - youTube
Config choices
Version 1

Block 9 - response1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - group_data1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - save_data_to_memory1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - retrieve_data_from_memory1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - loop_over_items1

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 14 - if_longer_than_3_

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 15 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow AI YouTube trend finder based on niche
Complexity advanced
Nodes 15
Categories Market Research, AI Summarization
Author Leonardo Grigorio
Published 05 Dec 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2606/2606.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does AI YouTube trend finder based on niche do?

Youtube Video This n8n workflow is designed to assist YouTube content creators in identifying trending topics within a specific niche. By leveraging YouTube's search...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research, AI Summarization use case.