Automation library · Content

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.

LargeCalls a model: OpenAI

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

The flow

Starts it 5Model 2Logic 15Service 20

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

  1. 1Webhook Serve (GET)WebhookStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3When clicking ‘Execute workflow’Manual triggerStarts it
  4. 4Schedule TriggerSchedule triggerStarts it
  5. 5Telegram TriggerTelegram triggerStarts it
  6. 6Get a recordAirtableService
  7. 7AI AgentAgentModel
  8. 8InputCodeLogic
  9. 9Call 'Main Content‑Generation Workflow'Execute WorkflowLogic
  10. 10Process CallbackCodeLogic
  11. 11Respond to WebhookRespond To WebhookStarts it
  12. 12Parse String to JsonCodeLogic
  13. 13Get Historic PostsHttp RequestService
  14. 14SwitchSwitchLogic
  15. 15Take CaptionSetLogic
  16. 16Map Historic DataCodeLogic
  17. 17Edit Confirm messageTelegramService
  18. 18Edit cancel messageTelegramService
  19. 19Edit regenerate messageTelegramService
  20. 20Take Image PromptSetLogic
  21. 21Define CategoryCodeLogic
  22. 22Get captionAirtableService
  23. 23Update record - cancelAirtableService
  24. 24Get a record1AirtableService
  25. 25OpenBanana RequestHttp RequestService
  26. 26Prepare IG PostHttp RequestService
  27. 27Extract Input DataCodeLogic
  28. 28Base64 to jpgCodeLogic
  29. 29Wait for the preparation of the postWaitLogic
  30. 30Update record - regenerateAirtableService
  31. 31Create new recordAirtableService
  32. 32Get Status For PublishHttp RequestService
  33. 33Call 'Main Content‑Generation Workflow'1Execute WorkflowLogic
  34. 34Upload Image To AirtableHttp RequestService
  35. 35IfIfLogic
  36. 36Send a photo messageTelegramService
  37. 37Publish PostHttp RequestService
  38. 38Send Fail MessageTelegramService
  39. 39Send a text messageTelegramService
  40. 40Send Finish MessageTelegramService
  41. 41Stop and ErrorStop And ErrorLogic
  42. 42Update record - confirmAirtableService

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.