---
metadata:
  - name: generator
    content: Diplodoc Platform v5.47.3
alternate:
  - https://yandex.com.tr/support/tracker/en/telegram.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/support/tracker/en/llms.txt

# Telegram

Let's assume that you need to automatically send notifications to the messenger whenever an issue changes its status. You may need it to see when your releases are ready for testing. To do this, [create a trigger](https://yandex.com.tr/support/tracker/en/user/create-trigger.md) that monitors the statuses of issues of the **Issue** type and sends an HTTP request when the issue status changes to **Need info**.

Telegram supports bots for sending automated messages to group chats and individual users. To send notifications from Tracker to Telegram, create a Telegram bot and configure a trigger for sending messages from the bot using HTTP requests.

## Step 1. Setting up a Telegram bot {#bot-setup}

1. Create a new Telegram bot:

    1. In Telegram, add the `@BotFather` bot to your contacts and send it the `/start` command.

    1. Then, send the `/newbot` command and follow the instructions: make up a display name for the bot (for example, `My Company`) and an account name (for example, `MyCompanyBot`). The account name must end with `bot`.

    In response, you will get a message that the bot has been created successfully. The message will include the token: a secret code that you will need to access your bot over the API. The token follows the `1234567890:ABC123-defHIJ...` format.

1. Add the bot to the Telegram group chat where you want to send notifications from Tracker.
    To receive notifications from Tracker in private messages, start a chat with the bot.

