# Integrating Dynatrace notification with Telegram

**URL:** <https://community.dynatrace.com/t/integrating-dynatrace-notification-with-telegram/34758>\
**Category:** Automations\
**Tags:** integrations, webhook, problem-notification\
**Created:** [April 7, 2022, 1:40pm UTC](https://community.dynatrace.com/t/integrating-dynatrace-notification-with-telegram/34758 "2022-04-07T13:40:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erh\_inetum](https://avatars.discourse-cdn.com/v4/letter/e/48db29/32.png) [@erh\_inetum](https://community.dynatrace.com/u/erh_inetum)\
**Post date:** [April 7, 2022, 1:40pm UTC](https://community.dynatrace.com/t/integrating-dynatrace-notification-with-telegram/34758/1 "2022-04-07T13:40:13Z")

</div>

Hi,

We want to integrate Dynatrace notifications with Telegram.

I think this can be done via Webhook.

I’ve seen this link [Simple Ways to Setup Webhooks PostgreSQL Connection in Minutes](https://hevodata.com/learn/telegram-webhooks/#s7) in which it seems it’s possible to do that. But I have some questions about the implementation.

1.- On “Step1” on the link, it says that the first step in setting up Telegram Webhooks Integration is to obtain the Authorization Token.

So I guess we have to input that token clicking on “Creating basic authorization header”. Am I right?

 ![erh_inetum_1-1649337603089.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/bfd01de35bfdd297f39085bda9bb3cd688541d03.png)

2.- I have doubts about what is the Webhook URL that we have to configure.

Reading the link, on step 4 it seems we have to put the Telegram Bot API URL. And a Telegram Bot API must be created to send notifications. So I guess we have to put Telegram Bot API URL on Webhook URL field in Dynatrace. Is that the case?

3.- And about the payload,&nbsp; I think it is clear this part for me: we should send the fields we want to be notified via Telegram. So, I have no doubts about this.

Has someone implemented that? Could someone help me?

Regards,

Elena.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [April 11, 2022, 9:06am UTC](https://community.dynatrace.com/t/integrating-dynatrace-notification-with-telegram/34758/2 "2022-04-11T09:06:51Z")

</div>

Hello&nbsp;[@erh\_inetum](https://community.dynatrace.com/user/40722)&nbsp;,

actually ,you need to get familiar with how the bots work in telegram. This was always quite challenging to setup, but you can find guides for it. I don’t use telegram anymore, but this one below works for me.

URL is: [https://api.telegram.org/bot](https://api.telegram.org/bot)\*\*\<your\_bot\_token\>\*\*/sendMessage  
POST Method  
JSON notification payload:

```javascript
{ "chat_id": <your_chat_id>, "text": "<text_message>" }

```

Just replace:

- \<your\_bot\_token\> with bot token
- \<chat\_id\> with the chat ID where you are about to send message to
- \<message\> with the message text

Optionally you can send also markdown or HTML formatted messages, see [telegram API docs.](https://core.telegram.org/bots/api#sendmessage)

---

<div class="post-metadata">

**Author:** ![Kishan](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@Kishan](https://community.dynatrace.com/u/Kishan)\
**Post date:** [August 5, 2022, 10:21am UTC](https://community.dynatrace.com/t/integrating-dynatrace-notification-with-telegram/34758/3 "2022-08-05T10:21:37Z")

</div>

I keep receiving an error, shown below… I am not sure what the issue is here… i have followed the above correctly and confirmed i have the correct token… and suggestions on how to resolve this?

### "Custom Integration test failed

**Reason:** &nbsp;Could not connect to the specified URL"

Regards,

Kishan

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [August 8, 2022, 7:52pm UTC](https://community.dynatrace.com/t/integrating-dynatrace-notification-with-telegram/34758/4 "2022-08-08T19:52:19Z")

</div>

[@Kishan](https://community.dynatrace.com/user/42576)&nbsp;are you using Dyntrace Managed or SaaS? With Managed most likely your outbound connections from the cluster nodes to the URL are not allowed.

---

<div class="post-metadata">

**Author:** ![Kishan](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@Kishan](https://community.dynatrace.com/u/Kishan)\
**Post date:** [August 10, 2022, 6:51am UTC](https://community.dynatrace.com/t/integrating-dynatrace-notification-with-telegram/34758/5 "2022-08-10T06:51:20Z")

</div>

It is a managed solution thank you… I have confirmed the firewall wasnt opened when requested.
