Files
nexus/wiki/concepts/Telegram-Trigger.md
2026-04-22 16:03:25 +08:00

26 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Telegram Trigger"
type: concept
tags: [n8n, telegram, trigger, automation]
sources: [n8n-configure-telegram-trigger]
last_updated: 2026-04-22
---
## Definition
Telegram Trigger 是 n8n 工作流自动化平台内置的触发器节点,用于接收 Telegram Bot 的消息事件并触发后续工作流。当用户在 Telegram 中向 Bot 发送消息时n8n 通过 Telegram Webhook 机制实时接收消息并执行工作流。
## Configuration Requirements
- n8n 实例必须可通过 **HTTPS** 公开访问Telegram Webhook 的硬性要求)
- Telegram Bot Token通过 BotFather 创建获取)
- `WEBHOOK_URL` 环境变量指向 HTTPS 基础地址
## Common Error
```
Telegram Trigger: Bad Request: bad webhook: An HTTPS URL must be provided for webhook
```
此错误表示 n8n 生成的 Webhook URL 不是 HTTPS 协议。解决方法:在 Docker / Docker Desktop / docker-compose 中设置 `WEBHOOK_URL=https://your-domain.com/`
## Related Concepts
- [[Webhook]] — Telegram Trigger 的底层通信机制
- [[WEBHOOK_URL]] — n8n 环境变量,控制 Telegram Trigger 的 Webhook URL 生成