Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Telegram Bot Notifications

Featured Replies

11 hours ago, BackupAddict said:

Easy once one know how but that said a simple chatid field in the UnRAID notification agent GUI for Telegram would sure be more user friendly than having to use terminal

agreed

  • Replies 54
  • Views 24.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I think you are supposed to be able to enter 'apikey:chatid' and it should work However I just created a file called 'chatid' and entered the number in there Sent from my iPhone using Tapatalk

  • cd /boot/config/telegram Nano chatid Add chatid number to file Ctrl-x Save Sent from my iPhone using Tapatalk

  • BackupAddict
    BackupAddict

    Awesome thank-you for the details, all sorted now notifications arriving in my alert channel now.   Easy once one know how but that said a simple chatid field in the UnRAID notification agen

Posted Images

I've just started playing with this, and am trying to get notifications on 2 devices for a server (there are two of us admins for it).

I created the Bot, and the other person has added the bot.

My telegram gets the notifications without issue, but the second person is not getting any notifications. Am I doing something wrong?

  • 2 weeks later...

found out , that this part had to be enabled also

 

 

image.png

Edited by killeriq

  • 1 month later...

So, i tried to set up my telegram for notificartion, i created the bot and got the "token to access HTTP API.
Configured in Unrad notifications:
image.png.3f8ef8b2bf28dd358202806c8afade23.png
 

Disabled it, re-enabled it.
Test.

Nothing.

Any clue?

Thanks.

EDIT: some hour after it started working.

Edited by dhstsw

On 11/26/2019 at 6:01 AM, Ashe said:

cd /boot/config/telegram
Nano chatid
Add chatid number to file
Ctrl-x
Save

Hi,

in my /boot/config there's no telegram folder.
I made it nonetheless and did the chatid file inside with the group chat id (of course) but with no avail.

 

found this:

/boot/config/plugins/dynamix/telegram

 

Inside there's the chatid, with a 9 digits number.

The chatid for the group is a 9 digits too but with a "g" at the start (10 characters in total).

Modified with both the "g" and without, no results.


Any hints?

Thanks.

EDIT: solved by myself. It needs the "-" symbol before the number, something like:

-123456789

 

Cheers.

Edited by dhstsw

Hi,
in my /boot/config there's no telegram folder.
I made it nonetheless and did the chatid file inside with the group chat id (of course) but with no avail.
 
found this:

/boot/config/plugins/dynamix/telegram
 
Inside there's the chatid, with a 9 digits number.
The chatid for the group is a 9 digits too but with a "g" at the start (10 characters in total).
Modified with both the "g" and without, no results.

Any hints?

Thanks.

EDIT: solved by myself. It needs the "-" symbol before the number, something like:

-123456789
 
Cheers.

Glad it's working. My chat Id is in the config/telegram folder and works with just the number. But if it works it works


Sent from my iPhone using Tapatalk
Hi,
in my /boot/config there's no telegram folder.
I made it nonetheless and did the chatid file inside with the group chat id (of course) but with no avail.
 
found this:

/boot/config/plugins/dynamix/telegram
 
Inside there's the chatid, with a 9 digits number.
The chatid for the group is a 9 digits too but with a "g" at the start (10 characters in total).
Modified with both the "g" and without, no results.

Any hints?

Thanks.

EDIT: solved by myself. It needs the "-" symbol before the number, something like:

-123456789
 
Cheers.

Glad it's working. My chat Id is in the config/telegram folder and works with just the number. But if it works it works


Sent from my iPhone using Tapatalk
  • 4 weeks later...

Hi all,

 

I tried to set it up but it doesn't work.

 

This is what I've done:

 

-enabled agent in unraid ui

image.png.ff912f24e88cab5332fc4389b0bcf635.png

- activated agent notification

 

image.png.ddf3fe6b7b93eada9932ca79a8c92799.png

 

-created a folder in /boot/config called telegram and a chatid file with my id taken using IDbot.

 

 

What I'm doing wrong?

 

Thank you in advance!

