awx icon indicating copy to clipboard operation
awx copied to clipboard

Telegram notifications from AWX

Open amg-web opened this issue 5 years ago • 11 comments

  • Feature Idea Please add Telegram Notifications to AWX

Now available in AWX 15.0: email, Grafana, IRC, Mettermost, Pagerduty, Rocket.chat, Slack, Twilio, webhook

amg-web avatar Oct 04 '20 05:10 amg-web

You can easily use the webhook type. Example:

  • target url: https://api.telegram.org/botYOUR_BOT_ID/sendMessage
  • HTTP Headers: { "Content-Type": "application/json" }
  • HTTP Method: POST
  • Customize messages… turn on
  • Success message body (or start/error):
{
    "chat_id": "YOUR_CHAT_ID",
    "text": "success - \"{{ job_friendly_name }}\""
}

Colonizator1 avatar Feb 01 '23 11:02 Colonizator1

You can easily use the webhook type. Example:

* target url: `https://api.telegram.org/botYOUR_BOT_ID/sendMessage`

* HTTP Headers: `{ "Content-Type": "application/json" }`

* HTTP Method: POST

* Customize messages… **turn on**

* Success message body (or start/error):
{
    "chat_id": "YOUR_CHAT_ID",
    "text": "success - \"{{ job_friendly_name }}\""
}

Hi @Colonizator1 does this still work ? i've tried without success

souovan avatar Apr 14 '23 20:04 souovan

@souovan Hi, we are using such telegram notifications right now. Any errors? Did you check your request manually, with postman, for example?

Colonizator1 avatar Apr 15 '23 08:04 Colonizator1

Is there a way to debbug this on AWX ? i only got this when i test the notification image

souovan avatar Apr 17 '23 12:04 souovan

If you are sure that your request URL and data are correct, try to attache notification to some simple template. I guess you tried to test the notification with the Test button. I failed with it too. But it works well for templates.

Colonizator1 avatar Apr 17 '23 13:04 Colonizator1

Yeah, i've tried with the Test button, i will try attaching on some template.

souovan avatar Apr 17 '23 17:04 souovan

Any news on this?

LeoSpyke avatar Jul 20 '23 14:07 LeoSpyke

@LeoSpyke it's working as webhook type, read my message above

Colonizator1 avatar Jul 20 '23 20:07 Colonizator1

it works strange I can not edit text message, it does not save it.

amg-web avatar Jul 21 '23 05:07 amg-web

@LeoSpyke it's working as webhook type, read my message above

Yes I've seen your message, but I mean that this is not an integration, rather it is a "collateral" workaround that works. Another native approach would allow to write the token in a specific password field, like the Token for Twilio or Pagerduty, rather than in plain text in the Target URL field.

LeoSpyke avatar Jul 21 '23 08:07 LeoSpyke

Maybe this issue can help you:

webhook notification body is not valid anymore

igorferrati avatar Sep 26 '24 22:09 igorferrati