I’m currently trying to set up a Telegram Trigger node in n8n, but I keep getting this error:
Problem running workflow
Bad request - please check your parameters
Telegram Trigger: Bad Request: bad webhook: An HTTPS URL must be provided for webhook
Here’s my setup:
-
Trigger on: Message
-
No additional fields added
-
Hosted via Coolify with a Cloudflare Tunnel (no direct public IP, just a tunnel exposing n8n via HTTPS) (Check the docs setup)
Whenever I click Execute Node, it fails instantly with that webhook error.
Here’s a screenshot of my setup for context:
Does Telegram reject webhook URLs when they’re behind a Cloudflare Tunnel, or is there something else I need to configure in n8n or Cloudflare for the webhook to register properly?
If so, what’s the recommended setup for using the Telegram Trigger node when n8n is self-hosted in Coolify behind a tunnel?
Thanks in advance
Follow this steps, and it should be OK.
-Set up your Cloudflare Tunnel and get the public HTTPS URL.
-Set WEBHOOK_URL in n8n to this URL.
-(If behind a reverse proxy) Set N8N_PROXY_HOPS=1.
-Restart your n8n instance after changing environment variables.
then N8N_PROXY_HOPS is already set to 1
WEBHOOK_URL is already set manually and now https.
i cant change the SERVICE_URL_N8N to https since it will cause multiple redirect since https is handled by cloudflare.
after that i have restarted both server coolify proxy and n8n instance
Error still showing same message
Additional thing i guess:
so i change the webhook to https in env, and restarted the n8n instance..
i deleted the old trigger and added a new one but still the webhook url didnt change the http to https
check what webhook URL is currently registered with Telegram here by replacing placeholder for bot token:
https://api.telegram.org/botYOUR_TOKEN/getWebhookInfo
If it’s not your public HTTPS tunnel URL, n8n is not registering it correctly.
Or
Cloudflare’s proxy/firewall settings can block Telegram’s webhook requests. If you are using Cloudflare’s proxy (orange cloud), try switching to DNS-only (grey cloud) or review your Cloudflare firewall rules to ensure Telegram’s requests are not being blocked …
Respond from: https://api.telegram.org/botYOUR_TOKEN/getWebhookInfo
{"ok":false,"error_code":404,"description":"Not Found"}
Cloudflare’s proxy/firewall settings can block Telegram’s webhook requests. If you are using
Cloudflare’s proxy (orange cloud), try switching to DNS-only (grey cloud) or review your Cloudflare
firewall rules to ensure Telegram’s requests are not being blocked
I have generated this token from what i’ve followed on youtube, I chat and create a bot got the token from BotFather
what i did now is i backup everything and recreate an instance of n8n entirely before deploying what i did is updatte the compose file and env with the https for the webhook
setup n8n and import everything and walaa!!! it works.. lol
i will mark it as the solution.