Files
nexus/wiki/concepts/WEBHOOK_URL.md
2026-04-16 13:01:42 +08:00

30 lines
824 B
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: "WEBHOOK_URL"
type: concept
tags: [n8n, environment-variable, webhook, self-hosted]
---
## 定义
`WEBHOOK_URL` 是 [[n8n]] 的环境变量,用于指定 n8n 实例的公网可访问 HTTPS 地址。
## 作用
- 通知 n8n 使用指定的 HTTPS URL 生成 Webhook URL
- Telegram / Discord / Slack 等平台要求 Webhook 必须为 HTTPS
- 自托管 n8n 通过内网穿透cpolar/FRP暴露时必须设置此变量
## 配置示例
```bash
# Docker Compose
environment:
- WEBHOOK_URL=https://n8n.ishenwei.online/
```
## 常见错误
- Telegram Trigger: `Bad Request: bad webhook: An HTTPS URL must be provided for webhook`
- 原因:`WEBHOOK_URL` 未设置或设置为 HTTP 地址
- 解决:设置为公网 HTTPS 地址
## 相关
- [[n8n-Telegram-Trigger-HTTPS配置修复]]
- [[Telegram Webhook]]