Automation library · Content

Automated Instagram content creation from trending posts

Started by a clock, and works across Postgres and Telegram. It hands the judgement calls to OpenAI. 27 steps, 3 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

27 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
1Loop or waits
2Services it connects to

The flow

Starts it 1Model 2Logic 11Service 13

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

  1. 1Schedule Trigger1Schedule triggerStarts it
  2. 2Replicate paramsSetLogic
  3. 3Instagram paramsSetLogic
  4. 4Telegram ParamsSetLogic
  5. 5Rapid Api paramsSetLogic
  6. 6get top trends on instagram #isometricHttp RequestService
  7. 7get top trends on instagram #blender3dHttp RequestService
  8. 8filter the image contentCodeLogic
  9. 9filter the image content-2CodeLogic
  10. 10merge the array contentMergeLogic
  11. 11Loop Over ItemsSplit In BatchesLogic
  12. 12Check Data on Database Is ExistPostgresService
  13. 13If Data is ExistIfLogic
  14. 14send error message to telegramTelegramService
  15. 15insert data on dbPostgresService
  16. 16Analyze Image and give the contentOpen AiModel
  17. 17Analyze Content And Generate Instagram CaptionOpen AiModel
  18. 18Generate image on fluxHttp RequestService
  19. 19Prepare data on InstagramFacebook Graph ApiService
  20. 20Check Status Of Media Before UploadedFacebook Graph ApiService
  21. 21If media status is finishedIfLogic
  22. 22Publish Media on InstagramFacebook Graph ApiService
  23. 23TelegramTelegramService
  24. 24Check status of post Facebook Graph ApiService
  25. 25If media status is finished1IfLogic
  26. 26Telegram1TelegramService
  27. 27Telegram2TelegramService

How it's built

Starts on
A clock
Steps
27, with 3 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Postgres, Telegram
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Postgres 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 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 27 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 27 steps before you point it at anything that matters.