semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Telegram alerts not working

Open nhasian opened this issue 2 years ago • 1 comments

Using ansible-semaphore in docker with image semaphoreui/semaphore:latest I used the @rawdatabot in Telegram to retrieve my chat id. In ansible-semaphore from the Dashboard -> SETTINGS, I enter my chat id in "Telegram Chat ID (Optional) and click SAVE. I'm not sure if it matters for Telegram, but I also have Send alerts enabled for the admin user, though I suspect this is just for email notifications.

When running a task, whether it is Success or Failed, I do not receive any Telegram notifications.

nhasian avatar Aug 20 '23 06:08 nhasian

I think one needs to set the following in the Semaphore config:

telegram_alert: true
telegram_chat: <chat id>
telegram_token: <token from BotFather>

However so far I also haven't been successful with sending alerts - a failure is reported upon a failing task:

7:48:56 PM
Running playbook failed: exit status 4
7:48:56 PM
Can't send telegram alert! Response code: 403

So at least I know that Semaphore tries to send the alert. Not clear to me why 403 error is triggered.

dzonder avatar Jan 26 '24 18:01 dzonder

Hello, same problem for me :( Do you have a solution please ? Thank you

prohand avatar Jun 25 '24 08:06 prohand

Telegram alerts work. It is configuration issue. Did you test your bot via curl?

fiftin avatar Jun 25 '24 10:06 fiftin