Mindket

Chat agent that reports what is trending on YouTube

Newversion 1 · updated

Overview

An n8n chat where you name a niche. An agent searches YouTube for videos from the last two days, looks each one up for views, likes and tags, and reports what the new videos have in common.

Chat agent that reports what is trending on YouTube is an n8n workflow in the Research category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: import the file, and type the video lookup’s key into the node in place of the variable
  • Your own n8n server: set GOOGLE_API_KEY for n8n and leave the node as it is
  • n8n’s chat: the canvas chat while you test. The public chat page stays off until you turn it on in the trigger

Platform

Connects 2 apps

How it works

Trigger

Chat message

It starts when you send a message in n8n’s chat:

  • A niche, such as the kind of videos you make

Actions

  1. The agent checks that you named a niche, and offers a few to pick from if you did not
  2. It calls the YouTube search tool up to three times with different search terms
  3. YouTube is searched for videos from the last two days, three results a search
  4. Each video is looked up for its views, likes, comments, tags and length
  5. Videos of 3 minutes 30 seconds or less are dropped, and the rest are added to one text
  6. The agent reads that text and reports what is trending in the niche, with links

Result

A short report on what is trending in your niche over the last two days, with view, like and comment counts and links to the videos and channels

Integrations

What you need before you start.

OpenAI

Language model

Runs the agent that plans the searches and writes the report. The node’s default model is gpt-5-mini.

NeedsOpenAI API key

YouTube

Video search and data

Searches for new videos in the niche, then looks each one up for its numbers, tags and length.

NeedsA YouTube OAuth2 credential, and a YouTube Data API key for the video lookup

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
11 steps, starting when another workflow calls it or on a chat message
AI
1 step calls an AI model: AI Agent
Sign-ins
Signs in to: YouTube and OpenAI
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 9 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow is a chat that reports what is trending on YouTube in a niche. You name a niche, and an OpenAI agent calls a search tool up to three times with different terms. The tool searches for videos from the last two days, looks each one up for its numbers and tags, and drops anything that runs three and a half minutes or less. The agent then describes what the new videos have in common. The file holds sixteen nodes, two of them sticky notes. Mindket added one so the tool has a start.

Who it suits

Creators, channel managers and content marketers who want a quick read on their niche before they plan a video. Skip it if you want a ranked list of single videos. The agent is told to describe the whole picture and not to review any one video.

Who uses it, and how
IndustryWho uses itHow they use itExample
Video creatorsSolo YouTubersAsk about their niche before they pick the next topicA woodworking channel asks about small workshop builds and sees a wave of new jig videos.
Social media agenciesContent strategistsCheck a client’s niche before the weekly planning callAn agency asks about vegan meal prep and brings the report to the call.
Online educationCourse makersLook at what learners watch on a skill before they record a lessonA Python teacher asks about beginner projects and sees which ones draw comments.
BrandsMarketing leadsScan a topic in the days before a launchA coffee gear brand asks about pour-over coffee a week before a new kettle ships.

You need a little n8n and a Google Cloud project: import a file, make two credentials, add one key and save the workflow once.

Where to use it

Any n8n that can reach OpenAI and Google’s YouTube API will run it. The video lookup reads its key from an environment variable, which n8n’s docs describe for self-hosted n8n.

  • n8n Cloud: import the file, and type the video lookup’s key into the node in place of the variable
  • Your own n8n server: set GOOGLE_API_KEY for n8n and leave the node as it is
  • n8n’s chat: the canvas chat while you test. The public chat page stays off until you turn it on in the trigger

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Save the workflow once after you import it, because the tool has to point at it.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own
OpenAIAn API key for the agent’s model
Google CloudThe YouTube Data API on, an OAuth2 credential for the search and an API key for the video lookup
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Save it, so the workflow has an ID of its own.
  3. In youtube_search, pick this same workflow from the list. The tool runs the lower half of this file.
  4. Add an OpenAI credential and select it in openai_llm.
  5. Add a YouTube OAuth2 credential and select it in get_videos1.
  6. Give find_video_data1 your YouTube Data API key: set GOOGLE_API_KEY for n8n, or type the key into the node and remove it before you share the file.
  7. Save, open the chat on the canvas and name a niche.

