# AI storyteller & video creator with OpenAI and Supabase: n8n workflow

> Started by an incoming Telegram message, and works across Supabase, Telegram and YouTube. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/ai-storyteller-and-video-creator-with-openai-and-supabase (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)

# AI storyteller & video creator with OpenAI and Supabase

Started by an incoming Telegram message, and works across Supabase, Telegram and YouTube. It hands the judgement calls to OpenAI. 39 steps, 4 branches, 2 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-storyteller-and-video-creator-with-openai-and-supabase)

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

**4** Branches: places the flow splits

**2** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 5 Logic 20 Service 13

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

- 1 **Get stories from Reddit** Http Request *Service*
- 2 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 3 **Telegram Trigger** Telegram trigger *Starts it*
- 4 **Split Out** Split Out *Logic*
- 5 **Create character** Information Extractor *Model*
- 6 **Write the story** Chain Llm *Model*
- 7 **Create title** Chain Llm *Model*
- 8 **Is it a story?** Text Classifier *Model*
- 9 **Configuration for story writing** Set *Logic*
- 10 **Filter** Filter *Logic*
- 11 **Cleanup text** Set *Logic*
- 12 **Cleanup title** Set *Logic*
- 13 **Save post** Supabase *Service*
- 14 **Skip post** Supabase *Service*
- 15 **Setup language** Code *Logic*
- 16 **Loop Over Items** Split In Batches *Logic*
- 17 **Is there a pre-selected voice to use?** If *Logic*
- 18 **Setup sex of the main character** Set *Logic*
- 19 **Set fields** Set *Logic*
- 20 **Keep the original voice value** Set *Logic*
- 21 **HTTP Request** Http Request *Service*
- 22 **Get the next story to process** Supabase *Service*
- 23 **Look up the id of the post** Supabase *Service*
- 24 **Set the final voice** Set *Logic*
- 25 **Set a random voice** Set *Logic*
- 26 **Is there a story to process?** If *Logic*
- 27 **Already exists?** If *Logic*
- 28 **Start creating the video** Http Request *Service*
- 29 **No unprocessed stories in the database** No Op *Logic*
- 30 **Wait** Wait *Logic*
- 31 **Check video status** Http Request *Service*
- 32 **Switch** Switch *Logic*
- 33 **Set status to failed** Supabase *Service*
- 34 **Setup the download url** Set *Logic*
- 35 **No Operation, do nothing** No Op *Logic*
- 36 **Set status to created** Supabase *Service*
- 37 **Download the video** Http Request *Service*
- 38 **Share on YouTube** You Tube *Service*
- 39 **Set status to uploaded** Supabase *Service*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 39, with 4 branches, 2 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Supabase, Telegram, YouTube
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Supabase, Telegram and YouTube accounts, and a key for OpenAI. 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 OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 39 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 39 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%2Fai-storyteller-and-video-creator-with-openai-and-supabase)
- **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.

[Supabase](https://millionrounds.com/workflows?service=Supabase#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)[YouTube](https://millionrounds.com/workflows?service=YouTube#library)

## Workflows like it

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

- [**Hacker News to video content with OpenAI and Dropbox** 39 steps · calls a model · Dropbox, Google Drive](https://millionrounds.com/workflow/hacker-news-to-video-content-with-openai-and-dropbox)
- [**Publish WordPress SEO blog drafts from trending news** 39 steps · calls a model · Telegram, WordPress](https://millionrounds.com/workflow/publish-wordpress-seo-blog-drafts-from-trending-news)
- [**AI-powered restaurant newsletter creator with Mailchimp** 38 steps · calls a model · Gmail, Mailchimp](https://millionrounds.com/workflow/ai-powered-restaurant-newsletter-creator-with-mailchimp)
- [**Publish blog posts from YouTube transcripts** 38 steps · calls a model · Google Docs, Google Sheets](https://millionrounds.com/workflow/publish-blog-posts-from-youtube-transcripts)
- [**Cross-platform content publisher: Telegram** 40 steps · LinkedIn, Telegram](https://millionrounds.com/workflow/cross-platform-content-publisher-telegram)
- [**Auto-create and publish AI social videos with Telegram** 37 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/auto-create-and-publish-ai-social-videos-with-telegram)
