# How to set up sending notifications about Swarmica events to Mattermost
# Instructions

:::info
To set up notifications in Mattermost, you need to create a webhook for the corresponding channel of this kind: `https://your.mattermost.com/hooks/xxxxxxxxxxxxxxxxxxxx`
:::

1. Log in to Swarmica as Administrator.

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

```json
{
 "text": "<text>",                 # message text
 "channel": "<hannel_name>",      # channel name
 "username": "<username>",         # on whose behalf the message was sent (existence of a real user with such a name is not necessary)
 "icon_url": "<icon_url>",         # (optional) URL of the icon that will be displayed before the username
 "props": { "card": "<data>" }     # (optional) adds information after the username, clicking on which opens a card with additional information
}
```

More detailed information about the data format can be found in the [official Mattermost documentation](https://docs.mattermost.com/integrations-guide/incoming-webhooks.html)

More information about 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).

![](https://support.swarmica.com/attachments/D/M/DMkWhFJa0whUOqMO_a/webhook-mm.png)

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

![](https://support.swarmica.com/attachments/o/4/o4X2JwNmDby9FxRC_a/action-on-trigger.png)

4. On the page that opens, enter **Name**, select the created webhook as **Action**, select **Event Type**, set the necessary conditions, set **Status - enabled** and click **Save**. 

![](https://support.swarmica.com/attachments/i/I/iILYZEmaLyFSapL-_a/action-on-trigger-mm-settings.png)