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:

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:

Telegram only supports limited formatting options. Refer to the Telegram Bot API documentation 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

Example

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