> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keephq.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Telegram Provider

> Telegram Provider is a provider that allows to notify alerts to telegram chats.

## Authentication

This provider requires authentication.

* **bot\_token**: Telegram Bot Token (required: True, sensitive: True)

## In workflows

This provider can be used in workflows.

As "action" to make changes or update data, example:

```yaml theme={null}
actions:
    - name: Query telegram
      provider: telegram
      config: "{{ provider.my_provider_name }}"
      with:
        chat_id: {value}  # Unique identifier for the target chat or username of the target channel
        topic_id: {value}  # Unique identifier for the target message thread (topic)
        message: {value}  # Message to be sent
        reply_markup: {value}  # Inline keyboard markup to be attached to the message
        reply_markup_layout: {value}  # Direction of the reply markup, could be "horizontal" or "vertical"
        parse_mode: {value}  # Mode for parsing entities in the message text, could be "markdown" or "html"
        image_url: {value}  # URL of the image to be attached to the message
        caption_on_image: {value}  # Whether to use the message as a caption for the image
```

Check the following workflow examples:

* [send-message-telegram-with-htmlmd.yaml](https://github.com/keephq/keep/blob/main/examples/workflows/send-message-telegram-with-htmlmd.yaml)
* [telegram\_advanced.yml](https://github.com/keephq/keep/blob/main/examples/workflows/telegram_advanced.yml)
* [telegram\_basic.yml](https://github.com/keephq/keep/blob/main/examples/workflows/telegram_basic.yml)

Telegram only supports limited formatting options. Refer to the [Telegram Bot API documentation](https://core.telegram.org/bots/api#formatting-options) for more information.

## Authentication Parameters

The TelegramProviderAuthConfig class takes the following parameters:

* bot\_token (str): The bot of the token. \*Required\*\*

## Connecting with the Provider

To use the Telegram Provider you'll need a bot token.
How to create telegram bot - [https://core.telegram.org/bots#how-do-i-create-a-bot](https://core.telegram.org/bots#how-do-i-create-a-bot)

## Useful Links

* Telegram Bot docs - [https://core.telegram.org/bots](https://core.telegram.org/bots)
* Telegram how to get chat id - [https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id](https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id)

## Example

See `examples/alerts/db_disk_space_telegram.yml` for a full working example.
