Telegram trigger doesn't listen to any event

Describe the problem/error/question

Telegram trigger doesn’t listen to any event

Telegram trigger doesn’t listen to any event
I purchased a Contabo instance, and on that instance, I installed my entire ecosystem (n8n, Portainer, Redis, Traefik, Postgres, etc.).
I also purchased a domain and use it to log into my n8n account. To access my n8n account, I enter the address https://appn8n.mydomain.com/ in the browser.
The problem is that I’m trying to get my n8n Telegram trigger to listen to events from my bot created in Telegram.
Searching online, I found information that to solve this problem, I need an SSL/TSL certificate for HTTPS, since Telegram requires it.
How do I do this?

What is the error message (if any)?

It doesn´t appear any error o message

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
    1.82.3

  • Database (default: SQLite):

  • n8n EXECUTIONS_PROCESS setting (default: own, main):

  • Running n8n via (Docker, npm, n8n cloud, desktop app):
    Docker

  • Operating system:
    Ubuntu

1 Like

It seems you are using a online platform, my answer was about docker, so I removed the answer

I´m using docker

My suggestion would be to create a free account with ngrok service https://ngrok.com/

If have been using this commandline to get my n8n running on docker
There you can see the places where you would use the url provided by ngrok
In a commanline. you start the service with

( I edited is a bit to remove personal info)

docker run -itd \
 --name n8n \
 --restart always \
 -p 5678:5678 \
 -e GENERIC_TIMEZONE="Europe/Amsterdam" \
 -e TZ="Europe/Amsterdam" \
 -e WEBHOOK_TUNNEL_URL="<ngrok url>/" \
 -e WEBHOOK_URL="<ngrok url>" \
 -v n8n_data:/home/node/.n8n \
 -v /Users/......../n8n-data/cert:/home/node/.n8n/cert \
docker.n8n.io/n8nio/n8n:latest

You start your forwarding with:

ngrok http http://localhost:5678

There you find the forwarding url:

Use this url on the place holders in the commandline or yml file

You will have to let telgram know what webhook to use.
You will need your telegram token

https://api.telegram.org/bot[telegram token]/setWebhook/[ngrok forwarding address]

if this solves your problem then please hit the ‘solution’ button

But does this solution also work for production?

When activating the workflow for production, all should work as expected as long as you are indeed on a docker env on your local machine.

Your main problem here was/is that localhost is not https.

The key part of all this is

-e WEBHOOK_TUNNEL_URL="<ngrok url>/" \
-e WEBHOOK_URL="<ngrok url>" \

Where <ngrok url> is whatever you setup, for a localhost without the hassle of creating certificates or otherwise, using ngrok is by far the easiest and cost effective (free) solution. Paid options are available.

With a trigger node (telegraam/webhook etc…) you have the webhook urls, which will show you the ngrok url, with the test or production part appended.

So depending on your needs you should point any other software to either off them.

No need to change the docker commandline or yml when switching to production.

I already have a certificate.
To access my instance that has n8n installed, I need to use https://appn8n.mydomain.com and I can access it normally.
My main problem is that the Telegram trigger in n8n does not register any events. It does not listen to anything.
Not in Test mode or in Production mode.

Try this post by RichardC

1 Like

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