# YouTube Videos to Viral X Threads by Keywords with Gemini: n8n workflow

> Started by someone submitting a form, and works across Google Sheets. It hands the judgement calls to Claude.

Source: https://millionrounds.com/workflow/youtube-videos-to-viral-x-threads-by-keywords-with-gemini (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)

# YouTube Videos to Viral X Threads by Keywords with Gemini

Started by someone submitting a form, and works across Google Sheets. It hands the judgement calls to Claude. 19 steps, 1 loop or waits: a working afternoon to understand properly.

Medium Calls a model: Claude

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fyoutube-videos-to-viral-x-threads-by-keywords-with-gemini)

**19 steps** Medium: a working afternoon

**0** Branches: places the flow splits

**1** Loop or waits

**1** Service it connects to

## The flow

Starts it 1 Model 2 Logic 10 Service 6

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

- 1 **Anthropic Chat Model** Lm Chat Anthropic *Model*
- 2 **On form submission** Form trigger *Starts it*
- 3 **Create Threads** Agent *Model*
- 4 **Key Word + Audience + Tone** Set *Logic*
- 5 **Structure Thread Data** Code *Logic*
- 6 **Keys: YT + Gemini** Set *Logic*
- 7 **Save to Google Sheets** Google Sheets *Service*
- 8 **Get videos** Http Request *Service*
- 9 **Get statistics** Http Request *Service*
- 10 **Split Batch** Code *Logic*
- 11 **Filter High-Performing Videos** Filter *Logic*
- 12 **Top 5 Videos** Limit *Logic*
- 13 **Add to Google Sheets** Google Sheets *Service*
- 14 **Wait 30s** Wait *Logic*
- 15 **Check if 'Yes'** Google Sheets *Service*
- 16 **Filter by 'Yes'** Filter *Logic*
- 17 **Extract Video Summary** Http Request *Service*
- 18 **Clean data** Code *Logic*
- 19 **Add context file** Code *Logic*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 19, 1 loop or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Google Sheets
- **Model:** Claude

## Questions

What does it need to run?

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

What starts it?

It starts on someone submitting a form.

Does it use AI?

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

How long does it take to set up?

Plan an afternoon. 19 steps is enough that you should read each one before running it.

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 19 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%2Fyoutube-videos-to-viral-x-threads-by-keywords-with-gemini)
- **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)

## Workflows like it

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

- [**AI News to LinkedIn: Daily Content Engine with Slack Approval** 19 steps · calls a model · Google Sheets, LinkedIn](https://millionrounds.com/workflow/ai-news-to-linkedin-daily-content-engine-with-slack-approval)
- [**AI Podcast Repurposing Engine with LinkedIn and Instagram** 19 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/ai-podcast-repurposing-engine-with-linkedin-and-instagram)
- [**Auto-generate Instagram, Facebook & LinkedIn posts** 19 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/auto-generate-instagram-facebook-and-linkedin-posts)
- [**Automate ASMR video creation and distribution with FalAI** 19 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/automate-asmr-video-creation-and-distribution-with-falai)
- [**Automate YouTube thumbnail creation & social publishing** 19 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/automate-youtube-thumbnail-creation-and-social-publishing)
- [**Benchmark LinkedIn post engagement with Bright Data and OpenAI** 19 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/benchmark-linkedin-post-engagement-with-bright-data-and-open)
