# Integrations

[Open in personal cabinet](https://my.tuna.am/team_integrations)

Integrations let you send notifications about monitor and report events to various messengers and alerting systems.

![Integrations home page](/docs/img/team/integrations.png)

info

Available only with a [subscription](https://tuna.am/#pricing) on the **Legend** plan.

***

## Supported integrations

| Integration      | Description                                    |
| ---------------- | ---------------------------------------------- |
|  **Telegram**    | Notifications to a Telegram chat or group      |
|  **Slack**       | Notifications to a Slack channel via Webhook   |
|  **Discord**     | Notifications to a Discord channel via Webhook |
|  **VK Teams**    | Notifications to VK Teams (formerly MyTeam)    |
|  **Google Chat** | Notifications to Google Chat via Webhook       |
|  **Webhook**     | Arbitrary HTTP Webhook                         |

***

## Telegram

Send notifications to a Telegram chat or group.

### Setup

1. Open Telegram and find the bot **@TunaAmBot**
2. Start a dialog with the bot using `/start`
3. For a group chat — add the bot to the group and run `/start@TunaAmBot`
4. The bot will send a confirmation link
5. Open the link — the integration will be created automatically

### Parameters

| Parameter   | Description                               |
| ----------- | ----------------------------------------- |
| **Name**    | Integration name for identification       |
| **Chat ID** | Chat identifier (filled in automatically) |

***

## Slack

Send notifications to a Slack channel via Incoming Webhook.

### Setup

1. Go to your Slack workspace settings
2. Create a new Incoming Webhook: [Slack documentation](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks/)
3. Copy the webhook URL
4. In Tuna, create a Slack integration and paste the URL

### Parameters

| Parameter       | Description                         |
| --------------- | ----------------------------------- |
| **Name**        | Integration name for identification |
| **Channel**     | Channel name (e.g., #alerts)        |
| **Webhook URL** | Incoming Webhook URL                |

***

## Discord

Send notifications to a Discord channel via Webhook.

### Setup

1. Open the Discord channel settings
2. Go to **Integrations** → **Webhooks**
3. Create a new Webhook: [Discord documentation](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
4. Copy the webhook URL
5. In Tuna, create a Discord integration and paste the URL

### Parameters

| Parameter       | Description                         |
| --------------- | ----------------------------------- |
| **Name**        | Integration name for identification |
| **Webhook URL** | Discord Webhook URL                 |

***

## VK Teams

Send notifications to VK Teams (formerly MyTeam).

### Setup

1. Open VK Teams and find the bot **@metabot**
2. Create a new bot and obtain a token
3. Get the Chat ID of the chat where notifications will be sent
4. In Tuna, create a VK Teams integration

More info: [Getting a VK Teams token](https://teams.vk.com/profile/70001)

### Parameters

| Parameter   | Description                                                |
| ----------- | ---------------------------------------------------------- |
| **Name**    | Integration name for identification                        |
| **Chat ID** | Chat identifier                                            |
| **Token**   | Bot token (format: `000.0000000000.0000000000:0000000000`) |

***

## Google Chat

Send notifications to Google Chat via Webhook.

### Setup

1. Open the desired chat in Google Chat
2. Go to chat settings → **Webhooks**
3. Create a new Webhook: [Google documentation](https://developers.google.com/workspace/chat/quickstart/webhooks#create-webhook)
4. Copy the webhook URL
5. In Tuna, create a Google Chat integration and paste the URL

### Parameters

| Parameter       | Description                         |
| --------------- | ----------------------------------- |
| **Name**        | Integration name for identification |
| **Webhook URL** | Google Chat Webhook URL             |

***

## Webhook (Generic)

Send notifications to an arbitrary HTTP endpoint.

### Setup

1. Create an endpoint on your server to receive notifications
2. In Tuna, create a Webhook integration and specify the URL

### Parameters

| Parameter       | Description                         |
| --------------- | ----------------------------------- |
| **Name**        | Integration name for identification |
| **Webhook URL** | URL of your endpoint                |

### Request format

When an event occurs, Tuna sends a POST request with a JSON body:

```json
{
  "monitor_id": "2aB3cD4eF5gH6iJ7kL8m",
  "monitor_name": "My Service",
  "event_type": "fail",
  "message": "Monitor is down",
  "timestamp": "2024-01-15T10:30:00Z"
}

```

***

## Testing an integration

Before saving an integration, you can send a test message to verify the configuration is correct.

1. Fill in the integration parameters
2. Click the **Test** button
3. Check that the message arrives in the target service
4. Save the integration

***

## Use in contacts

Once an integration is created, it can be added to a [contact group](https://tuna.am/en/docs/team/contacts.md). When a monitor event occurs, notifications will be sent to all integrations added to the selected contact groups.
