# GitHub - matriphemonit2telegram A simple script to send Monit alerts using Telegram bot.
 
```ad-abstract
title: Summary
collapse: open
Note Description
```
 
```toc
style: number
```
 
---
 
A simple script to send Monit alerts using Telegram bot.
By default, Monit only sends alert notifications via email. But we can also set [a hook to execute a script](https://mmonit.com/monit/documentation/monit.html#action). When executing the script, Monit sets a few environment variables about the alert.
This tiny script transforms those variables into a text message and pipes them to Telegram using a bash script for delivery.
This script is inspired by [Monit2Twilio](https://github.com/alexdunae/monit2twilio).
 
---
 
## Requirements
- Bash
- CURL
- [jq](https://stedolan.github.io/jq/)
- [[Configuring Telegram bots|Telegram bot]]
- [[Configuring Monit|monit]]
 
---
 
## Create Telegram Bot
If you don't have a Telegram Bot, just [create one](https://core.telegram.org/bots#create-a-new-bot). By using a Telegram bot you don’t have to use a real Telegram client or reuse your Telegram account.
 
### Getting Bot Token
You will get a **Telegram Bot Token** after bot created. Keep this token, we will use it later. The bot token is looked like this.
123456789:aBcDeFgHiJkLmN-OpQrStUvWXyZ12345678
 
### Getting Chat ID
To send messages to a Telegram chat, you must first needs to start a chat with the bot. Clicking on the bot link after creation should be enough, it will automatically send a message of `/start` to the bot.
To get the **Chat ID** from Telegram bot, execute this command using [getUpdates](https://core.telegram.org/bots/api#getupdates) function of Telegram API.