# Viral videos into new content with Gemini and OpenAI: n8n workflow

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

Source: https://millionrounds.com/workflow/viral-videos-into-new-content-with-gemini-and-openai (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)

# Viral videos into new content with Gemini and OpenAI

Started by an incoming WhatsApp message, and works across Google Sheets, S3 and WhatsApp. It hands the judgement calls to Gemini and OpenAI. 50 steps, 3 branches, 3 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini, OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fviral-videos-into-new-content-with-gemini-and-openai)

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

**3** Branches: places the flow splits

**3** Loops or waits

**3** Services it connects to

## The flow

Starts it 2 Model 6 Logic 17 Service 25

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

- 1 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 2 **Structured Output Parser** Output Parser Structured *Model*
- 3 **WhatsApp Trigger** Whats App trigger *Starts it*
- 4 **Google Sheets Trigger1** Google Sheets trigger *Starts it*
- 5 **AI Agent** Agent *Model*
- 6 **If1** If *Logic*
- 7 **Switch** Switch *Logic*
- 8 **Prepare for Publish** Set *Logic*
- 9 **Get Post Content from instagram** Http Request *Service*
- 10 **Get Post Content from tiktok** Http Request *Service*
- 11 **Get Post Content from youtube** Http Request *Service*
- 12 **Upload to Blotato** Http Request *Service*
- 13 **Edit Fields** Set *Logic*
- 14 **Edit Fields1** Set *Logic*
- 15 **Edit Fields2** Set *Logic*
- 16 **[Instagram] Publish via Blotato** Http Request *Service*
- 17 **[Facebook] Publish via Blotato** Http Request *Service*
- 18 **[Linkedin] Publish via Blotato** Http Request *Service*
- 19 **[Tiktok] Publish via Blotato** Http Request *Service*
- 20 **[Youtube] Publish via Blotato** Http Request *Service*
- 21 **[Twitter] Publish via Blotato** Http Request *Service*
- 22 **Get Cover** Http Request *Service*
- 23 **Upload Cover** Http Request *Service*
- 24 **Get Text** Open Ai *Model*
- 25 **OpenAI1** Open Ai *Model*
- 26 **Switch1** Switch *Logic*
- 27 **Filter Instagram Audio** Code *Logic*
- 28 **Filter Audio1** Code *Logic*
- 29 **Filter Youtube Audio** Code *Logic*
- 30 **Download Audio1** Http Request *Service*
- 31 **AWS S31** Aws S3 *Service*
- 32 **AWS Transcribe2** Aws Transcribe *Service*
- 33 **Wait5** Wait *Logic*
- 34 **AWS Transcribe3** Aws Transcribe *Service*
- 35 **Template ID1** Code *Logic*
- 36 **Save Data1** Google Sheets *Service*
- 37 **Perplexity** Http Request *Service*
- 38 **Clean Up** Code *Logic*
- 39 **Generate Texts** Open Ai *Model*
- 40 **Split** Code *Logic*
- 41 **Video ID** Code *Logic*
- 42 **Save New Data** Google Sheets *Service*
- 43 **Get Speaker** Http Request *Service*
- 44 **Generate Video** Http Request *Service*
- 45 **Wait** Wait *Logic*
- 46 **Get Video** Http Request *Service*
- 47 **Add Text To Video** Http Request *Service*
- 48 **Wait1** Wait *Logic*
- 49 **Get Final Video** Http Request *Service*
- 50 **Save Final Data** Google Sheets *Service*

## How it's built

- **Starts on:** An incoming WhatsApp message
- **Steps:** 50, with 3 branches, 3 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets, S3, WhatsApp
- **Model:** Gemini, OpenAI

## Questions

What does it need to run?

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

What starts it?

It starts on an incoming WhatsApp message.

Does it use AI?

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

How long does it take to set up?

Take your time. At 50 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 50 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%2Fviral-videos-into-new-content-with-gemini-and-openai)
- **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)[S3](https://millionrounds.com/workflows?service=S3#library)[WhatsApp](https://millionrounds.com/workflows?service=WhatsApp#library)

## Workflows like it

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

- [**Automate social media content with Facebook and LinkedIn** 50 steps · calls a model · Gmail, Google Docs](https://millionrounds.com/workflow/automate-social-media-content-with-facebook-and-linkedin)
- [**WordPress auto-blogging pro - content automation machine** 50 steps · calls a model · Google Docs, Google Drive](https://millionrounds.com/workflow/wordpress-auto-blogging-pro-content-automation-machine)
- [**AI SEO Blog Automation for WordPress with OpenAI** 48 steps · calls a model · Google Sheets, WordPress](https://millionrounds.com/workflow/ai-seo-blog-automation-for-wordpress-with-openai)
- [**Create & approve POV videos with OpenAI and OpenRouter** 53 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/create-and-approve-pov-videos-with-openai-and-openrouter)
- [**AI Agents Generate Content & Automate Posting** 46 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/ai-agents-generate-content-and-automate-posting)
- [**AI Agents Generate Content & Automate Posting** 46 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/ai-agents-generate-content-and-automate-posting-2)
