Automation library · Alerts and monitoring

Create and manage short URLs with Telegram and MongoDB

Started by an incoming Telegram message, and works across MongoDB and Telegram. 22 steps, 4 branches: large, and worth reading before you trust it with anything live.

Large

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

The flow

Starts it 4Logic 11Service 7

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

  1. 1Telegram TriggerTelegram triggerStarts it
  2. 2WebhookWebhookStarts it
  3. 3Is it reply?IfLogic
  4. 4take short codeSetLogic
  5. 5Clean DataCodeLogic
  6. 6take URLCodeLogic
  7. 7short code exist?Mongo DbService
  8. 8Reply DataSetLogic
  9. 9Not Valid URL?IfLogic
  10. 10short code exist?1SetLogic
  11. 11Exist?Mongo DbService
  12. 12Not Valid URL1TelegramService
  13. 13askShortCodeTelegramService
  14. 14If short code existIfLogic
  15. 15exist?SetLogic
  16. 16Valid URLRespond To WebhookStarts it
  17. 17404 pageRespond To WebhookStarts it
  18. 18no exist?IfLogic
  19. 19shortCode DataSetLogic
  20. 20askShortCode1TelegramService
  21. 21Insert shortCodeMongo DbService
  22. 22New linkTelegramService

How it's built

Starts on
An incoming Telegram message
Steps
22, with 4 branches
Size
Large: read it before trusting it with anything live
Connects to
MongoDB, Telegram
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own MongoDB and Telegram accounts. 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?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 22 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 22 steps before you point it at anything that matters.