---
title: "Chat agent that researches YouTube channels and comments"
kind: "Kit"
category: "Marketing & SEO"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/9309c75d-daa6-4725-bad5-de8c6fdbbdbb"
updated: "2026-11-12"
---

# Chat agent that researches YouTube channels and comments

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

An n8n chat agent that answers questions about YouTube. It finds channels, lists videos, reads descriptions and comments, fetches transcripts and judges thumbnails, and it keeps each chat’s history in Postgres.

Chat agent that researches YouTube channels and comments is an n8n workflow in the Marketing \& SEO category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. 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 is a chat you can use to research YouTube. You type a request, and an AI agent chooses among seven tools. They look up a channel by its handle, list its videos, search, read a video’s description and comments, fetch a transcript and judge a thumbnail. Postgres keeps the chat history. 22 nodes run it, beside six sticky notes.

### Who it suits

Creators, marketers and analysts who want to learn from an audience and from rival channels without opening every video. Skip it if you only need the numbers of one channel, since a plain YouTube node gives them without a model.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Content | Creators | See what viewers ask for in the comments | A creator asks for the questions that repeat under a channel’s latest video. |
| Marketing | Social teams | Compare how rival channels package their videos | A team asks the agent to judge the thumbnails of a rival’s five newest videos. |
| Research | Analysts | Read a video without watching it | An analyst asks for the transcript of a talk and a summary of its main claims. |
| Agency | Video agencies | Plan the next video from what already works | An agency asks for a channel’s most viewed videos and what they have in common. |

You need a little n8n: import a file, add four credentials and save the workflow before you chat.

### Where to use it

Any n8n that can reach Google, Apify, OpenAI and a Postgres database will run it. The chat works inside n8n, and you can make it public for other people.

- n8n Cloud: import the file into a new workflow there, and point the memory at a Postgres database it can reach
- Your own n8n server: the same file and steps
- A chat page: switch on the trigger’s public chat to share the address, and know that anyone with it spends your keys

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. You need a Google API key, an Apify token, an OpenAI key and a Postgres database.

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 turned on, and an API key |
| Apify | An account and an API token, for transcripts |
| OpenAI | An API key |
| Postgres | A database for the chat memory |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Create a Query Auth credential with the query parameter `key` and your Google API key. Select it in the five YouTube request nodes: `Get Channel Details`, `Get Video Description`, `Get Comments`, `Run Query` and `Get Videos by Channel`.
3. Create a second Query Auth credential with the query parameter `token` and your Apify token. Select it in `Get Video Transcription`.
4. Add an OpenAI credential and select it in `OpenAI Chat Model` and `OpenAI`.
5. Add a Postgres credential and select it in `Postgres Chat Memory`.
6. Save the workflow, because the tools call the saved version of it by its ID.
7. Open the chat and send a request.

### How to use it

Ask in plain words. The agent decides which tools to call and in what order, and it asks you when a request looks like a mistake. Each chat keeps its own history, so you can follow up on an answer.

What to change for a different result

| To change | Where |
| --- | --- |
| How the agent behaves | The system message in \`AI Agent\` |
| The model | \`OpenAI Chat Model\`, and \`OpenAI\` for thumbnails |
| A new tool | A new \`Switch\` output with its request, and a tool node that sets its command |
| The transcript source | The Apify request in \`Get Video Transcription\` |

### Example

A creator types a request to find the channel with the handle example\_handle and say what viewers ask for in the comments on its latest video. The agent looks the channel up, lists its newest videos, reads the comments of the first one and replies with the questions that come up most.

The creator then asks for the transcript and for how the video answers them. The agent fetches the transcript and compares it with those questions, with the same chat history in mind.

### 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. An AI agent is a node that lets a chat model decide which tools to call. A tool here is a small workflow that the agent can run. Postgres is a database, and here it stores what was said in each chat.

**For experts.** The seven tool nodes are Call n8n Workflow Tool nodes that call this same workflow by `{{ $workflow.id }}`. Each sets a `command`, and `Execute Workflow Trigger` passes the call to a `Switch` that routes on that command. The agent runs on version 2.2 with a Postgres memory keyed by the chat’s `sessionId`.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`AI Agent\` | Plans and calls the tools | A tools agent, version 2.2 |
| \`Switch\` | Routes each tool call by its command | Seven outputs |
| \`Get Comments\` | Reads up to 100 comment threads | One page, with no further paging |
| \`Get Video Transcription\` | Runs an Apify actor and waits for it | Charged by Apify, and it can take a minute or more |

### Good to know

The file needed repairs to run on its own, and a few limits apply.

- Agent type: the agent was in OpenAI Functions mode, which n8n’s source marks as deprecated. Mindket’s copy is a plain AI Agent on version 2.2
- Tool links: the tools pointed at a workflow in the file author’s n8n. Mindket’s copy calls itself
- Models: the chat model named none, so n8n would use \`gpt-5-mini\`, which OpenAI’s page, read on 12 November 2026, shuts down on 11 December 2026. Mindket’s copy names \`gpt-5.6-terra\`. The thumbnail model \`gpt-4o\` shuts down on 14 January 2027, and Mindket’s copy uses \`gpt-6-luna\`
- Quota: a new YouTube Data API project allows 100 search calls a day by default, according to Google’s page read on 12 November 2026
- Transcripts: an Apify actor that someone else publishes does the work, so check its page before you rely on it
- Cost: transcripts are long, and a few of them add up in the model bill
- Your data: lookups go to Google, transcripts to Apify, messages and thumbnails to OpenAI and the history to your Postgres
- Credentials: the JSON holds none

## README

```markdown
# Chat agent that researches YouTube channels and comments

