# How to set up sending notifications about Swarmica events to Telegram
# Instruction

:::info
To set up notifications in Telegram, you need the following:

*   A link to send messages through a chat bot of the form `https://api.telegram.org/bot<TOKEN>/sendMessage`
*   Chat ID (ChatID)
:::

1. Log in to Swarmica as Administrator.

2. Create a webhook in **Settings - Outgoing Webhooks**, enter **Name, URL, Method** - POST, and in the **Data** field, enter data of the form:

```json
{
  "text": "<message_text>",                     # notification text template
  "parse_mode": "markdown",                     # notification text formatting type
  "disable_web_page_preview": true|false,       # disabling the preview. You can disable (set true) to avoid cluttering the chat screen
  "disable_notification": true|false,           # disabling the notification on the end device (for example, a mobile phone). To disable, set true
  "reply_to_message_id": null|"<message_id>",   # the message will be sent as a response to another message. Set null explicitly to avoid accidental response.
  "chat_id": "<ChatID>"                         # chat ID
}
```

Click **Save**.

It should look something like this:

![](https://support.swarmica.com/attachments/X/y/XyaJMid-2kpm4tOP_a/изображение.png)

More details on forming the notification text can be found [here](https://support.swarmica.com/article/ru/1805-kak-sostavit-tekst-uvedomlenij-iz-swarmica-vo-vneshnie-sistemy.html).

3. On the next page, in the **Headers** field, add data of the form:

```txt
{
  "accept": "application/json",
  "User-Agent": "<Sender_identificator>",
  "content-type": "application/json"
}
```

Here, "User-Agent" is the message source identifier. For example, you can specify "Swarmica telegram bot".

Click **Save**.

It should look something like this:

![](https://support.swarmica.com/attachments/c/F/cFYiFb6_dvLq4cVp_a/изображение.png)

4. Create an action for the event in **Settings - Actions for Event - Create - Outgoing Webhook**.

![](https://support.swarmica.com/attachments/H/L/HLin8socu0oqg9En_a/action-on-trigger.png)

5. On the next page, enter the **Name**, select the created webhook as **Action**, choose the **Event Type**, set the necessary conditions, set the **Status to enabled**, and click **Save**. For example, for the event of creating a new request, the settings would look like this:

![](https://support.swarmica.com/attachments/P/k/PkvCNt43vVlj5W6v_a/action-on-trigger-settings.png)