Skip to content
send

GitHub Action

Send Notification to Telegram

v1.1.0 Latest version

Send Notification to Telegram

send

Send Notification to Telegram

Send notification events to Telegram messenger

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Send Notification to Telegram

uses: chapvic/[email protected]

Learn more about this action in chapvic/telegram-notify

Choose a version

Send Notifications to Telegram

Build Docker CI

Send workflow status notifications to Telegram with support different Git-servers (i.e. Gitea, Gogs)

Usage

First of all, you need to create a Telegram bot by talking to @BotFather bot. See official guide here: https://core.telegram.org/bots#6-botfather

If you want to get notifications to personal chat with bot, find your user id, for example by talking to @jsondumpbot.

Also you can use channel for notifications, in this case just get your channel name in format @channelname.

Then add your bot token and user id (or channel name) to repository Secrets.

Add following minimal step to the end of your workflow:

    - name: Send notification to Telegram
      uses: chapvic/telegram-notify@master
      if: always()
      with:
        token: ${{ secrets.TELEGRAM_BOT_TOKEN }} # Token secret
        chat: ${{ secrets.TELEGRAM_CHAT_ID }} # User ID or channel name secret
        status: ${{ job.status }} # Do not modify this line !!!

If you want to use your own messages, you can specify optional arguments in your workflow:

    - name: Send notification to Telegram
      uses: chapvic/telegram-notify@master
      if: always()
      with:
        token: ${{ secrets.TELEGRAM_BOT_TOKEN }} # Token secret
        chat: ${{ secrets.TELEGRAM_CHAT_ID }} # User ID or channel name secret
        status: ${{ job.status }} # Do not modify this line !!!
        title: Some workflow title
        header: Additional subtitle
        message: Your notification text message
        footer: Footer message

All additional arguments must use the markdown text