A powerful, lightweight Go application that forwards GitHub webhook events to Telegram chats with rich, customizable notifications.
This tool acts as a bridge between your GitHub repositories and your Telegram chats. It listens for over 40 different GitHub events—from code pushes and pull requests to security alerts and deployments—and transforms them into well-formatted, easy-to-read Telegram messages.
It's designed for developers, DevOps engineers, and project managers who want to stay updated on repository activity without leaving their favorite messaging app.
- Comprehensive Event Support: Get notified for over 40 GitHub event types.
- Rich Formatting: Messages are parsed into Telegram's MarkdownV2 format, with emojis and interactive buttons.
- Easy to Deploy: One-click deployment to Vercel, or run it anywhere Go is supported.
- Lightweight & Fast: Built with Go for minimal resource consumption.
- Customizable: Fork the repo to customize message formats and add your own logic.
- Open Source: Licensed under the MIT license.
This webhook supports a wide range of GitHub events, including:
- Code & Repository:
push,release,fork,repository - Pull Requests:
pull_request - Issues:
issues,issue_comment - Discussions:
discussion,discussion_comment - CI/CD & Deployments:
deployment,deployment_status,workflow_job,workflow_run,workflow_dispatch - Security:
repository_vulnerability_alert,secret_scanning_alert - And many more...
A full list of supported events can be found in the src/utils/githubEvents.go file.
- Go: Version 1.20 or higher (for local development).
- Telegram Bot Token: You can get one from @BotFather.
- GitHub Repository: You'll need admin access to the repository you want to monitor.
-
Clone the repository:
git clone https://github.com/AshokShau/github-telegram-notify.git cd github-telegram-notify -
Set up environment variables: Create a
.envfile in the root of the project and add your Telegram bot token:TOKEN=YOUR_TELEGRAM_BOT_TOKEN -
Run the application:
go run main.go
The server will start on port
3000by default. -
Expose your local server: To receive webhooks from GitHub, you'll need to expose your local server to the internet. We recommend using a tool like ngrok:
ngrok http 3000
This will give you a public URL that you can use for your GitHub webhook.
- Go to your GitHub repository's Settings > Webhooks.
- Click Add webhook.
- Payload URL: Enter the URL from ngrok, followed by
/github?chat_id=YOUR_CHAT_ID. ReplaceYOUR_CHAT_IDwith the ID of the Telegram chat where you want to receive notifications. - Content type: Select
application/json. - Secret: (Optional) You can add a webhook secret for added security.
- Which events would you like to trigger this webhook?: Select the events you want to be notified about.
- Click Add webhook.
The easiest way to deploy this application is with Vercel.
- Fork this repository.
- Click the Deploy with Vercel button at the top of this README.
- In your Vercel project settings, add your
BOT_TOKENas an environment variable. - Deploy!
You can also build the application and run it as a binary on any server:
go build -o gh-telegram
./gh-telegramContributions are welcome! If you'd like to help improve this project, please:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a clear description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
- Demo Bot: @FallenAlertBot
- Updates Channel: @FallenProjects