N8n behind reverse proxy, Telegram trigger won't work

  • n8n version: latest docker pull image
  • Database (default: SQLite): Postgressql
  • n8n EXECUTIONS_PROCESS setting (default: own, main): no idea
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Docker on Synology NAS

Hi,

I have n9n running behind a reverse proxy (nginx) which works fine. Now when I want to setup Telegram, the node is not triggered (API was accepted/fine).

Can you advise what to do?
Thanks!
J


I might have extra info:
I might have extra relevant info:

Telegram trigger doesn’t work - Questions - n8n Community

Tried this for my setup https://api.telegram.org/bot 64<=BotApiToken=>/getWebhookInfo

Iow my cert might not

{ “ok”: true, “result”: { “url”: “”, “has_custom_certificate”: false, “pending_update_count”: 23 } }

ChatGPT said:

Yes, this is a response from Telegram’s getWebhookInfo API method, providing details about the webhook status for a Telegram bot. Here’s what each field means:

  • “ok”: true: Indicates that the API request was successful.
  • “result”: Contains the webhook details.

Within “result”:

  1. “url”: “”: The webhook URL is empty, meaning no webhook is currently set up for this bot.
  2. “has_custom_certificate”: false: Indicates that no custom certificate is being used (Telegram uses its default if this is false).
  3. “pending_update_count”: 23: Indicates there are 23 pending updates (messages or actions) waiting to be delivered to the bot, likely due to the absence of an active webhook.

To resolve this:

  • Set a valid webhook URL using Telegram’s setWebhook method to ensure updates are sent to your server.

4o

Update: I have setup new certificate and I am a step further but now there is a timeout:

{

"ok": true,

"result": {

    "url": "https://n8n.mydomain/webhook-test/mytone/webhook",

    "has_custom_certificate": false,

    "pending_update_count": 27,

    "last_error_date": 1731440053,

    "last_error_message": "Connection timed out",

    "max_connections": 40,

    "ip_address": "myip",

    "allowed_updates": [

        "message"

    ]

}

hello @JanHoedt

Connection timeout means that the telegram can’t access the bot URL. Check that your n8n is available from the internet.

Looks indeed what you say, but it is perfectly reachable from outside.

Here is my Docker config fyi

version: "3"

services:
  n8n:
    image: n8nio/n8n:latest
    restart: unless-stopped
    ports:
      - "2345:5678" # Maps port 5678 on the host to port 5678 in the container
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true # Enables basic authentication
      #- N8N_BASIC_AUTH_USER=<your_username> # Basic auth username
      #- N8N_BASIC_AUTH_PASSWORD=<your_password> # Basic auth password
      - N8N_HOST=<your_domain> # Your server's domain (replace with your custom domain)
      - N8N_PORT=5678 # Port for n8n
      - N8N_PROTOCOL=https # Protocol for n8n
      - WEBHOOK_URL=https://<your_domain>      
      - WEBHOOK_TUNNEL_URL=https://<your_domain> # Public URL for webhooks
      - GENERIC_TIMEZONE=Europe/Brussels # Set your timezone
      - N8N_SECURE_COOKIE=false # Enable/disable secure cookies as needed
       #- DOCKER_USER=$USER
      - PUID=1000
      - PGID=1000
    volumes:
      - /volume1/docker/n8n/<your_domain>/01/data:/home/node/.n8n:rw
      - /volume1/docker/n8n/<your_domain>/01/files:/files:rw

Are you sure in that? :sweat_smile:

Easy test:

copy the workflow, open the webhook node and copy the test url (or production url, but you need to enable the workflow for that). Then open the test url in another tab

1 Like

Yes, I am sure. Found root cause btw: I blocked addresses in my firewall other than specific countries (US, Singapore) but Telegram uses servers in Netherlands. Problem solved :slight_smile:

2 Likes

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