# Automatic Instagram content creation with OpenAI and Telegram: n8n workflow

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

Source: https://millionrounds.com/workflow/automatic-instagram-content-creation-with-openai-and-telegra (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)

# Automatic Instagram content creation with OpenAI and Telegram

Started by an incoming Telegram message, and works across Airtable and Telegram. It hands the judgement calls to OpenAI. 42 steps, 2 branches, 1 loop 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%2Fautomatic-instagram-content-creation-with-openai-and-telegra)

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

**2** Branches: places the flow splits

**1** Loop or waits

**2** Services it connects to

## The flow

Starts it 5 Model 2 Logic 15 Service 20

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

- 1 **Webhook Serve (GET)** Webhook *Starts it*
- 2 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 3 **When clicking ‘Execute workflow’** Manual trigger *Starts it*
- 4 **Schedule Trigger** Schedule trigger *Starts it*
- 5 **Telegram Trigger** Telegram trigger *Starts it*
- 6 **Get a record** Airtable *Service*
- 7 **AI Agent** Agent *Model*
- 8 **Input** Code *Logic*
- 9 **Call 'Main Content‑Generation Workflow'** Execute Workflow *Logic*
- 10 **Process Callback** Code *Logic*
- 11 **Respond to Webhook** Respond To Webhook *Starts it*
- 12 **Parse String to Json** Code *Logic*
- 13 **Get Historic Posts** Http Request *Service*
- 14 **Switch** Switch *Logic*
- 15 **Take Caption** Set *Logic*
- 16 **Map Historic Data** Code *Logic*
- 17 **Edit Confirm message** Telegram *Service*
- 18 **Edit cancel message** Telegram *Service*
- 19 **Edit regenerate message** Telegram *Service*
- 20 **Take Image Prompt** Set *Logic*
- 21 **Define Category** Code *Logic*
- 22 **Get caption** Airtable *Service*
- 23 **Update record - cancel** Airtable *Service*
- 24 **Get a record1** Airtable *Service*
- 25 **OpenBanana Request** Http Request *Service*
- 26 **Prepare IG Post** Http Request *Service*
- 27 **Extract Input Data** Code *Logic*
- 28 **Base64 to jpg** Code *Logic*
- 29 **Wait for the preparation of the post** Wait *Logic*
- 30 **Update record - regenerate** Airtable *Service*
- 31 **Create new record** Airtable *Service*
- 32 **Get Status For Publish** Http Request *Service*
- 33 **Call 'Main Content‑Generation Workflow'1** Execute Workflow *Logic*
- 34 **Upload Image To Airtable** Http Request *Service*
- 35 **If** If *Logic*
- 36 **Send a photo message** Telegram *Service*
- 37 **Publish Post** Http Request *Service*
- 38 **Send Fail Message** Telegram *Service*
- 39 **Send a text message** Telegram *Service*
- 40 **Send Finish Message** Telegram *Service*
- 41 **Stop and Error** Stop And Error *Logic*
- 42 **Update record - confirm** Airtable *Service*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 42, with 2 branches, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Airtable, Telegram
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Airtable and Telegram 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 42 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 42 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%2Fautomatic-instagram-content-creation-with-openai-and-telegra)
- **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.

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

## Workflows like it

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

- [**Generate Blog Posts on Autopilot with Tavily and WordPress** 42 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/generate-blog-posts-on-autopilot-with-tavily-and-wordpress)
- [**Telegram bot for item multi select and saving to Postgres** 42 steps · Postgres, Telegram](https://millionrounds.com/workflow/telegram-bot-for-item-multi-select-and-saving-to-postgres)
- [**Telegram video merger bot with FTP and Postgres** 42 steps · FTP, Postgres](https://millionrounds.com/workflow/telegram-video-merger-bot-with-ftp-and-postgres)
- [**Create & share AI videos with Telegram and Gemini** 41 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/create-and-share-ai-videos-with-telegram-and-gemini)
- [**Create and publish UGC social videos from Telegram with OpenAI** 41 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/create-and-publish-ugc-social-videos-from-telegram-with-open)
- [**Generate high quality video commercials with DeepSeek** 43 steps · calls a model · Google Cloud Storage, Google Drive](https://millionrounds.com/workflow/generate-high-quality-video-commercials-with-deepseek)
