Automation library · Content

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.

LargeCalls a model: OpenAI

29 stepsLarge: read it before trusting it with anything live
2Branches: places the flow splits
2Loops or waits
2Services it connects to

The flow

Starts it 2Model 2Logic 15Service 10

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

  1. 1Daily Schedule TriggerSchedule triggerStarts it
  2. 2Error TriggerError triggerStarts it
  3. 3Set Workflow ConfigSetLogic
  4. 4Format Error AlertSetLogic
  5. 5Fetch Logo ImageHttp RequestService
  6. 6Resize Logo ImageEdit ImageService
  7. 7Fetch Brand ContextHttp RequestService
  8. 8If Context ExistsIfLogic
  9. 9Read Instagram PostsGoogle SheetsService
  10. 10Handle Missing ContextSetLogic
  11. 11If Posts PendingIfLogic
  12. 12Sort Posts by TimeSortLogic
  13. 13Handle No Posts FoundSetLogic
  14. 14Loop Each PostSplit In BatchesLogic
  15. 15Handle All Posts ProcessedSetLogic
  16. 16Wait for Post TimeWaitLogic
  17. 17Generate Post CaptionOpen AiModel
  18. 18Format Caption DataCodeLogic
  19. 19Update Post Status in SheetsGoogle SheetsService
  20. 20Calculate Logo PositionCodeLogic
  21. 21Generate AI ImageOpen AiModel
  22. 22Download AI ImageHttp RequestService
  23. 23Map Post and Logo DataSetLogic
  24. 24Add Logo to PostEdit ImageService
  25. 25Upload Image to S3Aws S3Service
  26. 26Create Instagram ContainerFacebook Graph ApiService
  27. 27Publish Post to InstagramFacebook Graph ApiService
  28. 28Set Published StatusSetLogic
  29. 29Set Failed StatusSetLogic

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.