# Telegram Alerts

There are three ways to receive alerts via Telegram:

1. [**Use the Blokiments Alerts Bot**](#use-the-blokiments-alerts-bot) *(recommended and easiest setup)* – Perfect for individual users who want quick and simple notifications.
2. [**Use the Blokiments Alerts Bot in a group chat**](#use-the-blokiments-alerts-bot-in-a-group-chat)—this is ideal for communities or teams where multiple users need to stay informed.
3. [**Use a personal bot**](#use-a-personal-bot) – Best for advanced or specific use cases where the default Blokiments Alerts Bot isn’t suitable.

## Use the Blokiments Alerts Bot

Follow these steps:

1. **Start a conversation** with [**@blokiments\_notification\_bot**](https://t.me/blokiments_notification_bot) by sending any message—just say `/start` or anything you like.

{% hint style="danger" %}
**Important:** Telegram requires you to send a message to activate the bot. If you skip this step, the bot won’t work!
{% endhint %}

2. **Retrieve Your Chat ID**:
   1. You can get the Chat ID by contacting [@get\_myidbot](https://t.me/get_myidbot). Write `/start` , and the bot will send you the chat ID. Your user ID is the same as your chat ID.
   2. Copy the `Current chat ID` number.

<figure><img src="/files/60BolSptS9fpZQInIvxp" alt=""><figcaption></figcaption></figure>

3. Now, enter the details in the Blokiments web app:
   1. **Name**: Give your destination a name (e.g., *Blokiments Bot Personal*)
   2. **Type**: Select **TELEGRAM**
   3. **Chat ID**: Paste the Chat ID you received in the previous step
   4. **Select Bot**: Choose **Blokiments Bot** (this is the default option)

<figure><img src="/files/o2opQ7d5RsNOgoQnYA2A" alt=""><figcaption></figcaption></figure>

4. Then click **Send Test** to make sure everything is working correctly. You should receive a confirmation message in your Telegram chat.

<figure><img src="/files/ODovqle9FLUcL2BNZC8W" alt=""><figcaption><p>Example of the test message in the chat.</p></figcaption></figure>

{% hint style="warning" %}
If you don't receive a message, something was wrong in the previous steps. Check the steps again or write to us in the [community group](https://t.me/blokiments_public). We're here to assist you!
{% endhint %}

5. Click `Create` if the test was successful.

{% hint style="info" %}
A specific user can create only one alert destination using a Blokiments Bot for a personal account.
{% endhint %}

## Use the Blokiments Alerts Bot in a group chat

Below is a step‐by‐step guide to adding the Blokiments Alerts Telegram bot to your group and setting it up to work with your group chat.

{% hint style="info" %}
For each group, you need to create a different alert destination.
{% endhint %}

**Step 1: Add the Bot to Your Telegram Group**

* Open Your Telegram Group: Launch Telegram and open the group you want to use or create a new group. You should be the group's admin!
* Invite the Bot:
  * Tap the group name (or group info icon) to access settings.
  * Select “Add Members” (or “Invite Members”).
  * In the search field, type [**@blokiments\_notification\_bot**](https://t.me/blokiments_notification_bot) and select it.
* Confirm Addition: The bot is now a member of your group.

<figure><img src="/files/Tp196VqjMYMbErl6T72H" alt=""><figcaption></figcaption></figure>

**Step 2: Retrieve Your Group’s Chat ID**

* **Send a Test Message: Send a message from your account to the group.&#x20;**<mark style="color:red;">**This step is essential for the bot to work!**</mark>
* Add a helper bot like [**@myidbot**](https://t.me/get_myidbot) to the group and ask it for the ID. After adding the bot, a message should be sent to the chat.

<figure><img src="/files/qSr63cVBefWmbW7zZxNQ" alt=""><figcaption><p>The message from the @myidbot</p></figcaption></figure>

* **Copy the Current chat ID**. You will need it in the next step.

**Step 3: Configure the Bot on the Blokiments Webpage**

In the new alert destination dialog, enter the **name of** the alert destination (it can be anything to help you recognize this destination if you have multiple of them).

For the **destination type** select **Telegram**.

<figure><img src="/files/wIAojheb8BovKzn7Dlfs" alt=""><figcaption><p>Set the name and the destination type.</p></figcaption></figure>

Follow the following steps:

* **Enter the Chat ID:** Copy the `Current chat ID` from the previous step into the Chat ID field.

{% hint style="warning" %}
The minus sign should be included!
{% endhint %}

* Select the **Blokiments Bot.**
* Send a test message to confirm everything is set up correctly. You should receive the following message in the group:

<figure><img src="/files/OwLyOLiNhAfO4O3RSfyU" alt=""><figcaption><p>A test message</p></figcaption></figure>

{% hint style="danger" %}
If you don't receive a message, something was wrong in the previous steps. Check the steps again or write to us in the [community group](https://t.me/blokiments_public). We're here to assist you!
{% endhint %}

* After the successful message click on Create.

<figure><img src="/files/KN1BodLFYBUS06DDaOpL" alt=""><figcaption></figcaption></figure>

Now the alerting in your group should be set up. The alert will be sent to your group when the condition is fulfilled.&#x20;

## Use a personal bot

### Step 1: Create a Telegram Bot and Get the Bot API Token

Firstly, you must create a bot and obtain the Bot API token. Follow these steps:

1. **Open Telegram** and search for [**@BotFather**](https://t.me/BotFather) (or click [here](https://t.me/BotFather)).
2. Start a conversation with **@BotFather** by clicking the **Start** button.
3. In the chat, type `/newbot` and press **Enter**.
4. **BotFather** will prompt you to:

   * **Choose a name** for your bot (e.g., "MyAlertBot123").
   * **Choose a username** that ends with "bot" (e.g., "MyAlertBot123\_bot").

   <figure><img src="/files/Aqxjsh5EZrHhJ1wwUnLk" alt=""><figcaption></figcaption></figure>
5. Once completed, **@BotFather** will create your bot and provide a **Bot API Token** (a long string that looks like this: `123456789:ABCDEF...`). This token is required to connect your bot to our webpage.
6. **Copy the Bot API Token** and paste it into our web page's Bot API token field.
7. <mark style="color:red;">**Start a conversation with your new bot (missing this step will prevent the bot from working).**</mark>
   1. Search for your bot using its username (e.g., `@MyAlertBot123`) on Telegram or by clicking the link provided by  **@BotFather**.
   2. Open the chat and click the **Start** button. This step activates the bot and allows it to send messages.

{% hint style="warning" %}
We understand the importance of keeping your Bot API Token secure. Rest assured that we take all necessary measures to handle and store your Bot API Token with the highest level of security. Your token is used exclusively to facilitate communication between your Telegram bot and our system.

However, to minimize any potential security risks, we recommend the following:

* **Use this bot only for receiving Blokiments-related notifications, and avoid using it for sensitive or personal information.**
* If you suspect any unauthorized use of your bot, immediately revoke the Bot API Token via **@BotFather** and generate a new one.
  {% endhint %}

### Step 2: Get the Chat ID

The Chat ID is needed to send alerts or messages from the bot to a specific chat or group. Follow these steps to obtain it:

* Open Telegram and search for[ **@get\_myidbot**](https://t.me/get_myidbot) (or click [here](https://t.me/get_myidbot)).
* Start a conversation with [ **@**&#x67;et\_myidbot](https://t.me/get_myidbot) by clicking the **Start** button.
* The bot will reply with your **Chat ID**. It usually looks like a series of numbers, e.g., `12345678`.
* **Copy the Chat ID** and paste it into the **Chat ID** field on your webpage.

<figure><img src="/files/g8qvFpJfQJPFIAZRv19n" alt=""><figcaption></figcaption></figure>

### Step 3: Test the Bot Connection

* After entering the **Bot API Token** and **Chat ID** on your webpage, click the **Send Test** button.
* You should receive a test message in the chat or group linked to the Chat ID if everything is set up correctly.

<figure><img src="/files/VVQpBZggq8Oyyfjaps2i" alt=""><figcaption></figcaption></figure>

You are ready to click the Next button.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blokiments.com/features/alerts/telegram-alerts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
