Templates / Create and manage short URLs with Telegram bot, MongoDB and Nginx redirects

Create and manage short URLs with Telegram bot, MongoDB and Nginx redirects

Ready for 3.0

by Rudi Afandi ✓ · 320 views · created 2025-07-06 · Miscellaneous

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 22 nodes and runs on Telegram events (message) (plus 1 other trigger). Along the way it connects Telegram and MongoDB.

How it runs

Trigger: On Telegram events (message) (plus 1 other trigger).

  1. Is it reply? (If): checks a condition and branches into true / false
  2. take short code (Edit Fields (Set)): sets 1 field: shortCode
  3. Clean Data (Code): runs custom JavaScript code
  4. take URL (Code): runs custom JavaScript code
  5. short code exist? (MongoDB): uses MongoDB
  6. Reply Data (Edit Fields (Set)): sets 2 fields: longUrl, shortUrl
  7. Not Valid URL? (If): checks a condition and branches into true / false
  8. short code exist? (Edit Fields (Set)): sets 2 fields: exist, longUrl
  9. Exist? (MongoDB): uses MongoDB
  10. Not Valid URL (Telegram): uses Telegram

…plus 10 more steps. See the full node list below.

Services it uses

TelegramMongoDB

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (8)

From the author

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. This workflow allows you to create and manage custom short URLs directly via Telegram, with all data stored in MongoDB, and redirects handled efficiently via…

Excerpt from Rudi Afandi's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.