The telegram folder should have been created automatically when you set it up in the notification settings. Can you check if the is a Telegram folder under boot/config/plugins/dynamix/notifications?

 

 

 

 

Edit

 

/boot/config/plugins/dynamix/notifications/agents

 

This should have a Telegram.sh file in there

7 minutes ago, Ashe said:

The telegram folder should have been created automatically when you set it up in the notification settings. Can you check if the is a Telegram folder under boot/config/plugins/dynamix/notifications?

 

 

 

 

Edit

 

/boot/config/plugins/dynamix/notifications/agents

 

This should have a Telegram.sh file in there.

Yes. The file exist.

 

And it has inside info like my bot id.

I think the only option is to manually clear the files and try again via the webgui


Sent from my iPhone using Tapatalk

Tried. Nothing changed. 

On 1/25/2020 at 9:01 AM, Ashe said:


Glad it's working. My chat Id is in the config/telegram folder and works with just the number. But if it works it works


Sent from my iPhone using Tapatalk

dang chatid, i needed to know where to find it, I finally got mine working.

 

thanks

 

Edited by ijuarez
engrish

  • 2 weeks later...

Hello,

 

Telegram Notification doesnt work:

I've copy the bot token & APPLY but with pressing TEST nothing happened....

 

Also i've try these (posted before), but no working more....

 

  On 11/26/2019 at 5:01 AM, Ashe said:

cd /boot/config/telegram
Nano chatid
Add chatid number to file
Ctrl-x
Save

 

dhstsw Posted January 25 (edited)

It needs the "-" symbol before the number, something like:
-123456789

 

 

Edited by DavKBe

Ah yes the Telegram API requires both chat id and message text to function:

https://core.telegram.org/bots/api#sendmessage

 

The chat_id parameter is part of the test script in Telegram.sh, but in my case (and I guess I'm not alone) the 'chatid' file that is referenced does not exist. If you create it like DavKBe mentions, it is read and the test script works immediately.


What I did was create my own Telegram channel, so I can have multiple bots in there. Applications report to their own bot, and by setting the 'Sign messages' option, the bot name is shown. That way I know where the message is coming from.

 

When the channel is there, add @get_id_bot to it. This bot will respond to each message with the chat ID. Once you have it, remove the bot. That is the chat ID you need to add to the 'chatid' file (including the - prefix).

 

Creating you own bot is easy using @BotFather. Just send that bot a message and start the conversation with /newbot. After naming your shiny new companion, the process will end with the BotFather confirming your bot creation and the access api you need.

 

You can test your bot manually by simply using a HTTP call (replace <bot_access_api> and <chat_id> with your values):

https://api.telegram.org/bot<bot_access_api>/sendMessage?chat_id=<chat_id>&text=test

On 11/27/2019 at 6:27 AM, BackupAddict said:

Easy once one know how but that said a simple chatid field in the UnRAID notification agent GUI for Telegram would sure be more user friendly than having to use terminal :)

 

that is correct:) There is a way to make a small update for this settings?

Because this is not working for me: 

cd /boot/config/telegram
Nano chatid
Add chatid number to file
Ctrl-x
Save

 

Thank you!

 

6 hours ago, norbertt said:

"Because this is not working for me"

Have you tried to send a message to your bot using the HTTP call? Simply from a browser.

As long as your bot token is correct, the chat id is correct and the bot is in the chat... should work.

Then at least you know technically it could work and the error is on unRAID side.

  • 3 weeks later...

For those coming here, I figured it out!

 

It's not working because it's missing the "chatid" file in "/boot/config/plugins/dynamix/telegram"

 

