How to Build a Simple Telegram Notifier Bot

April 28, 2026

2 min read

Have you ever wanted your scripts, servers, or side projects to send you a quick text message when something happens? Building a Telegram bot sounds like it requires heavy coding, but if you just want a simple notifier, it is surprisingly easy.

Here is how to get your very own Telegram notifier bot up and running in minutes.

Step 1: Meet the BotFather

To create a bot on Telegram, you have to talk to the boss: the BotFather.

  1. Open Telegram and message @botfather.
  2. Send the command /start.
  3. Next, send the command /newbot.
  4. Follow the prompts by giving it a name, and then a unique username that ends in "bot".
  5. Copy the token the BotFather gives you.

Step 2: Get Your User ID

Your bot needs to know exactly who to send the message to.

  1. Search for @userinfobot in Telegram.
  2. Send it a message to get your account details.
  3. Copy your user ID from the response.

Step 3: The curl Command

Now you have everything you need to send a message. Prepare this command in your terminal (swap in your token and user ID):

curl -s -X POST "https://api.telegram.org/bot<YOUR_TOKEN>/sendMessage" \
  -d "chat_id=<YOUR_USER_ID>" \
  -d "text=Hello from my new bot!"

Step 4: The "Gotcha" Moment

But, if you hit it in this state, it will give you an error message: Bad Request: chat not found.

Telegram bots cannot initiate conversations with users to prevent spam. You have to open the door first.

To fix this, message your bot by its username (e.g., @bot_username) in Telegram and hit Start (or send /start).

Step 5: Success!

Now that you have opened the chat, hit the curl command in your terminal again. Congrats, your bot will successfully send you the message!