Automation library · Alerts and monitoring

Monitor & manage Docker containers with Telegram

Started by an incoming Telegram message, and works across Telegram. It hands the judgement calls to OpenAI. 24 steps, 3 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

24 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
0Loops or waits
1Service it connects to

The flow

Starts it 2Model 1Logic 7Service 14

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

  1. 1WebhookWebhookStarts it
  2. 2Telegram TriggerTelegram triggerStarts it
  3. 3Switch1SwitchLogic
  4. 4SwitchSwitchLogic
  5. 5Extract the Service NameCodeLogic
  6. 6OK MessageTelegramService
  7. 7ERROR MessageTelegramService
  8. 8MergeMergeLogic
  9. 9Merge1MergeLogic
  10. 10docker psSshService
  11. 11Update MsgTelegramService
  12. 12get logsSshService
  13. 13Restart MessageTelegramService
  14. 14Docker StatusTelegramService
  15. 15Update DockerSshService
  16. 16Status UpdateTelegramService
  17. 17restart containerSshService
  18. 18Code in Python (Beta)CodeLogic
  19. 19Message a modelOpen AiModel
  20. 20IfIfLogic
  21. 21Update Msg1TelegramService
  22. 22Log AnalysisTelegramService
  23. 23Success restartTelegramService
  24. 24Restart FailedTelegramService

How it's built

Starts on
An incoming Telegram message
Steps
24, with 3 branches
Size
Large: read it before trusting it with anything live
Connects to
Telegram
Model
OpenAI

Questions

What does it need to run?

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