💸Save up to $132K/month in CI costs!👉 Try Free
Skip to main content
← Back to workflows

How to Use the Telegram Message Notify GitHub Action

appleboy-telegram-action -
GitHub Action
v0.1.1
822
Contributors
Contributor - appleboyContributor - 0xflotusContributor - remotenode
Categories

Optimize Your CI/CD Pipeline

Get instant insights into your CI/CD performance and costs. Reduce build times by up to 45% and save on infrastructure costs.

45% Faster Builds
60% Cost Reduction
Usage
name: 'Usage of telegram-action GitHub Action'
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

telegram-action logo

telegram-action

GitHub Action that sends a Telegram message.


What is Telegram Message Notify GitHub Action?

The Telegram Message Notify GitHub Action allows you to send a Telegram notification message. This action is useful for sending alerts and notifications directly to your Telegram chat when specific events occur in your GitHub repository.

How to Send a Photo Message

Send a photo message to a specified Telegram chat.

- uses: actions/checkout@master
- name: send photo message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: send photo message
photo: tests/github.png
document: tests/gophercolor.png

How to Send a Location Message

Send a location message to a specified Telegram chat.

- name: send location message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
location: '24.9163213 121.1424972'
venue: '35.661777 139.704051 竹北體育館 新竹縣竹北市'

How to Send a Message Using Custom Proxy

Send a message using a custom proxy (supports HTTP, HTTPS, and SOCKS5).

- name: send message using socks5 proxy URL
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
socks5: "http://222.124.154.19:23500"
message: Send message from socks5 proxy URL.

How to Send a Document Message

Send a document message.

with:
document: tests/gophercolor.png

How to Send a Sticker Message

Send a sticker message.

with:
sticker: path/to/sticker.webp

How to Send an Audio Message

Send an audio message.

with:
audio: path/to/audio.mp3

How to Send a Voice Message

Send a voice message.

with:
voice: path/to/voice.ogg

How to Send a Venue Message

Send a venue message.

with:
venue: '35.661777 139.704051 竹北體育館 新竹縣竹北市'

How to Send a Video Message

Send a video message.

with:
video: path/to/video.mp4

How to Enable Debug Mode

Enable debug mode.

with:
debug: true

How to Set Message Format

Set the message format to markdown or html. See MarkdownV2 style.

with:
format: markdown

How to Send a Custom Message

Send a custom message.

with:
message: 'Build and tests completed successfully!'

How to Use a Message Template File

Overwrite the default message template with the contents of the specified file.

with:
message_file: path/to/message_template.txt

How to Disable Web Page Preview

Disable link previews for links in this message.

with:
disable_web_page_preview: true

How to Disable Notification

Disable notifications for this message, supports sending a message without notification.

with:
disable_notification: true