n8n - 💡(How to fix) Fix Telegram Trigger: webhook URL silently cleared ~15s after activation, no last_error_message

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

n8n-nodes-base.telegramTrigger (v1.2) registers Telegram's webhook URL correctly on workflow activation, but the URL is silently dropped from Telegram's side ~15 seconds later. No last_error_message is recorded in getWebhookInfo. No pending_update_count. No real Telegram delivery attempts in between. No probes from operator.

Result: bot is non-functional. Every callback_query / message goes into the void until manual setWebhook (without the secret_token, which then 403s).

Error Message

URL silently cleared between T+10 and T+15. No error. No real delivery attempt. No n8n container log activity in that window. No other workflow in our n8n instance contains setWebhook/deleteWebhook. No VPS cron / systemd timer touches Telegram. No multi-worker conflicts (single n8n container).

  • #20672 — "Telegram Trigger — \"Provided secret is not valid\" error (WebApp / webhook mode only)"

Root Cause

n8n-nodes-base.telegramTrigger (v1.2) registers Telegram's webhook URL correctly on workflow activation, but the URL is silently dropped from Telegram's side ~15 seconds later. No last_error_message is recorded in getWebhookInfo. No pending_update_count. No real Telegram delivery attempts in between. No probes from operator.

Result: bot is non-functional. Every callback_query / message goes into the void until manual setWebhook (without the secret_token, which then 403s).

Fix Action

Fix / Workaround

Workaround under investigation

Code Example

curl -X POST https://api.telegram.org/bot$TOKEN/setWebhook -d '{"url":"https://my-domain/webhook/SENTINEL-TEST-12345"}'

---

T+5s   url SET     | pending=0 | last_err=
   T+10s  url SET     | pending=0 | last_err=
   T+15s  url EMPTY   | pending=0 | last_err=
   T+20s  url EMPTY   | pending=0 | last_err=
   ...
   T+90s  url EMPTY   | pending=0 | last_err=
RAW_BUFFERClick to expand / collapse

Summary

n8n-nodes-base.telegramTrigger (v1.2) registers Telegram's webhook URL correctly on workflow activation, but the URL is silently dropped from Telegram's side ~15 seconds later. No last_error_message is recorded in getWebhookInfo. No pending_update_count. No real Telegram delivery attempts in between. No probes from operator.

Result: bot is non-functional. Every callback_query / message goes into the void until manual setWebhook (without the secret_token, which then 403s).

Environment

  • n8n version: latest stable (Docker image docker.n8n.io/n8nio/n8n, ~1 hour container uptime at time of capture)
  • typeVersion of telegramTrigger: 1.2
  • Self-hosted, single n8n worker, 3 task runners
  • Behind Traefik reverse proxy on HTTPS
  • Webhook URL pattern: https://<host>/webhook/<webhookId>/webhook
  • N8N_TELEGRAM_SECRET env var: NOT set (using n8n default secret derivation)

Reproducer (verified end-to-end)

  1. Workflow has telegramTrigger node (v1.2), credentials configured, active.
  2. Sentinel test — set Telegram URL to a known sentinel via setWebhook:
    curl -X POST https://api.telegram.org/bot$TOKEN/setWebhook -d '{"url":"https://my-domain/webhook/SENTINEL-TEST-12345"}'
  3. POST /api/v1/workflows/<id>/deactivate → Telegram URL becomes "" (n8n correctly calls deleteWebhook ✓)
  4. POST /api/v1/workflows/<id>/activate → Telegram URL becomes https://my-domain/webhook/<webhookId>/webhook (n8n correctly calls setWebhook ✓)
  5. Passively poll getWebhookInfo every 5s (no other API calls, no probes, no real Telegram traffic):
    T+5s   url SET     | pending=0 | last_err=
    T+10s  url SET     | pending=0 | last_err=
    T+15s  url EMPTY   | pending=0 | last_err=
    T+20s  url EMPTY   | pending=0 | last_err=
    ...
    T+90s  url EMPTY   | pending=0 | last_err=

URL silently cleared between T+10 and T+15. No error. No real delivery attempt. No n8n container log activity in that window. No other workflow in our n8n instance contains setWebhook/deleteWebhook. No VPS cron / systemd timer touches Telegram. No multi-worker conflicts (single n8n container).

What we ruled out

  • ❌ Layer 2 self-healing workflow that called external setWebhook (deactivated; URL still clears)
  • ❌ Operator probes (zero probes during the 90s window)
  • ❌ Real Telegram delivery attempts (pending=0 throughout, no last_error)
  • ❌ Multi-worker conflict (single n8n container)
  • ❌ Other workflows calling setWebhook (grep across all 200+ workflows in instance: only the disabled self-healing workflow had references)
  • ❌ VPS-side processes calling api.telegram.org (no crontabs, no systemd timers, no shell scripts found)

Hypothesis

Either (a) Telegram-side anti-abuse silently disables the webhook for some condition we can't observe, or (b) n8n's telegramTrigger calls setWebhook twice on activation (the second with empty URL) in some race condition.

Workaround under investigation

Replace telegramTrigger with generic n8n-nodes-base.webhook node + operator-managed setWebhook with our own secret_token. Larger refactor but bypasses the auto-managed Telegram registration entirely.

Related issues

  • #17610 — "Telegram Trigger Node not displaying the secret_token"
  • #20672 — "Telegram Trigger — \"Provided secret is not valid\" error (WebApp / webhook mode only)"
  • #12967 — "Telegram Trigger Webhook Generates Incorrect URL and Fails to Work"

This issue is distinct: the URL is registered correctly (including /webhook suffix and presumably the secret_token), but Telegram drops it ~15s later with no observable cause.

Files I can share if needed

  • Full getWebhookInfo JSON before/after the clear
  • Full passive monitor log (the 18-row T+5s..T+90s table)
  • Sentinel test transcript
  • Listing of all workflows in instance with telegramTrigger nodes (only 1)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING