Auto-sync: 2026-04-22 16:03

This commit is contained in:
2026-04-22 16:03:25 +08:00
parent b1e6af2458
commit 72f3673978
82 changed files with 3617 additions and 37 deletions

View File

@@ -0,0 +1,31 @@
---
title: "WEBHOOK_URL"
type: concept
tags: [n8n, environment-variable, webhook, telegram]
sources: [n8n-configure-telegram-trigger]
last_updated: 2026-04-22
---
## Definition
`WEBHOOK_URL` 是 n8n 工作流自动化平台的环境变量,用于指定 n8n 实例对外暴露的 HTTPS 基础地址。n8n 基于此地址自动生成各个 Trigger 节点的 Webhook URL。
## Why It Matters
Telegram Bot API 要求 Webhook 必须使用 HTTPS 协议。如果 `WEBHOOK_URL` 未设置或指向 HTTP/本地地址Telegram 会拒绝注册 Webhook 并报错:
```
bad webhook: An HTTPS URL must be provided for webhook
```
## Configuration in Docker
在 Docker Compose 或 Docker Desktop 中设置:
```yaml
environment:
- WEBHOOK_URL=https://n8n.cpolar.top
```
## Related Entities
- [[n8n]] — 读取 WEBHOOK_URL 环境变量的工作流平台
- [[Telegram]] — 要求 HTTPS Webhook 的消息平台
## Related Concepts
- [[Webhook]] — WEBHOOK_URL 生成的 HTTPS URL 用于 Webhook 注册
- [[Telegram Trigger]] — 依赖 WEBHOOK_URL 的 n8n 节点