DEV Community

Cover image for Receive Netlify Notification on Telegram
Haider Ali Punjabi
Haider Ali Punjabi

Posted on • Originally published at

Receive Netlify Notification on Telegram


Netlify is one of the worlds largest hosting providers for JAMStack Websites. All of my websites are hosted on it. Some of them use manual deploys as they are deployed via CI. I have disabled auto-publishing for some of the websites because I like to preview them before publishing. Since a CI is used during deploy, the time taken for the website to deploy on Netlify is random. I wanted to be notified whenever a deploy was ready to be published and I tried many different techniques for it. Initially, I used Outgoing Notifications with IFTTT. With that, I was able to receive a notification on my mobile whenever the deploy was ready. It worked fine, but I wanted to receive a notification on my PC, not my mobile, which will open the deploys page of the website when I click on it.

For a project of mine, I learnt how to make Telegram Bots. With that, I was able to create another bot that messaged me whenever a website was ready to deploy.


  1. Follow this tutorial to create the Telegram Bot. Note the API Token you receive. In the following steps, it will be referred to by $token
  2. The bot will need to know your chat id. To find that, we need to set up a temporary webhook. is a great service to test webhooks online. Go to and copy the unique URL. (Referred by $unique_url)
  3. Open the following URL in your browser$token/setWebhook?url=$unique_url
  4. Now, send a message to your bot from your Telegram account. In the window, you will receive a new request which looks like:

             "update_id": 213123213,
             "message": {
               "message_id": 16,
               "from": {
                 "id": 987654321,
                 "is_bot": false,
                 "first_name": "John",
                 "last_name": "Doe",
                 "username": "johndoe",
                 "language_code": "en"
               "chat": {
                 "id": 987654321,       // <----- chat_id
                 "first_name": "John",
                 "last_name": "Doe",
                 "username": "johndoe",
                 "type": "private"
               "date": 1589716177,
               "text": "Jd"
  5. Note the chat["id"] from the previous step. It is the chat id you need. (Referred by $chatid)

  6. You can delete the webhook now$token/deleteWebhook

  7. Now, go to your website's settings on Netlify. In Build & Deploy > Deploy Notifications, add a new Outgoing Webhook.

  8. Select the required event (Details of all events), and the following in URL field.$token/sendMessage?chat_id=$chatid&text=$message

    The $message is the message you want to receive. I send the name of the website, event and the link to the website's deploys page.

  9. The set up is done. Now, you will receive a Telegram Message whenever a deploy is ready.


Read this on my blog

Top comments (0)