# Send Dynatrace Problem Notifications via MS Teams Adaptive Cards

**URL:** <https://community.dynatrace.com/t/send-dynatrace-problem-notifications-via-ms-teams-adaptive-cards/48391>\
**Category:** Automations\
**Created:** [October 17, 2024, 2:08pm UTC](https://community.dynatrace.com/t/send-dynatrace-problem-notifications-via-ms-teams-adaptive-cards/48391 "2024-10-17T14:08:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickmarchini](https://avatars.discourse-cdn.com/v4/letter/n/e19b73/32.png) [@nickmarchini](https://community.dynatrace.com/u/nickmarchini)\
**Post date:** [October 17, 2024, 2:08pm UTC](https://community.dynatrace.com/t/send-dynatrace-problem-notifications-via-ms-teams-adaptive-cards/48391/1 "2024-10-17T14:08:38Z")

</div>

_Summary:&nbsp;This thread explains how to build MS Teams Adaptive Cards for Dynatrace problem notifications. It includes details on required JSON structures, webhook configuration, and how to display relevant incident information in Teams._

MS Teams have moved to Adaptive Cards when sending content via a webhook, it took me some time to wrap my head around this but here is my simple card. Hopefully, you can extend it as needed. For some reason, it would only work in version 1.4, but that might be unique to our MS Teams.

```markup
{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "contentUrl": null,
      "content": {
        "type": "AdaptiveCard",
        "body": [
          {
            "type": "TextBlock",
            "size": "Medium",
            "weight": "Bolder",
            "text": "{ProblemSeverity} - {ProblemImpact}",
            "style": "heading",
            "wrap": true
          },
          {
            "type": "TextBlock",
            "text": "{ProblemTitle}",
            "wrap": true
          },
          {
            "type": "FactSet",
            "facts": [
              {
                "title": "PID:",
                "value": "{PID}"
              },
              {
                "title": "Problem Details:",
                "value": "{ProblemDetailsText}"
              }
            ]
          }
        ],
        "actions": [
          {
            "type": "Action.OpenUrl",
            "title": "View",
            "url": "{ProblemURL}",
            "role": "button"
          }
        ],
        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
        "version": "1.4"
      }
    }
  ]
}

```

This is what the test message looks like

 ![Screenshot 2024-10-17 at 15.00.34.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/6/46ffc315fca367346ceeba728ebef986513cfc12.png)

---

<div class="post-metadata">

**Author:** ![linux43110](https://avatars.discourse-cdn.com/v4/letter/l/7ba0ec/32.png) [@linux43110](https://community.dynatrace.com/u/linux43110)\
**Post date:** [October 17, 2024, 3:40pm UTC](https://community.dynatrace.com/t/send-dynatrace-problem-notifications-via-ms-teams-adaptive-cards/48391/2 "2024-10-17T15:40:42Z")

</div>

Thanks [@nick](https://community.dynatrace.com/user/31512)&nbsp;!&nbsp; &nbsp; Were you using the “Post to a channel when a webhook request is received” workflow template without modifications?&nbsp; &nbsp;I’m getting the following error:

```markup
Action 'Post_card_in_a_chat_or_channel' failed: Post as Power Apps can only be used to send Cards for Power Apps into Teams. Please add Cards for Power Apps action in your flow.

```

I’ve been actively working on getting Problem notifications working via the new MS Teams / PowerAutomate webhooks for the past few days and getting hung up on the proper formatting of the payload so your post above was quite timely and appreciated.

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [October 18, 2024, 9:32am UTC](https://community.dynatrace.com/t/send-dynatrace-problem-notifications-via-ms-teams-adaptive-cards/48391/3 "2024-10-18T09:32:44Z")

</div>

Hi&nbsp;[@linux43110](https://community.dynatrace.com/user/48936)

You can test using the Power apps and teams instead of&nbsp;Power Automate.

BR,

Peter

---

<div class="post-metadata">

**Author:** ![jonhaugen](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jonhaugen/32/34914_2.png) [@jonhaugen](https://community.dynatrace.com/u/jonhaugen)\
**Post date:** [December 13, 2024, 1:22pm UTC](https://community.dynatrace.com/t/send-dynatrace-problem-notifications-via-ms-teams-adaptive-cards/48391/4 "2024-12-13T13:22:37Z")

</div>

Hi Nick,

In your json I notice that you use Dynatrace variables, so I guess that this is your configuration on the Dynatrace side.

How does the configuration for adaptive card look like in your Teams workflow? This is exactly what I am trying to achieve as well.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![jonhaugen](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jonhaugen/32/34914_2.png) [@jonhaugen](https://community.dynatrace.com/u/jonhaugen)\
**Post date:** [December 17, 2024, 10:25am UTC](https://community.dynatrace.com/t/send-dynatrace-problem-notifications-via-ms-teams-adaptive-cards/48391/5 "2024-12-17T10:25:39Z")

</div>

I was able to replicate your example message with the following configuration:

 ![jonhaugen_0-1734431106252.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/8/f8dc84fea1f813f0b77dfa253dabc6c1d78890cc.png)

Thanks!