Steps:

  1. Follow this guide until you have created the bot
  2. Go to Unraid => Settings => Notification settings and scroll all the way down to Telegram.
  3. Fill in the HTTP API of the bot
    1. Ex: 1216098989:AAGRnTFAKElG1v8pPKuN_RTGW4RTHDxo
    2. NO "-" at the start!
  4. Open the terminal, first of five icons at the top right of the screen.
  5. Once in the terminal do the following:
    1. cd ../
    2. cd /boot/config/plugins/dynamix/telegram
    3. nano chatid
    4. *paste in the channel id where the bot should post, or your own Telegram ID*
      1. Ex: -1001444111222
      2. MAKE SURE TO HAVE A "-" AT THE START HERE!
    5. *CTRL + S to save*
    6. *CTRL + X to close editor*
    7. ls *to check if the file has been made*
  6. No go back to the notification settings, press test underneath the Telegram form and it should work now!

 

Let me know if you have questions!

On 4/1/2020 at 9:43 PM, Unmax said:

For those coming here, I figured it out!

 

It's not working because it's missing the "chatid" file in "/boot/config/plugins/dynamix/telegram"

 

Steps:

  1. Follow this guide until you have created the bot
  2. Go to Unraid => Settings => Notification settings and scroll all the way down to Telegram.
  3. Fill in the HTTP API of the bot
    1. Ex: 1216098989:AAGRnTFAKElG1v8pPKuN_RTGW4RTHDxo
    2. NO "-" at the start!
  4. Open the terminal, first of five icons at the top right of the screen.
  5. Once in the terminal do the following:
    1. cd ../
    2. cd /boot/config/plugins/dynamix/telegram
    3. nano chatid
    4. *paste in the channel id where the bot should post, or your own Telegram ID*
      1. Ex: -1001444111222
      2. MAKE SURE TO HAVE A "-" AT THE START HERE!
    5. *CTRL + S to save*
    6. *CTRL + X to close editor*
    7. ls *to check if the file has been made*
  6. No go back to the notification settings, press test underneath the Telegram form and it should work now!

 

Let me know if you have questions!

This is the easiest way to get your chat ID with 1 click

 

  • 2 months later...

Still broken, even in beta v6.9.  I can't imagine it's that difficult to add the chat id as a field to populate under the bot token?  Or at a minimum, add help text to indicate which files need to be populated on the USB stick.  Looking at this thread, it seems this has been broken for a long time.

  • Author
On 6/9/2020 at 6:29 AM, ssn760 said:

Still broken, even in beta v6.9.  I can't imagine it's that difficult to add the chat id as a field to populate under the bot token?  Or at a minimum, add help text to indicate which files need to be populated on the USB stick.  Looking at this thread, it seems this has been broken for a long time.

It's not broken mine has been working without hiccup for over a year now. 

 

You need to create a chatid file under /boot/config/telegram.

From the command line run the following;

touch /boot/config/telegram/chatid

In that file you need to input the chatid of your user not your bot. 

You can obtain this by going to the following url;

https://api.telegram.org/bot{bot token}/getUpdates

Or running a curl command from the command line;

curl https://api.telegram.org/bot{bot token}/getUpdates

Where {bot token} is your bot api token... in the format of 1111111111:AAasdflakjhsflaskdhalskdjyYo

You will see json formated text spit out.

Look for the first instance of a chat id that belongs to your user name and not the bot.

"chat":{"id":206646491,"first_name":"Max","last_name":"Power","username":"MPower"

The above is the chat id you insert into your chatid file on the server. 

Just the number nothing else.

Run this in command line;

echo "206646491" > /boot/config/telegram/chatid

 

Edited by exist2resist

  • 2 months later...
On 6/9/2020 at 5:29 AM, ssn760 said:

Still broken, even in beta v6.9.  I can't imagine it's that difficult to add the chat id as a field to populate under the bot token?  Or at a minimum, add help text to indicate which files need to be populated on the USB stick.  Looking at this thread, it seems this has been broken for a long time.

If you're trying to use a channel ID you need to add '-100' to the front of it in your chatid file for it to function.

 

Ex: Channel ID is 1234567899, you would provide -1001234567899 to the file

  • 7 months later...

Can we not get the chatID in field box in the UI with the other settings? as it is needed. @limetech @Squid

Edited by turnipisum

For me having it working should be enough

1 hour ago, Jokerigno said:

For me having it working should be enough

Why is yours not working?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.