Skip to content

Telegram 触发节点常见问题(Telegram Trigger node common issues)#

这里是一些关于 Telegram Trigger 节点 的常见错误和问题,以及解决或排查它们的步骤。

🌐 Here are some common errors and issues with the Telegram Trigger node and steps to resolve or troubleshoot them.

等待触发事件卡住(Stuck waiting for trigger event)#

在使用 执行步骤执行工作流 按钮测试 Telegram 触发节点时,执行过程可能会出现卡住,无法停止监听事件的情况。如果发生这种情况,你可能需要退出工作流并重新打开它以重置画布。

🌐 When testing the Telegram Trigger node with the Execute step or Execute workflow buttons, the execution may appear stuck and unable to stop listening for events. If this occurs, you may need to exit the workflow and open it again to reset the canvas.

卡住的监听事件通常是由于 n8n 之外的网络配置问题造成的。具体来说,当你在反向代理后运行 n8n 而没有配置 WebSocket 代理时,经常会出现这种情况。

🌐 Stuck listening events often occur due to issues with your network configuration outside of n8n. Specifically, this behavior often occurs when you run n8n behind a reverse proxy without configuring websocket proxying.

要解决此问题,请检查你的反向代理配置(Nginx、Caddy、Apache HTTP 服务器、Traefik 等),启用 WebSocket 支持。

🌐 To resolve this issue, check your reverse proxy configuration (Nginx, Caddy, Apache HTTP Server, Traefik, etc.) to enable websocket support.

错误的请求:无效的 webhook:必须为 webhook 提供 HTTPS URL(Bad request: bad webhook: An HTTPS URL must be provided for webhook)#

当你在反向代理后运行 n8n,并且实例的 webhook URL 存在问题时,会发生此错误。

🌐 This error occurs when you run n8n behind a reverse proxy and there is a problem with your instance's webhook URL.

当在反向代理后运行 n8n 时,你必须配置 WEBHOOK_URL 环境变量为你的 n8n 实例运行的公共 URL。对于 Telegram,此 URL 必须使用 HTTPS。

🌐 When running n8n behind a reverse proxy, you must configure the WEBHOOK_URL environment variable with the public URL where your n8n instance is running. For Telegram, this URL must use HTTPS.

要解决此问题,请在反向代理中配置 TLS/SSL 终止。之后,更新你的 WEBHOOK_URL 环境变量以使用 HTTPS 地址。

🌐 To fix this issue, configure TLS/SSL termination in your reverse proxy. Afterward, update your WEBHOOK_URL environment variable to use the HTTPS address.

工作流仅在测试或生产环境中运行(Workflow only works in testing or production)#

Telegram 只允许你为每个应用注册一个 Webhook。这意味着每次你从使用测试 URL 切换到生产 URL(反之亦然)时,Telegram 都会覆盖已注册的 Webhook URL。

🌐 Telegram only allows you to register a single webhook per app. This means that every time you switch from using the testing URL to the production URL (and vice versa), Telegram overwrites the registered webhook URL.

如果你尝试测试一个在生产环境中也在运行的工作流程,可能会遇到麻烦。Telegram 机器人只会将事件发送到两个 webhook URL 中的一个,另一个将永远不会收到事件通知。

🌐 You may have trouble with this if you try to test a workflow that's also active in production. The Telegram bot will only send events to one of the two webhook URLs, so the other will never receive event notifications.

要解决此问题,你可以在测试时禁用工作流,或者为测试和生产环境创建单独的 Telegram 机器人。

🌐 To work around this, you can either disable your workflow when testing or create separate Telegram bots for testing and production.

要创建一个用于测试的独立 Telegram 机器人,请重复你创建第一个机器人的过程。有关更多信息,请参考 Telegram 机器人的文档Telegram 机器人 API 参考

🌐 To create a separate telegram bot for testing, repeat the process you completed to create your first bot. Reference Telegram's bot documentation and the Telegram bot API reference for more information.

要在测试时禁用工作流,请尝试以下操作:

🌐 To disable your workflow when testing, try the following:

停止生产流量

此解决方法会暂时禁用你的生产工作流程以进行测试。在其被停用期间,你的工作流程将不再接收生产流量。

  1. 前往你的工作流页面。
  2. 在顶部面板切换 激活 开关以暂时禁用工作流程。
  3. 使用测试 Webhook URL 测试你的工作流。
  4. 测试完成后,切换 Inactive 开关以再次启用工作流。生产用的 webhook URL 应该会恢复正常工作。