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

Wysoka złożoność Wyzwalacz22 węzłów🏷️ Miscellaneousautor: Rudi Afandi

Przegląd

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

Użyte węzły

TelegramMongoDBCode

Podgląd workflow

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

Jak to działa

  1. 1

    Wyzwalacz

    Workflow uruchamia się wyzwalaczem wyzwalacz.

  2. 2

    Przetwarzanie

    Dane przepływają przez 22 węzłów, connecting code, if, mongodb.

  3. 3

    Wyjście

    Workflow kończy automatyzację i dostarcza wynik do skonfigurowanego miejsca docelowego.

Szczegóły węzłów (22)

TE

Telegram

telegram

#1
MO

MongoDB

mongoDb

#2
CO

Code

code

#3

Jak zaimportować ten workflow

  1. 1Kliknij przycisk Pobierz JSON po prawej stronie, aby zapisać plik workflow.
  2. 2Otwórz swoją instancję n8n. Przejdź do Workflow → Nowy → Importuj z pliku.
  3. 3Wybierz pobrany plik create-and-manage-short-urls-with-telegram-bot-mongodb-and-nginx-redirects i kliknij Importuj.
  4. 4Skonfiguruj dane uwierzytelniające dla każdego węzła usługi (klucze API, OAuth itp.).
  5. 5Kliknij Testuj workflow, aby sprawdzić, czy wszystko działa, a następnie aktywuj go.

Lub wklej bezpośrednio w n8n → Importuj z JSON:

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

Integracje

codeifmongodbrespondtowebhooksettelegramtelegramtriggerwebhook

Pobierz ten workflow

Pobierz i zaimportuj jednym kliknięciem

Pobierz JSONZobacz na n8n.io
Węzły22
Złożonośćhigh
Wyzwalacztrigger
KategoriaMiscellaneous

Autor

Rudi Afandi

Rudi Afandi

@fanfanra

Tagi

codeifmongodbrespondtowebhooksettelegramtelegramtriggerwebhook

Nowy w n8n?

n8n to darmowe narzędzie open-source do automatyzacji workflow. Hostuj samodzielnie lub użyj wersji chmurowej.

Pobierz n8n za darmo →

Related Miscellaneous Workflows