How to use it

Type a niche, such as home espresso or budget travel. If you give none, the agent asks and offers a few to pick from. It then searches up to three times and answers in one report. The report gives view, like and comment counts, with links to the videos and their channels.

What to change for a different result
To changeWhere
The report’s voice and rulesThe system message of AI Agent
The time window, region and number of resultsget_videos1: publishedAfter, regionCode and limit
The shortest video that countsThe 210 seconds inside if_longer_than_3_
How much the chat remembersContext Window Length in window_buffer_memory, 5 by default
The modelopenai_llm

Example

You type this in the chat.

home espresso

The agent searches with terms of its own, such as espresso machine under a budget, then describes the pattern in the new videos. It names the views, likes and comments behind it and links the videos and channels it used.

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 file holds two workflows in one. The chat and the agent sit on the top line. The search the tool runs sits on the bottom line, and it starts at the node Mindket added. Test with one niche, then open the tool’s run under Executions to see what YouTube returned.

For experts. The tool passes one field, search_term, which reaches the lower half as query.search_term.

Where to look closer
NodeWhat it doesWhat to know
youtube_searchTool Workflow 1.2 with one input fieldIt runs this same workflow, so pick it from the list after you save
get_videos1YouTube search for the term, region US, last two days, 3 results, by relevanceIt needs a YouTube OAuth2 credential
find_video_data1GET on the videos endpoint for each resultThe key comes from GOOGLE_API_KEY
save_data_to_memory1Strips links and emoji, then adds the video to one saved textIt never clears that text

Good to know

A video with no tags stops the run, and the saved text is never cleared.

  • Models: openai_llm names no model, so n8n’s default applies, gpt-5-mini (read on 12 November 2026). OpenAI’s deprecations page lists it for shutdown on 11 December 2026, with gpt-5.6-terra as the replacement
  • Saved text: n8n keeps a workflow’s saved data between runs only when it is published. There a later search can return videos from an earlier one. While you test by hand, nothing stays
  • No tags: group_data1 joins each video’s tags, so a video with none stops the run at that node
  • Short videos: anything of 3 minutes 30 seconds or less is left out
  • Quota: each tool call spends YouTube quota on one search and one lookup for each of up to three videos
  • Billing: OpenAI bills the agent’s calls, and one niche can take up to three tool calls
  • Your data: your messages and the video data go to OpenAI, and the searches go to Google
  • Credentials: the JSON holds none. The tool points at no workflow until you pick this one

README and files

README

Chat agent that reports what is trending on YouTube

An n8n chat for people who make videos. You name a niche, and an AI agent searches YouTube for videos from the last two
days, looks each one up for its numbers, and tells you what the new videos have in common. A search tool does the
lookup, and the tool is the lower half of the same workflow.

What is inside

  • workflow.json: the workflow as n8n exports it, sixteen nodes. Two are sticky notes, and one was added by Mindket.
    It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • The lower half of the file had no start, because it was meant to live in a workflow of its own. Mindket added a
    When Executed by Another Workflow node in front of get_videos1, set to accept all data, so the tool can call this
    same workflow. The note on that half was reworded to say so.
  • youtube_search pointed at a workflow in its author's n8n. It now points at none until you pick this one.
  • get_videos1 was linked to a YouTube credential in its author's n8n. The link is gone, so select your own.
  • Nothing else. Its Code nodes and expressions needed no repair.

