# Telegram Trigger behind SWAG Proxy - Bad Request: bad webhook: HTTPS url must be provided for webhook

**URL:** <https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122>\
**Category:** Questions\
**Tags:** node\
**Created:** [August 6, 2021, 10:52am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122 "2021-08-06T10:52:48Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![ico](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ico](https://community.n8n.io/u/ico)\
**Post date:** [August 6, 2021, 10:52am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/1 "2021-08-06T10:52:48Z")

</div>

Hello  
I’m completely new here and looking forward to n8n. Unfortunately my first attempt failed. But I think I know why but still need your help.

I have running n8n as a docker container behind a SWAG proxy ([SWAG - LinuxServer.io](http://docs.linuxserver.io/general/swag)).  
This works. So I have the possibility to access with httpS and do not need a specification port.

```
server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name n8n_web.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;
    location / {

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app n8n_web;
        set $upstream_port 5678;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }

}

```

Now the first workflow I tried was this example - [Receive updates from Telegram and send an image | n8n workflow template](https://n8n.io/workflows/782)  
Telegram bot is created - credentials entered but I get this error message

Telegram Trigger: Bad Request: bad webhook: HTTPS url must be provided for webhook

I also found this I the community Issue-with-telegram-webhook/1374 (since I’m a new user I’m not allowed to have more than two links).

I assume that the internal container name is sent as webhook URL to Telegram but this is only available internally and not httpS.  
How can I adjust the workflow (or the server config) so that the external URL name is sent including https e.g. n8n\_web.mydomain.com.  
I don’t want to start n8n with the tunnel

Thank you very much  
Rob

---

<div class="post-metadata">

**Author:** ![ico](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ico](https://community.n8n.io/u/ico)\
**Post date:** [August 6, 2021, 10:59am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/2 "2021-08-06T10:59:55Z")

</div>

Look like the answer is in the Issue-with-telegram-webhook/1374 - i just have not been seeing it the first three times i read it - sorry - i will try an d report back - have to adjust my docker-compose …

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [August 6, 2021, 11:00am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/3 "2021-08-06T11:00:12Z")

</div>

Welcome to the community @ico !

Did you set `WEBHOOK_TUNNEL_URL` to the external domain n8n is reachable at?

> **[Configuration methods | n8n Docs](https://docs.n8n.io/hosting/configuration/configuration-methods/)**
>
> How to set environment variables for n8n.

Because else it will try to set up a webhook for `127.0.0.1:5678` on Telegram and that would not like it or work.

You can also check the URL that gets used by clicking on “Webhook URLs”:

 ![Screenshot from 2021-08-06 12-59-21](https://europe1.discourse-cdn.com/n8n/original/2X/e/ed6d85054935ef15c20f169d66176af2ed733b05.png)

---

<div class="post-metadata">

**Author:** ![ico](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ico](https://community.n8n.io/u/ico)\
**Post date:** [August 6, 2021, 11:00am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/4 "2021-08-06T11:00:50Z")

</div>

thanks - i was blind 🙂 …

---

<div class="post-metadata">

**Author:** ![ico](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ico](https://community.n8n.io/u/ico)\
**Post date:** [August 6, 2021, 11:01am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/5 "2021-08-06T11:01:58Z")

</div>

hi jan - super tool - I’m looking for something like this for years !!! - greetings from Munich

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [August 6, 2021, 11:04am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/6 "2021-08-06T11:04:01Z")

</div>

Great to hear that I could be useful and that you enjoy n8n!

Greetings back from Berlin! Have fun!

---

<div class="post-metadata">

**Author:** ![ico](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ico](https://community.n8n.io/u/ico)\
**Post date:** [August 6, 2021, 11:09am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/7 "2021-08-06T11:09:36Z")

</div>

now i get  
n8n\_web\_1 | timestamp: 1628248127948,  
n8n\_web\_1 | httpCode: ‘400’,  
n8n\_web\_1 | description: ‘Bad Request: invalid webhook URL specified’

do i have to change the webhookId: ‘806cc2c6-c687-4022-a82e-658e4a684e73’ from the workflow ?

---

<div class="post-metadata">

**Author:** ![ico](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ico](https://community.n8n.io/u/ico)\
**Post date:** [August 6, 2021, 11:19am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/8 "2021-08-06T11:19:18Z")

</div>

i found wher to check the URL - took me some time - got the error

- WEBHOOK\_TUNNEL\_URL=“https://n8n\_web.domain.abc/”  
had “” in the config so better …
- WEBHOOK\_TUNNEL\_URL=https://n8n\_web.domain.abc/

---

<div class="post-metadata">

**Author:** ![harshil1712](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/harshil1712/32/1374_2.png) [@harshil1712](https://community.n8n.io/u/harshil1712)\
**Post date:** [August 6, 2021, 11:52am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/9 "2021-08-06T11:52:35Z")

</div>

Hey @ico,

Did you solve the issue? Let us know if you still need help.

---

<div class="post-metadata">

**Author:** ![ico](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ico](https://community.n8n.io/u/ico)\
**Post date:** [August 6, 2021, 3:30pm UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/10 "2021-08-06T15:30:15Z")

</div>

the original question is answerd … but something with the telgram webhook ist still not working

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [August 7, 2021, 12:52pm UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/11 "2021-08-07T12:52:06Z")

</div>

Do you have a proper URL (instead of IP address) with a valid SSL certificate set on the default HTTPs port (443, so that no port has to be set in the URL)?

If Telegram says the URL is invalid there has to be a reason. There must be something out of the ordinary.

---

<div class="post-metadata">

**Author:** ![ico](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ico](https://community.n8n.io/u/ico)\
**Post date:** [August 9, 2021, 10:12am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/12 "2021-08-09T10:12:00Z")

</div>

HI jan - I will try a simpler example - at the moment I only play arround and only when I have time … will get back to you if this simpler example is NOT working … [Webhook Creating Endpoints Part 1 - YouTube](https://www.youtube.com/watch?v=GDZArgLKu7o) …  
but i don’t exactly when i have time to try

---

<div class="post-metadata">

**Author:** ![ico](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ico](https://community.n8n.io/u/ico)\
**Post date:** [August 9, 2021, 6:11pm UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/13 "2021-08-09T18:11:54Z")

</div>

Hello  
I have played arround a bit When I create a webhook myself everything goes well. However when I create myself a Telegram trigger (similar to the imported one) it looks a bit weird.  
Here is the web URL .

https://n8n\_web.domain.net/webhook-test/ab3baa90-17e9-4300-8f04-e39a9f020615/webhook  
https://n8n\_web.domain.net/webhook/ab3baa90-17e9-4300-8f04-e39a9f020615/webhook

Why I don’t have the possibility to change the path  
ab3baa90-17e9-4300-8f04-e39a9f020615  
to the webhook?  
why is ther a \*/webhook at the end?

thanks rob

@jan - it is a test system - could give you acces if you like - no important data on the server

---

<div class="post-metadata">

**Author:** ![harshil1712](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/harshil1712/32/1374_2.png) [@harshil1712](https://community.n8n.io/u/harshil1712)\
**Post date:** [August 10, 2021, 7:39am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/14 "2021-08-10T07:39:57Z")

</div>

Hey @ico,

The Webhook in the Telegram Trigger node is expected to have `/webhook` at the end. The webhook is generated by n8n and has to be unique. You can’t change the webhook path of any trigger nodes, except the Webhook node itself.

Did you try executing a Webhook node? Did it return the expected output?

---

<div class="post-metadata">

**Author:** ![ico](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@ico](https://community.n8n.io/u/ico)\
**Post date:** [August 11, 2021, 12:13pm UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/15 "2021-08-11T12:13:56Z")

</div>

thanks for the explanation - telegram trigger is nit working yet but i’m working on an other example to get familliar with n8n - thanks

---

<div class="post-metadata">

**Author:** ![Dany\_Malagon\_Pinol](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/dany_malagon_pinol/32/51852_2.png) [@Dany\_Malagon\_Pinol](https://community.n8n.io/u/Dany_Malagon_Pinol)\
**Post date:** [February 6, 2025, 8:52am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/16 "2025-02-06T08:52:08Z")

</div>

For those using Docker, you need to add the environment variable `WEBHOOK_URL` as follows:

`-e WEBHOOK_URL=https://your-remote-access-to-the-local-port, for example: https://abcdef12345.ngrok-free.app`

Or, when launching a container, go to Environment Variables, set the Variable to `WEBHOOK_URL`, and the Value to:

`https://your-remote-access-to-the-local-port, for example: https://abcdef12345.ngrok-free.app`

---

<div class="post-metadata">

**Author:** ![Nawaz](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/nawaz/32/63903_2.png) [@Nawaz](https://community.n8n.io/u/Nawaz)\
**Post date:** [July 5, 2025, 11:29am UTC](https://community.n8n.io/t/telegram-trigger-behind-swag-proxy-bad-request-bad-webhook-https-url-must-be-provided-for-webhook/7122/18 "2025-07-05T11:29:57Z")

</div>

You sir.. have solved a prolong problem. thanks
