Automation library · Content

Generate Facebook marketing content from images with Telegram

Started by an incoming Telegram message, and works across Telegram. It hands the judgement calls to OpenRouter. 20 steps, 4 branches: a working afternoon to understand properly.

MediumCalls a model: OpenRouter

20 stepsMedium: a working afternoon
4Branches: places the flow splits
0Loops or waits
1Service it connects to

The flow

Starts it 1Model 2Logic 9Service 8

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

  1. 1Trigger from TelegramTelegram triggerStarts it
  2. 2Language Model (OpenRouter)Lm Chat Open RouterModel
  3. 3Check if Message has PhotoIfLogic
  4. 4Generate Marketing ContentAgentModel
  5. 5Extract Telegram MetadataSetLogic
  6. 6Parse AI OutputSetLogic
  7. 7Get Telegram File InfoHttp RequestService
  8. 8Decide Input is New or OldSwitchLogic
  9. 9Build Telegram Image URLSetLogic
  10. 10Send Content for Approval (New)TelegramService
  11. 11Send Content for Approval (Old)TelegramService
  12. 12Download Telegram ImageHttp RequestService
  13. 13Approval DecisionIfLogic
  14. 14Publish Post to FacebookHttp RequestService
  15. 15Check If Text or PhotoSwitchLogic
  16. 16Notify Facebook SuccessTelegramService
  17. 17Asking User for ChangesTelegramService
  18. 18Prompt for User Input (Manual)TelegramService
  19. 19Restart Workflow AgainExecute WorkflowLogic
  20. 20Restart Workflow with User TextExecute WorkflowLogic

How it's built

Starts on
An incoming Telegram message
Steps
20, with 4 branches
Size
Medium: a working afternoon
Connects to
Telegram
Model
OpenRouter

Questions

What does it need to run?

An n8n account, plus your own Telegram account, and a key for OpenRouter. 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 OpenRouter. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 20 steps is enough that you should read each one before running it.

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 20 steps before you point it at anything that matters.