Trigger Telegram Not Work in Test

Problem: Telegram Trigger in n8n is not receiving messages, neither in “Listen for test event” mode nor when the workflow is active.

Steps Taken:

Tested Telegram credentials: Connection was successful.
Set webhook using the Production URL: Used the Telegram Bot API (/setWebhook) and received a success response ({“ok”:true,”result”:true,”description”:”Webhook was set”}).
Activated the workflow: The workflow was turned “Active” in n8n.
Checked n8n logs: Saw “Received request for unknown webhook…” errors initially, then “The requested webhook ‘POST …/webhook’ is not registered.”
Simplified Docker Compose: Combined n8n_editor and n8n_webhook services into a single n8n service.
Tried “Listen for test event”:
Deleted the production webhook.
Set the test webhook using the Telegram Bot API and the “Test URL” from the Telegram Trigger node (/setWebhook). Received a success response.
Clicked “Listen for test event” in n8n.
Sent messages to the bot, but no data was received in the n8n editor.
Checked getWebhookInfo: The response indicated the webhook (production or test, depending on the last configuration) was set.
Tried a new, simple workflow: Created a new workflow with only the Telegram Trigger and attempted “Listen for test event” with the test webhook, but still no messages received.
Environment:

n8n version: 1.94.0
Installed via Docker Swarm using docker-compose.
Using Traefik as a reverse proxy.
Current Status: The Telegram Trigger receives data when the workflow is executed manually, but it does not trigger automatically with the active workflow or receive events in “Listen for test event” mode.

Experiencing the same problem. High level summary by AI of the issue:

This is a very specific and persistent issue, and it’s good that we’re getting consistent errors, as that means we’re narrowing it down.

The getWebhookInfo shows: "url": "https://n8n.jerryagenyi.xyz/webhook/webhook-test/*******466d515f92e0/webhook" "last_error_message": "Wrong response from the webhook: 404 Not Found"

And the n8n logs show: Received request for unknown webhook: The requested webhook "POST webhook-test/*******466d515f92e0/webhook" is not registered.

This combination means:

  1. Telegram is successfully told where to send messages. (Good, your WEBHOOK_URL env var and n8n’s call to setWebhook are working).
  2. Telegram is sending messages to that URL. (Good, your Cloudflare setup with n8n.jerryagenyi.xyz/webhook/* is allowing the traffic through).
  3. Nginx is receiving the request and forwarding it to the n8n container. (Good, as seen by the n8n logs actually receiving the request).
  4. n8n itself is saying it doesn’t recognize the specific webhook path. This is the “unknown webhook” message.

Why is n8n saying “unknown webhook” when the URL is clearly what it registered?

This is the central mystery, and it often comes down to:

  1. Nginx path rewriting/stripping: Nginx might be stripping part of the path before sending it to n8n, even with proxy_pass http://n8n_backend;.
  2. n8n’s internal handling of WEBHOOK_URL with a subpath: Sometimes, n8n expects the WEBHOOK_URL to be the exact public root URL, and then it internally appends its unique webhook ID. If WEBHOOK_URL includes a subpath (like /webhook/), it can cause a double-prefixing issue or a mismatch.