# Telegram

The **telegram** block allows users to send messages directly to a specified telegram channel. This is useful for creating real-time alerts or updates within telegram, providing timely notifications based on workflow events in Otomato.

## Send notification to you

Simply follow the on-boarding process, open your telegram app or scan the QR code and it's done.

## Connect to a specific channel

#### **Step 1:**

#### **Create Your Telegram Bot**

1. Open Telegram and start a chat with [@BotFather](https://t.me/BotFather).
2. Send /newbot, then follow the steps to:
   * Give your bot a name
   * Set a unique username (must end with bot)
3. Copy the **bot token** provided (e.g., 7697...Woo).

***

#### **Step 2:**

#### **Add the Bot to Your Telegram Group**

1. Go to your **Telegram group**.
2. Add your bot as a **member**.
3. Promote it to **admin** (or at least make sure it can send messages).

***

#### **Step 3:**

#### **Find the chat\_id and message\_thread\_id**

1. Send a message in the topic you want the bot to post to.
2. Use this curl to get updates:

```
curl "<https://api.telegram.org/bot><YOUR_TOKEN>/getUpdates"
```

1. Extract:

* [chat.id](http://chat.id) → the group ID (e.g., -1002783820743)
* message\_thread\_id → the topic ID (e.g., 3)

#### **Step 4:**

#### **Configure the Otomato Telegram Action**

Inside Otomato’s visual builder:

1. Add a **Telegram → Send Message** block.
2. Under **Additional Parameters**, fill in:
   * Chat Id
   * Message Thread Id
   * Webhook (<https://api.telegram.org/bot>\<YOUR\_TOKEN>/sendMessage)
3. Add the message content in the Param section.

<figure><img src="https://113901746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FARjWU7zlvQKoJ01uqhvs%2Fuploads%2FZP1RCYLkMI3P2tT30dV5%2FScreenshot_2025-07-21_at_15.02.07.webp?alt=media&#x26;token=7278418f-62c0-42bb-b0ca-d4c6e08879be" alt=""><figcaption></figcaption></figure>

\
\&#xNAN;**✅ You’re Done!**

Your workflow can now automatically send messages **into a specific topic thread** in Telegram using your bot.

<figure><img src="https://113901746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FARjWU7zlvQKoJ01uqhvs%2Fuploads%2FD1el0DkygFGXi36mfaCe%2FScreenshot_2025-07-21_at_15.03.33.webp?alt=media&#x26;token=bd4a7164-8e7f-4baf-a15f-914aee81a50c" alt=""><figcaption></figcaption></figure>
