Telegram trigger not connecting to local

I am using ngrok to point to my localhost:5678, new url is showing in webhook urls in node, but still my credentials not connecting and giving

timedout error.

2 Likes

Hi @Abdul_Rafey

The issue is that n8n still uses localhost internally even though ngrok is running. You need to explicitly tell n8n to use your ngrok URL by setting the WEBHOOK_URL environment variable when starting n8n.
Once restarted with that variable set, the Telegram credentials should connect successfully.

Hi @Abdul_Rafey I agree on what houda has said, but for now if you are using windows so before running n8n you have to type this command:
set WEBHOOK_URL=yourN8NngnixURL
And then run n8n in the same session and then n8n would be available on that URL, also consider using a VPS with persistent WEBHOOK_URL to never face this problem. Also if you want to set that WEBHOOK_URL permanently you can use setx instead of set

I did everything right, What i concluded that telegram doesnt work in my country, I used VPN in browser to access the telegram web, but n8n was on my machine and wasn’t using VPN, so it didn’t connect. Thank you for your suggestions.

I did everything right, What i concluded that telegram doesnt work in my country, I used VPN in browser to access the telegram web, but n8n was on my machine and wasn’t using VPN, so it didn’t connect. Thank you!

Yep — that conclusion makes sense. If Telegram is blocked in your country, the Telegram servers still need to reach both your n8n webhook URL and your n8n instance needs outbound access back to Telegram’s API from the same network path. A browser-only VPN won’t help because it only tunnels the browser, not the n8n process itself.

So the practical fixes are: either run n8n on a VPS/network where Telegram is reachable, or route the whole machine/container running n8n through a VPN/proxy instead of just the browser. If your webhook URL is already correct, regional network blocking is very likely the real root cause here.