Welcome to mirror list, hosted at ThFree Co, Russian Federation.

telegram.md « integrations « project « user « doc - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a7a0a58b9222e8ff17fae3481372d26a5fbf7b62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
stage: Manage
group: Import and Integrate
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
---

# Telegram **(FREE ALL)**

> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122879) in GitLab 16.1.

You can configure GitLab to send notifications to a Telegram chat or channel.
To set up the Telegram integration, you must:

1. [Create a Telegram bot](#create-a-telegram-bot).
1. [Configure the Telegram bot](#configure-the-telegram-bot).
1. [Set up the Telegram integration in GitLab](#set-up-the-telegram-integration-in-gitlab).

## Create a Telegram bot

To create a bot in Telegram:

1. Start a new chat with `@BotFather`.
1. [Create a new bot](https://core.telegram.org/bots/features#creating-a-new-bot) as described in the Telegram documentation.

When you create a bot, `BotFather` provides you with an API token. Keep this token secure as you need it to authenticate the bot in Telegram.

## Configure the Telegram bot

To configure the bot in Telegram:

1. Add the bot as an administrator to a new or existing channel.
1. Assign the bot `Post Messages` rights to receive events.
1. Create an identifier for the channel.
   - For public channels, enter a public link and copy the channel identifier (for example, `https:/t.me/MY_IDENTIFIER`).
   - For private channels, use the [`getUpdates`](https://telegram-bot-sdk.readme.io/reference/getupdates) method with your API token and copy the channel identifier (for example, `-2241293890657`).

## Set up the Telegram integration in GitLab

After you invite the bot to a Telegram channel, you can configure GitLab to send notifications:

1. To enable the integration:
   - **For your group or project:**
     1. On the left sidebar, select **Search or go to** and find your project or group.
     1. Select **Settings > Integrations**.
   - **For your instance:**
     1. On the left sidebar, at the bottom, select **Admin Area**.
     1. Select **Settings > Integrations**.
1. Select **Telegram**.
1. Under **Enable integration**, select the **Active** checkbox.
1. In **New token**, [paste the token value from the Telegram bot](#create-a-telegram-bot).
1. In the **Trigger** section, select the checkboxes for the GitLab events you want to receive in Telegram.
1. In **Channel identifier**, [paste the Telegram channel identifier](#configure-the-telegram-bot).
1. Optional. Select **Test settings**.
1. Select **Save changes**.

The Telegram channel can now receive all selected GitLab events.