Telegram trigger not activating

Hi, i’m having trouble getting my telegram trigger to work. After hours of figuring out how to self-host a tunnel and finally getting everything to work, the telegram trigger is using the correct https webhook! Woohoo! At least i thought..

The Telegram chat trigger only works when i manually click on it to retrieve inputs, it doesn’t trigger on activation. I’ve already read the September post about the telegram trigger and that it could be solved by changing a node and saving the workflow, unfortunately, that is not the case for me. Anyone have any tips?

I’m running N8N Version: 1.120.4, and i use botfather for my bot/trigger

Running on Docker, but now Using a cloudflare server to host my own domain specifically for this Telegram bot

Activated the workflow, but now i get this message;

Because of limitations in Telegram Trigger, n8n can’t listen for test executions at the same time as listening for production ones

Hey :waving_hand: @Niko1 !

Set as well in Docker compose file the variable eg:

WEBHOOK_URL=https://n8n.example.com

Cheers!

1 Like

Hi, i’m having trouble getting my telegram trigger to work. After hours of figuring out how to self-host a tunnel and finally getting everything to work, the telegram trigger is using the correct https webhook! Woohoo! At least i thought..

The Telegram chat trigger only works when i manually click on it to retrieve inputs, it doesn’t trigger on activation. I’ve already read the September post about the telegram trigger and that it could be solved by changing a node and saving the workflow, unfortunately, that is not the case for me. Anyone have any tips?

I’m running N8N Version: 1.120.4, and i use botfather for my bot/trigger

Running on Docker, but now Using a cloudflare server to host my own domain specifically for this Telegram bot

Activated the workflow, but now i get this message;

Because of limitations in Telegram Trigger, n8n can’t listen for test executions at the same time as listening for production ones

hi @Parintele_Damaskin , i run N8N with this special command ; docker run -d --name n8n-temp -p 5678:5678 -e WEBHOOK_URL=https://n8n.metrobrasiltestdomain.online -v C:\Docker\n8n-data-temp:/home/node/.n8n docker.n8n.io/n8nio/n8n

I’ve been trying for a while to find the docker compose file aswell but it is impossible for me, i found another one that doesn’t have the correct information about the n8n container :confused:

Try :

  1. docker stop n8n-temp
  2. docker rm n8n-temp
  3. docker run -d --name n8n-temp -p 5678:5678 -e WEBHOOK_URL=https://n8n.metrobrasiltestdomain.online -v C:\Docker\n8n-data-temp:/home/node/.n8n docker.n8n.io/n8nio/n8n

P.S in case you have multiple images , better to remove them , otherwise it gets messy . :slight_smile:

docker image prune

1 Like

Hey @Parintele_Damaskin i tried it and it’s still not working, i also checked the webhook with postman like how this person recommends (Solved: Telegram Trigger configuration ) and at first it says it’s deleted and then when i cop the url into body it says the webhook is working.

Basically the main issue is that Telegram won’t run in active workflow because it gives this error;

Deactivate workflow to execute

Because of limitations in Telegram Trigger, n8n can’t listen for test executions at the same time as listening for production ones

So I think the Telegram bot it pulling both the test and production URL? idk, i’ve deleted all bots, created fresh credentials, acivated and de activated the workflow, tried everything that I could find online about this node and it just doesn’t work!

It means that the bot is used somewhere else.

1 bot per Trigger /project/ Webhook is allowed.

So , you cannot use in test and production in the same time(since 2 different url webhooks).

Either click to start the workflow to listen on test, OR activate the workflow and will listen on production in background.

@Parintele_Damaskin hey, so does that mean when i create the bot i can only create it in active workflow and then just to not touch it after?

@Parintele_Damaskin I just duplicated the workflow, made a fresh new bot, and it still gives me the same error, any ideas on how to resolve this?

@Parintele_Damaskin i’m checking docker and seeing the following reverse proxy error, maybe this is the cause, however i’m not savvy enough to fix it, maybe you know where i can fix it?

ERR_ERL_UNEXPECTED_X_FORWARDED_FOR

Added in 6.8.0.
This error is logged when the X-Forwarded-For header is set (indicating use of a proxy), but the trust proxy setting is false (which is the default value).This usually indicates a configuration issue that will cause express-rate-limit to apply it’s limits global rather than on a per-user basis. Refer to the troubleshooting proxy issues page for a guide to set the trust proxy value correctly.If this error occurs only rarely, and you do not have a reverse proxy, it may indicate a malicious user probing for vulnerabilities.This check will be prevented if a custom keyGenerator is supplied.Set validate: {xForwardedForHeader: false} in the options to disable the check.

If you have multiple proxies, increase the value accordingly.

N8N_PROXY_HOPS=1

I am assuming that you are behind a proxy(Traefik or Nginx).

@Parintele_Damaskin i created a fresh n8n cloud account, fresh telegram bot just to test the triggers’ functionality, however, even in there i get the same;

Deactivate workflow to execute

Because of limitations in Telegram Trigger, n8n can’t listen for test executions at the same time as listening for production ones

so i don’t think it has anything to do with my proxy after all, this is really strange, am i missing something in the telegram setup itself perhaps?

For testing, deactivate the workflow(toggle in right corner top the button) and use “Execute workflow” / test mode.

For production, activate(toggle back same button) the workflow and test by sending real messages (no test mode).

That is a strange behavior.

Since you say you did fresh even with an cloud instance is weird.

Can you record the screen and test to see?

this is not an error. it is the way telegram works. you can only set a single webhook per bot. that totally make sense

@Niko1

Did you register you webhook in Telegram? :thinking:

hey, @ramIn1 thanks for helping , i just registered it and the webhook was set properly, i used the production url but it didn’t work, should i restart my n8n to confrim that it really doesn’t work?

Or, if you don’t register at the first time does that render the bot completely useless afterwards?

@Parintele_Damaskin see the picture above, everything is fresh, here is the workflow, fresh aswell;

i created a workflow and set the production url for one of my bots and it did work.

i add the Telegram Trigger and activate my workflow and set the production url for my bot webhook url using https://api.telegram.org/bot/setwebhook

2 Likes

ok. what happens if you send a message using telegram bot

because you activated your workflow, you are not able to call your workflow manually anymore. that is totally fine. but you can send a message in your bot and telegram will deliver it to n8n and execute your workflow

1 Like