# Publish brand-compliant Instagram posts with OpenAI: n8n workflow

> Started by a clock, and works across Google Sheets and S3. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/publish-brand-compliant-instagram-posts-with-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)

# Publish brand-compliant Instagram posts with OpenAI

Started by a clock, and works across Google Sheets and S3. It hands the judgement calls to OpenAI. 29 steps, 2 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%2Fpublish-brand-compliant-instagram-posts-with-openai)

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

**2** Branches: places the flow splits

**2** Loops or waits

**2** Services it connects to

## The flow

Starts it 2 Model 2 Logic 15 Service 10

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

- 1 **Daily Schedule Trigger** Schedule trigger *Starts it*
- 2 **Error Trigger** Error trigger *Starts it*
- 3 **Set Workflow Config** Set *Logic*
- 4 **Format Error Alert** Set *Logic*
- 5 **Fetch Logo Image** Http Request *Service*
- 6 **Resize Logo Image** Edit Image *Service*
- 7 **Fetch Brand Context** Http Request *Service*
- 8 **If Context Exists** If *Logic*
- 9 **Read Instagram Posts** Google Sheets *Service*
- 10 **Handle Missing Context** Set *Logic*
- 11 **If Posts Pending** If *Logic*
- 12 **Sort Posts by Time** Sort *Logic*
- 13 **Handle No Posts Found** Set *Logic*
- 14 **Loop Each Post** Split In Batches *Logic*
- 15 **Handle All Posts Processed** Set *Logic*
- 16 **Wait for Post Time** Wait *Logic*
- 17 **Generate Post Caption** Open Ai *Model*
- 18 **Format Caption Data** Code *Logic*
- 19 **Update Post Status in Sheets** Google Sheets *Service*
- 20 **Calculate Logo Position** Code *Logic*
- 21 **Generate AI Image** Open Ai *Model*
- 22 **Download AI Image** Http Request *Service*
- 23 **Map Post and Logo Data** Set *Logic*
- 24 **Add Logo to Post** Edit Image *Service*
- 25 **Upload Image to S3** Aws S3 *Service*
- 26 **Create Instagram Container** Facebook Graph Api *Service*
- 27 **Publish Post to Instagram** Facebook Graph Api *Service*
- 28 **Set Published Status** Set *Logic*
- 29 **Set Failed Status** Set *Logic*

## How it's built

- **Starts on:** A clock
- **Steps:** 29, with 2 branches, 2 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets, S3
- **Model:** OpenAI

## Questions

What does it need to run?

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

What starts it?

It starts on a clock.

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 29 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 29 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%2Fpublish-brand-compliant-instagram-posts-with-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)

## Workflows like it

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

- [**Analyze website content changes with Gemini** 29 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/analyze-website-content-changes-with-gemini)
- [**Automate ASMR glass fruit video creation & publishing with Veo** 29 steps · calls a model · Google Cloud Storage, Google Sheets](https://millionrounds.com/workflow/automate-asmr-glass-fruit-video-creation-and-publishing-with)
- [**Draft and track incident postmortems with OpenAI** 29 steps · calls a model · Discord, Gmail](https://millionrounds.com/workflow/draft-and-track-incident-postmortems-with-openai)
- [**GPT-4o, RunwayML, ElevenLabs for Social Media with Gemini** 29 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/gpt-4o-runwayml-elevenlabs-for-social-media-with-gemini)
- [**Generate and publish Instagram carousels with Gemini** 29 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/generate-and-publish-instagram-carousels-with-gemini)
- [**Generate procurement knowledge base articles with Groq** 29 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/generate-procurement-knowledge-base-articles-with-groq)
