Create and Manage Short URLs with Telegram Bot, MongoDB and Nginx Redirects — n8n Workflow

Hoog complexiteit Trigger22 knooppunten🏷️ Miscellaneousdoor Rudi Afandi

Overzicht

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 Nginx.

How it works This flow provides a seamless URL shortening experience:

Create via Telegram: Send a long URL to your bot. It will ask if you want a custom short code.

Store in MongoDB: All long URLs and their corresponding short cod

Gebruikte knooppunten

TelegramMongoDBCode

Workflow-voorvertoning

Validating
Link not valid
Creating new link
Handle Redirects
Link exist, ask another one
Workflow 1: Create Short URL
I. Main Message & Reply Detection
- Telegram Trigger: Receives all Telegram messages.
- Is it Reply? (IF): Checks if message is a reply.
- True: Reply (-> Code)
- Fal
Workflow 2: URL Redirect Handler
- Webhook (Webhook Trigger): Receives short URL request
- Data2 (Set): Extracts short code from webhook URL.
Exist?2 (MongoDB - Find): Finds orig
T
Telegram Trigger
Insert shortCode
New link
Exist?
N
no exist?
E
exist?
W
Webhook
I
Is it reply?
R
Reply Data
askShortCode
Clean Data
askShortCode1
V
Valid URL
take URL
N
Not Valid URL?
Not Valid URL1
T
take short code
short code exist?
S
short code exist?1
I
If short code exist
4
404 page
S
shortCode Data
22 nodes20 edges

Hoe het werkt

  1. 1

    Trigger

    De workflow start met een trigger-trigger.

  2. 2

    Verwerking

    Gegevens stromen door 22 knooppunten, connecting code, if, mongodb.

  3. 3

    Uitvoer

    De workflow voltooit zijn automatisering en levert het resultaat aan de geconfigureerde bestemming.

Knooppuntdetails (22)

TE

Telegram

telegram

#1
MO

MongoDB

mongoDb

#2
CO

Code

code

#3

Hoe deze workflow te importeren

  1. 1Klik op de knop JSON downloaden rechts om het workflowbestand op te slaan.
  2. 2Open uw n8n-instantie. Ga naar Workflows → Nieuw → Importeren uit bestand.
  3. 3Selecteer het gedownloade bestand create-and-manage-short-urls-with-telegram-bot-mongodb-and-nginx-redirects en klik op Importeren.
  4. 4Stel inloggegevens in voor elk serviceknooppunt (API-sleutels, OAuth, enz.).
  5. 5Klik op Workflow testen om te controleren of alles werkt, activeer het vervolgens.

Of plak rechtstreeks in n8n → Importeren uit JSON:

{ "name": "Create and Manage Short URLs with Telegram Bot, MongoDB and Nginx Redirects", "nodes": [...], ...}

Integraties

codeifmongodbrespondtowebhooksettelegramtelegramtriggerwebhook

Haal deze workflow op

Download en importeer met één klik

JSON downloadenBekijken op n8n.io
Knooppunten22
Complexiteithigh
Triggertrigger
CategorieMiscellaneous

Gemaakt door

Rudi Afandi

Rudi Afandi

@fanfanra

Tags

codeifmongodbrespondtowebhooksettelegramtelegramtriggerwebhook

Nieuw bij n8n?

n8n is een gratis open-source workflow-automatiseringstool. Host het zelf of gebruik de cloudversie.

n8n gratis ophalen →

Related Miscellaneous Workflows