Telegram trigger testmode doesnt work

Hello,

i cant find the right way. When i starting the testmode for my telegram trigger, n8n will go into it but i cant get out it anymore. and also no message will trigger anything.

during some check with the console with curl POST i got this back: “message”:“Provided secret is not valid”

is that something?
I used n8n before with https and ngrok an the telegram trigger worked. but i got different problems because auf the webhook and the changing ngrok site. so i bought a domain and now i am hosting that.
but now i dont get the telegram trigger working because the testmode is always “hanging”…

raspi pi 5 8gb
docker
nginx
n8n version 1.76.3

could you help me?
thanks!

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Did you try to create a new bot and use a new secret to see if its working properly? Also I know when I did my testing with n8n and telegram the URL for testing and production where x2 different URLs so I hope you are putting the correct url for telegram?

Yes. i tried it with the old telegram bot and i created a new one with a new token but that changed nothing. The problem is the same

Can you try and replicate your workflow onto n8n cloud and then have telegram trigger to the n8n cloud URL? With the same secret without ngrok in the way? I was able to get it working for me this way with minimal issues. I didn’t setup ngrok for my local n8n setup but I would be curious to know if your telegram trigger works if it goes straight to n8n cloud URL instead.

I dont use ngrok. I used it and it worked. But now i have may own domain with https over lets encrypt so i dot need ngrok anymore.
And its not working.

Im a bit confused and the https website is where you are hosting your n8n local instance or is your https website redirecting to the pi? Can you copy and paste your workflow?

I found it:
from the telegram site:

Stuck waiting for trigger event#

When testing the Telegram Trigger node with the Test step or or Test workflow buttons, the execution may appear stuck and unable to stop listening for events. If this occurs, you may need to exit the workflow and open it again to reset the canvas.

Stuck listening events often occur due to issues with your network configuration outside of n8n. Specifically, this behavior often occurs when you run n8n behind a reverse proxy without configuring websocket proxying.

To resolve this issue, check your reverse proxy configuration (Nginx, Caddy, Apache HTTP Server, Traefik, etc.) to enable websocket support.


so i asked chatGPT for help and after different suggestions i got a configuration for n8n that worked.
fill that in after location in the n8n conf

location / {
    proxy_pass http://localhost:5678;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_buffering off;
}

location ~* ^/ws/ {
    proxy_pass http://localhost:5678;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
}
2 Likes

Nice thanks for teaching me something new! Im assuming you had to put in information about your new ngrok ip?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.