# Viral video generator: HeyGen to TikTok & Instagram auto-post: n8n workflow

> Started by another system calling it, and works across Google Sheets. It hands the judgement calls to OpenAI and Perplexity.

Source: https://millionrounds.com/workflow/viral-video-generator-heygen-to-tiktok-and-instagram-auto-po (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 video generator: HeyGen to TikTok & Instagram auto-post

Started by another system calling it, and works across Google Sheets. It hands the judgement calls to OpenAI and Perplexity. 21 steps: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI, Perplexity

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fviral-video-generator-heygen-to-tiktok-and-instagram-auto-po)

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

**0** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 2 Model 2 Logic 8 Service 9

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

- 1 **Schedule Daily Trigger** Schedule trigger *Starts it*
- 2 **HeyGen Webhook** Webhook *Starts it*
- 3 **Process HeyGen Callback** Code *Logic*
- 4 **Get Caption from Sheets** Google Sheets *Service*
- 5 **Combine Data** Code *Logic*
- 6 **Upload to Blotato** Http Request *Service*
- 7 **Extract Blotato URL** Code *Logic*
- 8 **Assign Social Media IDs** Set *Logic*
- 9 **INSTAGRAM** Http Request *Service*
- 10 **TIKTOK** Http Request *Service*
- 11 **Perplexity Search** Perplexity *Service*
- 12 **Write Video Script** Open Ai *Model*
- 13 **Get Screenshot** Http Request *Service*
- 14 **Write Video Caption** Open Ai *Model*
- 15 **Extract URL** Code *Logic*
- 16 **Prepare Avatar Data** Code *Logic*
- 17 **Create Avatar Video (Optimized)** Http Request *Service*
- 18 **Store to Google Sheets** Google Sheets *Service*
- 19 **Prepare Sheets Data** Code *Logic*
- 20 **Upload to tmpfiles** Http Request *Service*
- 21 **Extract tmpfiles** Code *Logic*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 21
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets
- **Model:** OpenAI, Perplexity

## Questions

What does it need to run?

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

What starts it?

It starts on another system calling it.

Does it use AI?

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

How long does it take to set up?

Take your time. At 21 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 21 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-video-generator-heygen-to-tiktok-and-instagram-auto-po)
- **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 agent for LinkedIn post with OpenAI and Google Sheets** 21 steps · calls a model · Google Sheets, LinkedIn](https://millionrounds.com/workflow/ai-agent-for-linkedin-post-with-openai-and-google-sheets)
- [**AI-powered content analysis with Decodo and OpenAI** 21 steps · calls a model · Gmail, Google Docs](https://millionrounds.com/workflow/ai-powered-content-analysis-with-decodo-and-openai)
- [**Analyze YouTube videos with OpenAI** 21 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/analyze-youtube-videos-with-openai)
- [**Automate AI video creation & multi-platform publishing** 21 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/automate-ai-video-creation-and-multi-platform-publishing)
- [**Classify and summarize WeChat articles with OpenAI and Notion** 21 steps · calls a model · Google Sheets, Notion](https://millionrounds.com/workflow/classify-and-summarize-wechat-articles-with-openai-and-notio)
- [**Create AI newsletters from YouTube with LangChain and Gemini** 21 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/create-ai-newsletters-from-youtube-with-langchain-and-gemini)