Before you start

  • An n8n instance, on n8n Cloud or your own server.
  • An OpenAI API key.
  • A Google Cloud project with the YouTube Data API on. It gives you the OAuth2 credential for get_videos1 and the API
    key for find_video_data1.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Save it, so the workflow has an ID of its own.
  3. In youtube_search, pick this same workflow from the list. The tool runs the lower half of the file, from
    When Executed by Another Workflow.
  4. Add an OpenAI credential and select it in openai_llm.
  5. Add a YouTube OAuth2 credential and select it in get_videos1.
  6. Give find_video_data1 your YouTube Data API key. On a server of your own, set the environment variable
    GOOGLE_API_KEY for n8n. Where you cannot set one, replace {{ $env["GOOGLE_API_KEY"] }} in the key parameter with
    the key itself, and take it out again before you share the file.
  7. Save, open the chat on the canvas and name a niche.

How a request runs

  1. chat_message_received passes your message to AI Agent. window_buffer_memory keeps the last five exchanges.
  2. The agent checks that you gave a niche. If you did not, it asks and offers a few to pick from.
  3. It calls youtube_search up to three times, each time with a different search term. The tool receives one field,
    search_term, which arrives in the lower half as query.search_term.
  4. get_videos1 searches YouTube for that term: region US, videos from the last two days, three results, ordered by
    relevance, with moderate safe search.
  5. loop_over_items1 takes one result at a time. find_video_data1 fetches its details, with the parts
    contentDetails, snippet and statistics.
  6. if_longer_than_3_ passes a video on only when it runs longer than 210 seconds. group_data1 keeps its id, views,
    likes, comments, description, title, channel name, tags and channel id.
  7. save_data_to_memory1 strips links and emoji, and adds the video to one text, with a marker between videos.
  8. When the loop ends, retrieve_data_from_memory1 and response1 hand that text back to the agent, which writes its
    report.

Change the result

  • The report: the system message of AI Agent. As written, it asks for the overall picture, not a review of any one
    video, with the numbers and links.
  • Which videos count: get_videos1 holds the two-day window in publishedAfter, the region, the number of results
    (limit) and the order. The 210 seconds sit in if_longer_than_3_.
  • How much the chat remembers: Context Window Length in window_buffer_memory.
  • The model: openai_llm.

Good to know

  • openai_llm names no model in the file, so the node uses its own default, gpt-5-mini (n8n's repository, read on
    12 November 2026). OpenAI's deprecations page, read the same day, lists gpt-5-mini for shutdown on 11 December 2026,
    with gpt-5.6-terra as its replacement. Pick a model in the node before then.
  • save_data_to_memory1 builds its text in the workflow's saved data and never clears it. n8n keeps that data between
    runs only on a published workflow, so there a later search can return videos from an earlier one. While you test by
    hand, nothing stays between runs.
  • group_data1 joins each video's tags, so a video with no tags stops the run at that node.
  • A video of 3 minutes 30 seconds or less is left out, whatever its numbers.
  • Each tool call costs YouTube quota: one search, and one lookup for each of up to three videos.
  • OpenAI bills the agent's calls, and a niche can take up to three tool calls.
  • The chat trigger's public page is off until you turn it on in the trigger. Leave it off unless you want strangers to
    use your keys.
  • Your messages and the video data go to OpenAI. The searches go to Google.
Files
NOTICE.md  584 B
README.md  5 KB
workflow.json  15 KB

3 files, 21 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar in Research

See all in Research

EarthJev

dBenf · Kit

Answers typed questions about satellite image patches from all 12 Sentinel-2 bands, returning a probability for each option without writing text. A Qwen3.5-0.8…

New

getting-over-it-rl-jax

zimmerk4 · Kit

Plays the full game Getting Over It from the bottom to the end with a small trained policy network that learned inside a JAX physics simulator. For reinforceme…

New

ReFoCo

yuji-nozawa · Kit

Pretrained vision transformer checkpoints in three sizes from a research paper on training attention heads to focus on image regions. For researchers who extra…

New