How to write the script of alarm notification to show in channel of microsoft teams?

I would like to use alarm notification. Could you share script for me,please?

I’m not sure you can send notifications to teams directly from the alarm/pipeline configuration…
But you can send a notification email or text message, and then I’m sure there are ways of forwarding those to a teams channel.

1 Like

team groups have an email address.
i blurred mine out but its where the arrow points too xd


Thank you very much.

I didnt completely test this out, but this should roughly get you on the right path.

EDIT: Replaced this with a version that I just tested and posted to a teams chat!

def msTeams(val):
    import system
    url = "" \
           "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx@xxxxxx-xxx-xxx-xxx-xxxxx/" \
           "IncomingWebhook/xxxxxxxxxxxxxxxx/" \
    contentType = "application/json"
    brutData = {
        "@type": "MessageCard",
        "@context": "",
        "themeColor": "0076D7",
        "summary": "Ignition Notification Message",
        "sections": [{
                    "activityTitle": "Ignition Notification Message",
                    "activitySubtitle": "Ignition Web Service",
                    "activityImage": "",
                    "facts": [{
                        "name": "Message",
                        "value": val},
                        {"name": "Date",
    postData = system.util.jsonEncode(brutData)
    result =, contentType, postData)
    return result