Stephen Kellett (Customer) asked a question.

Post To MS Teams Action not working

Hi, I cannot get the post to MS Teams action working I keep getting the below error message

 

I have followed the kb article but it appears to be outdated "connectors" no longer appear to be an option in MS Teams Post To MS Teams Action

 

Failed to post message to Teams. Response status code: BadRequest, reason phrase: Bad Request, content: {"error":{"code":"TriggerInputSchemaMismatch","message":"The input body for trigger 'manual' of type 'Request' did not match its schema definition. Error details: 'Invalid type. Expected Object but got String.'.","messageTemplate":"The input body for trigger '{0}' of type '{1}' did not match its schema definition. Error details: '{2}'."}}

 

MS Teams message (JSON)

{

  "type":"message",

  "attachments":[

   {

     "contentType":"application/vnd.microsoft.card.adaptive",

     "contentUrl":null,

     "content":{

      "type":"AdaptiveCard",

      "$schema":"https://adaptivecards.io/schemas/adaptive-card.json",

      "version":"1.3",

      "body":[

        {

         "type":"TextBlock",

         "text":"%Device.displayname is ***%Device.state***",

         "wrap":true

        }

      ],

      "actions":[

        {

         "type":"Action.OpenUrl",

         "title":"Open Device Properties",

         "url":"https://servernameremoved/NmConsole/#v=Wug_view_device_deviceproperties_DeviceProperties/p=%7B%22deviceId%22%3A%Device.DatabaseID%7D"

        }

      ]

     }

   }

  ]

}

MS Teams Alert Center message (JSON)

{

  "type":"message",

  "attachments":[

   {

     "contentType":"application/vnd.microsoft.card.adaptive",

     "contentUrl":null,

     "content":{

      "type":"AdaptiveCard",

      "$schema":"https://adaptivecards.io/schemas/adaptive-card.json",

      "version":"1.3",

      "body":[

        {

         "type":"TextBlock",

         "text":"AC: %AlertCenter.Threshold.Name (%AlertCenter.Threshold.TotalNewItems new, %AlertCenter.Threshold.TotalCurrentItems current and %AlertCenter.Threshold.TotalAutoResolvedItems resolved out of threshold / %AlertCenter.Threshold.TotalItems total) - %AlertCenter.NotificationPolicy.EscalationStep",

         "wrap":true

        }

      ],

      "actions":[

        {

         "type":"Action.OpenUrl",

         "title":"Open Alert Center",

         "url":"https://servernameremoved/NmConsole/#v=Wug_view_dashboard_alertcenter_AlertCenter"

        }

      ]

     }

   }

  ]

}

 


  • James Carlisle (Progress Software)

    Hi @Stephen Kellett (Customer)​ 

     

    It looks like you found the Help Document from WUG version 24. Microsoft has made changes to Teams since then by deprecating Webhooks in favor of Workflows.

     

    Please see this KB article for more information - How to create a Post To MS Teams Action - Progress Community

     

    Note, however, that Microsoft keeps making changes to Teams so some of the screenshots in the article may not look exactly like what is presently in Teams. Please refer to Micorsoft's documentation if needed on creating Workflows.

    Selected as Best
  • James Carlisle (Progress Software)

    Hi @Stephen Kellett (Customer)​ 

     

    It looks like you found the Help Document from WUG version 24. Microsoft has made changes to Teams since then by deprecating Webhooks in favor of Workflows.

     

    Please see this KB article for more information - How to create a Post To MS Teams Action - Progress Community

     

    Note, however, that Microsoft keeps making changes to Teams so some of the screenshots in the article may not look exactly like what is presently in Teams. Please refer to Micorsoft's documentation if needed on creating Workflows.

    Selected as Best