Create and Manage Short URLs with Telegram Bot, MongoDB and Nginx Redirects — n8n 工作流
概览
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
工作流预览
⚡
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
触发器
工作流由 触发器 触发器启动。
- 2
处理
数据流经 22 个节点, connecting code, if, mongodb。
- 3
输出
工作流完成自动化并将结果发送到配置的目标。
节点详情 (22)
TE#1
Telegram
telegram
MO#2
MongoDB
mongoDb
CO#3
Code
code
如何导入此工作流
- 1点击右侧 下载 JSON 按钮保存工作流文件。
- 2打开你的 n8n 实例,依次点击 工作流 → 新建 → 从文件导入。
- 3选择下载的
create-and-manage-short-urls-with-telegram-bot-mongodb-and-nginx-redirects文件并点击导入。 - 4为每个服务节点配置 凭证(API 密钥、OAuth 等)。
- 5点击 测试工作流 验证一切正常,然后激活它。
或直接在 n8n → 从 JSON 导入 中粘贴:
{ "name": "Create and Manage Short URLs with Telegram Bot, MongoDB and Nginx Redirects", "nodes": [...], ...}
集成
codeifmongodbrespondtowebhooksettelegramtelegramtriggerwebhook
创建者
Rudi Afandi
@fanfanra
标签
codeifmongodbrespondtowebhooksettelegramtelegramtriggerwebhook