Create and Manage Short URLs with Telegram Bot, MongoDB and Nginx Redirects — n8n ワークフロー

複雑度 トリガー22個のノード🏷️ Miscellaneous作成者:Rudi Afandi

概要

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

使用ノード

TelegramMongoDBCode

ワークフロープレビュー

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

仕組み

  1. 1

    トリガー

    このワークフローは トリガー トリガーで開始します。

  2. 2

    処理

    データは 22 個のノードを流れます, connecting code, if, mongodb。

  3. 3

    出力

    ワークフローは自動化を完了し、設定された宛先に結果を配信します。

ノード詳細 (22)

TE

Telegram

telegram

#1
MO

MongoDB

mongoDb

#2
CO

Code

code

#3

このワークフローのインポート方法

  1. 1右側の JSONをダウンロード ボタンをクリックしてワークフローファイルを保存します。
  2. 2n8nインスタンスを開き、ワークフロー → 新規 → ファイルからインポート に進みます。
  3. 3ダウンロードした create-and-manage-short-urls-with-telegram-bot-mongodb-and-nginx-redirects ファイルを選択し、インポートをクリックします。
  4. 4各サービスノードの 認証情報(APIキー、OAuthなど)を設定します。
  5. 5ワークフローをテスト をクリックして動作確認し、有効化します。

またはn8nの JSONからインポート に直接貼り付け:

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

インテグレーション

codeifmongodbrespondtowebhooksettelegramtelegramtriggerwebhook

このワークフローを取得

ワンクリックでダウンロード&インポート

JSONをダウンロードn8n.ioで見る
ノード22
複雑度high
トリガーtrigger
カテゴリMiscellaneous

作成者

Rudi Afandi

Rudi Afandi

@fanfanra

タグ

codeifmongodbrespondtowebhooksettelegramtelegramtriggerwebhook

n8n初めてですか?

n8nは無料のオープンソースワークフロー自動化ツールです。セルフホストまたはクラウド版をご利用いただけます。

n8nを無料で始める →

Related Miscellaneous Workflows