For more information on setting up a Telegram bot, see [https://core.telegram.org/bots](https://core.telegram.org/bots).

## Step 2. Getting the chat ID, chat topic ID, and account ID {#get-id}

To obtain chat IDs, chat topic IDs, and account IDs, use a specialized bot like `@myidbot`.

- To find out the ID of a group chat, add the bot to this chat and send it a message saying `/getgroupid`. Please keep in mind that group chat IDs start with a minus sign `-`.

- If a group chat in Telegram has topics, you can find the topic ID:
    1. Send a message to the topic.
    1. Right-click the message and select **Copy message link**.
    1. Paste the link into a text editor. The link will look like `https://t.me/c/1112223334/<message_thread_id>/3`, where `<message_thread_id>` is the chat topic ID.

- You can send private messages using your account ID. To do this, send the bot a private message saying `/getid`.

## Step 3. Configuring Tracker {#tracker-setup}

1. Log in to Tracker. You must have administrator privileges for the queue for which you want to configure the trigger.

1. <!-- source: en/_includes/transition-page.md -->
   In the left-hand panel, click <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" aria-hidden="true" class="yc-icon nv-composite-bar__menu-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6.702 3.013 8 3.5V2.386A2 2 0 0 1 10.702.513l3.351 1.257A3 3 0 0 1 16 4.579v4.035a2 2 0 0 1-2.702 1.873L12 10v1.114a2 2 0 0 1-2.702 1.873L8 12.5v1.114a2 2 0 0 1-2.702 1.873L1.947 14.23A3 3 0 0 1 0 11.421V7.386a2 2 0 0 1 2.702-1.873L4 6V4.886a2 2 0 0 1 2.702-1.873ZM5.5 6.563l.553.207A3 3 0 0 1 8 9.579v1.319l1.824.684a.5.5 0 0 0 .676-.468V7.079a1.5 1.5 0 0 0-.973-1.405L6.176 4.418a.5.5 0 0 0-.676.468v1.676Zm4.553-2.293L9.5 4.062V2.386a.5.5 0 0 1 .676-.468l3.35 1.256c.586.22.974.78.974 1.405v4.035a.5.5 0 0 1-.676.468L12 8.398V7.079a3 3 0 0 0-1.947-2.809ZM1.5 11.421V7.386a.5.5 0 0 1 .676-.468l3.35 1.257c.586.219.974.779.974 1.404v4.035a.5.5 0 0 1-.676.468l-3.35-1.257a1.5 1.5 0 0 1-.974-1.404Z" clip-rule="evenodd"/></svg> **Queues** and select a queue. {#queue}
   <!-- endsource: en/_includes/transition-page.md -->

1. <!-- source: en/_includes/transition-page.md -->
   In the top right corner of the queue page, click <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" aria-hidden="true" class="yc-icon nv-aside-header-footer-item__icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none"><path fill="currentColor" fill-opacity=".85" fill-rule="evenodd" d="M8.875 2.125h2.25a.5.5 0 0 1 .5.5v.23c0 1.925 2.083 3.128 3.75 2.165l.2-.115a.5.5 0 0 1 .682.183l1.125 1.949a.5.5 0 0 1-.183.683l-.2.115c-1.666.962-1.666 3.368 0 4.33l.2.115a.5.5 0 0 1 .183.683l-1.125 1.949a.5.5 0 0 1-.683.183l-.199-.115c-1.667-.963-3.75.24-3.75 2.165v.23a.5.5 0 0 1-.5.5h-2.25a.5.5 0 0 1-.5-.5v-.23c0-1.925-2.083-3.128-3.75-2.165l-.2.115a.5.5 0 0 1-.683-.183l-1.125-1.949a.5.5 0 0 1 .183-.683l.2-.115c1.667-.962 1.667-3.368 0-4.33l-.2-.115a.5.5 0 0 1-.183-.683l1.125-1.949a.5.5 0 0 1 .683-.183l.2.115c1.667.963 3.75-.24 3.75-2.165v-.23a.5.5 0 0 1 .5-.5zm-2 .5a2 2 0 0 1 2-2h2.25a2 2 0 0 1 2 2v.23a1 1 0 0 0 1.5.866l.2-.115a2 2 0 0 1 2.731.732l1.125 1.949a2 2 0 0 1-.732 2.732l-.2.115a1 1 0 0 0 0 1.732l.2.115a2 2 0 0 1 .732 2.732l-1.125 1.949a2 2 0 0 1-2.732.732l-.199-.115a1 1 0 0 0-1.5.866v.23a2 2 0 0 1-2 2h-2.25a2 2 0 0 1-2-2v-.23a1 1 0 0 0-1.5-.866l-.2.115a2 2 0 0 1-2.732-.732l-1.125-1.949a2 2 0 0 1 .732-2.732l.2-.115a1 1 0 0 0 0-1.732l-.2-.115a2 2 0 0 1-.732-2.732l1.125-1.949a2 2 0 0 1 2.732-.732l.2.115a1 1 0 0 0 1.5-.866v-.23zM12.25 10a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0zm1.5 0a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0z" clip-rule="evenodd"/></svg></svg> **Queue settings**. {#settings}
   <!-- endsource: en/_includes/transition-page.md -->

1. In the left panel, select **Automation**.

1. <!-- source: en/_includes/create-trigger.md -->
   In the top right corner, click **Create** → **Trigger**. {#create-trigger}
   <!-- endsource: en/_includes/create-trigger.md -->

1. Enter a trigger name, such as "Notifications in Telegram".

1. Configure trigger conditions so that the trigger is fired when the status of an issue of the **Issue** type changes to **Need info**:

    1. [Add the condition](https://yandex.com.tr/support/tracker/en/user/set-condition.md): **Type** → **is equal to** → **Issue**.

    1. Add the condition: **Status** → **became equal to** → **Need Info**.

    1. Be sure to put the **AND** logical operator to the left of the condition group for the trigger to fire if the conditions are met at the same time.

    ![](_assets/telegram-trigger-example.png){.border-yes}

1. Set the actions for the trigger:

    1. Click **Add new action** and choose **HTTP request**.

    1. Set up the request:
        - Method: **POST**.
        - Address: `https://api.telegram.org/bot<token>/sendMessage`
            Where `<token>` is the token you received when [setting up the Telegram bot](#bot-setup).
        - Authorization method: **NoAuth**.
        - Content type: **application/json**.
        - Request body:
            ```
            {
                "chat_id": "<chat_id>",
                "message_thread_id": "<chat_topic_id>",
                "parse_mode":"markdown",
                "text": "Information required for issue [{{issue.key}}: {{issue.summary}}](https://tracker.yandex.com/{{issue.key}})"
            }
            ```
            Parameter descriptions:
            * `chat_id`: The chat ID you received when [setting up the Telegram bot](#bot-setup).
            * `message_thread_id`: The [chat topic ID](#get-id).
            * `parse_mode`: Selected text parsing method. Specify `"parse_mode":"markdown"` to use Markdown.
            * `text`: Message text. To fill in the issue fields, click **{ }** to the right of the field and choose the field name.

            {% note info "" %}

            To use other methods and parameters in the HTTP request, see the Telegram bot API documentation at [https://core.telegram.org/bots/api](https://core.telegram.org/bots/api#available-methods).

            {% endnote %}

        - Leave the headers empty.

        ![](_assets/telegram-trigger-request-ext.png){.border-yes}

1. Save your trigger.

To test the trigger in action, change the status of an issue of the **Issue** type to **Need info**. The trigger will send this message to the Telegram chat: "Information required for issue [TEST-123: Configure triggers](https://tracker.yandex.com/TEST-1234)".

<!-- source: en/_assets/style/image.md -->

<!-- endsource: en/_assets/style/image.md -->
