# Analyze YouTube comments and generate video ideas with Gemini: n8n workflow

> Started by an incoming Telegram message, and works across Google Sheets and Telegram. It hands the judgement calls to Gemini.

Source: https://millionrounds.com/workflow/analyze-youtube-comments-and-generate-video-ideas-with-gemin (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Content](https://millionrounds.com/workflows?category=Content#library)

# Analyze YouTube comments and generate video ideas with Gemini

Started by an incoming Telegram message, and works across Google Sheets and Telegram. It hands the judgement calls to Gemini. 22 steps, 1 branch: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fanalyze-youtube-comments-and-generate-video-ideas-with-gemin)

**22 steps** Large: read it before trusting it with anything live

**1** Branch: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Model 5 Logic 11 Service 5

The steps in the order they run, from what starts it.

- 1 **Telegram Trigger** Telegram trigger *Starts it*
- 2 **Parse Structured Output** Output Parser Structured *Model*
- 3 **Gemini Chat Model Audience** Lm Chat Google Gemini *Model*
- 4 **Gemini Chat Model Ideas** Lm Chat Google Gemini *Model*
- 5 **Set Message Info** Set *Logic*
- 6 **Analyze Audience Agent** Chain Llm *Model*
- 7 **Generate Video Ideas Agent** Chain Llm *Model*
- 8 **If Is YouTube URL** If *Logic*
- 9 **Set Repeated Questions** Set *Logic*
- 10 **Build Final Report** Set *Logic*
- 11 **Set Video ID** Set *Logic*
- 12 **Send Invalid URL Reply** Telegram *Service*
- 13 **Set Content Opportunities** Set *Logic*
- 14 **Append Analysis to Sheets** Google Sheets *Service*
- 15 **Fetch YouTube Video Details** Http Request *Service*
- 16 **Send Results to Telegram** Telegram *Service*
- 17 **Fetch YouTube Comments** Http Request *Service*
- 18 **Split Comment Items** Split Out *Logic*
- 19 **Set Comment Fields** Set *Logic*
- 20 **Filter Empty Comments** Filter *Logic*
- 21 **Deduplicate by Comment Text** Remove Duplicates *Logic*
- 22 **Merge Comments** Aggregate *Logic*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 22, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets, Telegram
- **Model:** Gemini

## Questions

What does it need to run?

An n8n account, plus your own Google Sheets and Telegram accounts, and a key for Gemini. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

Yes. It calls Gemini. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 22 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 22 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fanalyze-youtube-comments-and-generate-video-ideas-with-gemin)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also content, with the same services where possible, closest in size first.

- [**Author and publish blog posts from Google Sheets with OpenAI** 22 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/author-and-publish-blog-posts-from-google-sheets-with-openai)
- [**Author and publish blog posts from Google Sheets with OpenAI** 22 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/author-and-publish-blog-posts-from-google-sheets-with-openai-2)
- [**Auto-Generate & Approve Social Media Posts from RSS Feeds** 22 steps · calls a model · LinkedIn, NocoDB](https://millionrounds.com/workflow/auto-generate-and-approve-social-media-posts-from-rss-feeds)
- [**Automate AI news videos to social media with OpenAI and HeyGen** 22 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/automate-ai-news-videos-to-social-media-with-openai-and-heyg)
- [**Automated AI product photography** 22 steps · calls a model · Telegram](https://millionrounds.com/workflow/automated-ai-product-photography)
- [**Chat with OpenAI and Telegram** 22 steps · calls a model · Telegram, in-memory vectors](https://millionrounds.com/workflow/chat-with-openai-and-telegram-2)