An n8n chat agent that answers questions about YouTube. You type a request in the chat, and the agent finds a channel by its handle, lists its videos, reads a video's description and comments, fetches a transcript and judges a thumbnail. It keeps the chat history in Postgres. Use it to see what an audience asks for, how top videos are packaged and what to make next.

## What is inside

- `workflow.json`: the workflow as n8n exports it, 28 nodes. 22 of them run and 6 are sticky notes. It holds no credential.
- `README.md`: these notes.

The file holds two scenarios. The first is the chat agent. The second is a set of tools in the same workflow, which the agent calls through seven sub-workflow tool nodes.

## What we changed from the original copy

- `AI Agent` was on version 1.6 in OpenAI Functions mode. n8n's source, read on 12 November 2026, marks that mode as deprecated and removed in n8n v3. It is an AI Agent on version 2.2 now, with the same prompt, memory and seven tools.
- The seven tool nodes pointed at a workflow in the file author's n8n by its ID. The tools now call this workflow itself, by `{{ $workflow.id }}`, because the second scenario is in the file.
- `OpenAI Chat Model` named no model, so n8n used the node's default, `gpt-5-mini`. OpenAI's deprecation page, read on 12 November 2026, shuts it down on 11 December 2026 and names `gpt-5.6-terra`. The node names `gpt-5.6-terra` now.
- The `OpenAI` node that judges thumbnails used `gpt-4o`. OpenAI's page shuts that model down on 14 January 2027 and names `gpt-6-luna`, which takes image input. The node uses it and allows 1500 tokens, up from the default of 300, because that model reasons before it answers.
- Three sticky notes carried a banner picture, a profile link, a community link, a referral link and a video thumbnail. Two are rewritten in Mindket's words, and the one with the video thumbnail is gone.
- The credential links and the saved test data in `Execute Workflow Trigger` are gone, and the file's name is ours.
- Nothing else. The system message, the tool descriptions, the router and the requests are as the file had them.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- A Google Cloud project with the YouTube Data API turned on, and an API key for it.
- An Apify account and its API token, for transcripts.
- An OpenAI API key.
- A Postgres database for the chat memory.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Create a Query Auth credential for YouTube. Name the query parameter `key` and give it your Google API key. Select it in `Get Channel Details`, `Get Video Description`, `Get Comments`, `Run Query` and `Get Videos by Channel`.
3. Create a second Query Auth credential for Apify. Name the query parameter `token` and give it your Apify token. Select it in `Get Video Transcription`.
4. Add an OpenAI credential and select it in `OpenAI Chat Model` and `OpenAI`.
5. Add a Postgres credential and select it in `Postgres Chat Memory`.
6. Save the workflow. The tools call the saved version of it by its ID, so save again after any change to the second scenario.
7. Open the chat and ask for something, such as "Find the channel with the handle example_handle and summarize the comments on its latest video."

## What happens in a run

1. `When chat message received` takes the message, and `AI Agent` reads it as `chatInput`. `Postgres Chat Memory` uses the chat's `sessionId`, so each chat keeps its own history.
2. The system message tells the agent to plan the tools in a sensible order and to ask when a request looks like a mistake. It also tells the agent to check a video's length when it needs to leave out shorts.
3. The agent calls a tool by name: `get_channel_details`, `get_video_description`, `get_list_of_videos`, `get_list_of_comments`, `search`, `analyze_thumbnail` or `video_transcription`. Each tool sends a `command` and its input to the second scenario.
4. `Execute Workflow Trigger` takes the call, and `Switch` sends it to the matching request. The channel, video, search and comments requests go to the YouTube Data API. `Edit Fields` turns the comments into lines of `author: comment`. The transcript request runs an Apify actor and waits for its result. `OpenAI` describes a thumbnail from its address and a prompt.
5. `Response` returns the result to the agent, which answers in the chat.

## What to change

- How the agent behaves: the system message in `AI Agent`.
- The model: `OpenAI Chat Model` for the agent and `OpenAI` for thumbnails.
- How many comments come back: `maxResults` in `Get Comments`, which is set to the most the API gives in one call.
- A new tool: add a `Switch` output with its own request, then a tool node that sets its `command`.
- The transcript source: the Apify request in `Get Video Transcription`.
- How much the chat remembers: `Postgres Chat Memory`.

## Good to know

- A new YouTube Data API project allows 100 search calls a day by default, and 10,000 units for all other calls combined, according to Google's quota page. `Run Query` and `Get Videos by Channel` are search calls. A long session can reach the limit.
- `Get Comments` asks for one page of up to 100 comment threads and does not go further.
- Transcripts come from an Apify actor that someone else publishes. It was public and updated in July 2026 when we read it. A run can take a minute or more, and Apify charges for it. Check the actor's page before you rely on it.
- A transcript is long. It goes into the agent's context and into the chat history, so a few of them add up in cost.
- Comments carry viewers' public display names, and the agent passes them to OpenAI with the rest.
- Data goes to Google for the lookups, Apify for transcripts, OpenAI for the model and the thumbnails, and your Postgres for the history.
- The chat is private to n8n unless you make it public in the trigger. A public chat lets anyone spend your keys.
```

## What is in it

3 files, 40 KB, downloaded as a zip.

```text
NOTICE.md  678 B
README.md  6 KB
workflow.json  34 KB
```

## Workflow check

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

- Steps: 13 steps, starting when another workflow calls it or on a chat message
- AI: 2 steps call an AI model: OpenAI and AI Agent
- Sign-ins: Signs in to: www.googleapis.com, Apify, OpenAI and Postgres
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads all 7 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/9309c75d-daa6-4725-bad5-de8c6fdbbdbb)
- [Its page on Mindket](https://mindket.com/p/9309c75d-daa6-4725-bad5-de8c6fdbbdbb)
