cancel
Showing results for 
Search instead for 
Did you mean: 

webhook alerts to Microsoft Teams

webhook alerts to Microsoft Teams

riverford
New Contributor

I've tried to set up webhook alerts to microsoft teams as email alerts don't render well in the teams client. however the webhooks come in looking blank. you can see a message in the activity tab.

4 REPLIES 4

James_A
Valued Contributor

This is what my teams webhook script looks like:

#!/bin/bash
# https://community.extremenetworks.com/extreme/topics/extrememanagment-alarms-with-ms-teams-slack-etc

title=$1
shift

while (( $# )); do
if [[ $1 == '^^^' ]]; then
shift
break
fi
title="$title $1"
shift
done

request_body=$(cat <<EOF
{
"title": "$title",
"themeColor": "ff0000",
"text" : "$*"
}
EOF
)

#echo $request_body > /tmp/foo

/usr/bin/curl -H "Content-Type: application/json" -d "$request_body" https://contoso.webhook.office.com/webhookb2/guid@tenantid/IncomingWebhook/hash/guid

 And the notifications look like this:

James_A_0-1719209785927.png

 

James_A
Valued Contributor

Oh, but is this XIQ or XIQ-SE?

Hi James,

I am using XIQ. I can't see a place in the interface to add any scripts. Is that an XIQ-SE feature?

GTM-P2G8KFN