i use npx and ngrok for n8n and my url on n8n server host is https but when the telegram trigger dosnt connect with token to my bot
telegram trigger dosnt connect to my bot with token it show me this error
pls help me idk that what should i do !!
i use npx and ngrok for n8n and my url on n8n server host is https but when the telegram trigger dosnt connect with token to my bot
telegram trigger dosnt connect to my bot with token it show me this error
pls help me idk that what should i do !!
Are there any details under “More details”?
Hi! I faced the exact same issue and managed to solve it completely. The problem is usually related to network connectivity between your n8n instance and Telegram’s API servers. Here’s a step-by-step solution:
Step 1: Test Your Bot Token Before anything else, verify your bot token works:
Create a simple HTTP Request node in n8n
Method: GET
URL: https://api.telegram.org/bot[YOUR_BOT_TOKEN]/getMe
Execute it
If it fails like this with ENOTFOUND api.telegram.org
or connection timeout, the issue is network connectivity, not your bot token.
Many ISPs block Telegram services. Quick test:
Try opening https://web.telegram.org/ in your browser
If it doesn’t load, your ISP blocks Telegram
Step 1: Set Up VPN
Install a reliable VPN (I recommend ProtonVPN - it’s secure and has a free tier)
Connect to VPN and verify Telegram web works
Step 2: Configure n8n Container for VPN If you’re using Docker (which works similarly to npx setup):
Stop your current n8n instance
Then restart with proper DNS configuration:
docker run -d
–name n8n-telegram-fix
-p 5678:5678
–dns 8.8.8.8
–dns 1.1.1.1
–add-host=host.docker.internal:host-gateway
-v n8n_data:/home/node/.n8n
-e N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
-e N8N_EDITOR_BASE_URL=https://your-ngrok-url.ngrok-free.app
-e WEBHOOK_URL=https://your-ngrok-url.ngrok-free.app
–restart unless-stopped
docker.n8n.io/n8nio/n8n:latest
For npx users: The VPN should work automatically, but ensure you:
Start VPN first
Then start n8n: npx n8n
Then start ngrok
Step 3: Test Telegram API Connection After restarting n8n with VPN:
Go back to your HTTP Request node
Execute the getMe
API call again
You should now see your bot information
Step 4: Configure Telegram Trigger
Now your Telegram Trigger should work:
Add Telegram Trigger node
Create new credentials:
For VPN Users:
Keep VPN connected when working with Telegram workflows
VPN only needed for Telegram-related work, not general n8n usage
ngrok Configuration:
Make sure your ngrok URL matches your n8n environment variables
Use: ngrok http --url=your-url.ngrok-free.app 5678
After following these steps, your Telegram Trigger should show:
Connected status
No error messages
Ready to receive webhook calls
I figured out the issue and posted the solution here: [SOLVED] Telegram API timeouts - IPv4/IPv6 DNS resolution issue