AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

Adaptive Cards Support for MS Teams Incoming Webhooks

Open varundmishra opened this issue 6 years ago • 26 comments

I see that there was an issue which was closed on this (back in 2018) but I wanted to know if/when the Adaptive Cards will be supported by Incoming Webhooks in MS Teams?

varundmishra avatar Jan 23 '20 07:01 varundmishra

@siduppal / @VikrantSingh01 / @matthidinger / @dclaux ideas on what the ask here is ?

shalinijoshi19 avatar Jan 24 '20 18:01 shalinijoshi19

This is something that Teams is aware of and has been working on, but we don't have a timeline for when it can be released yet. There are some complicated dependencies that make it difficult to estimate

matthidinger avatar Jan 24 '20 18:01 matthidinger

This is related to Teams' Connectors support, which are currently limited to the MessageCard format. The Connectors platform is owned by Outlook, and it is not straightforward to add support for Adaptive Cards.

dclaux avatar Jan 24 '20 18:01 dclaux

Thanks @matthidinger / @dclaux . @siduppal can you share the tracking issue etc at your end for reference here for details/timelines? Thanks!

shalinijoshi19 avatar Jan 24 '20 18:01 shalinijoshi19

@dclaux / @siduppal do we have tracking bugs or issues or forums that we can route the customer to for updates here? @varundmishra FYI please see notes above.

shalinijoshi19 avatar Jan 28 '20 12:01 shalinijoshi19

@varundmishra , Adaptive cards is not supported in webhooks, However you can send message card to work with webhooks

Trinetra-MSFT avatar Apr 03 '20 06:04 Trinetra-MSFT

Hi guys, how's the situation here? When will this functionality be released? Is there at least a way to simulate a NxN table with Message Cards? Thanks

sgiulianiamius avatar Apr 07 '20 17:04 sgiulianiamius

Just going to +1 this. It would be nice to have Adaptive Cards in webhooks.

wh1337 avatar Apr 13 '20 13:04 wh1337

Eagerly waiting for the adaptive cards to be supported in webhooks.

thechandanbhagat avatar Apr 29 '20 09:04 thechandanbhagat

+1 on this too

Jon889 avatar May 13 '20 22:05 Jon889

+1 on this If anyone knows how to send them via other methods, let me know!

kdll avatar May 28 '20 23:05 kdll

+1 on this as well!

cscheffauer avatar Jun 02 '20 11:06 cscheffauer

+1 here too.

timdonovanuk avatar Jun 11 '20 09:06 timdonovanuk

Hi folks, we've got some updates to share here from the Teams developer community call. This video walks through how to use an Adaptive Card in an incoming webhook, but please note there is a limitation today with regards to Action.Submit. Take a look at the video for details:

https://www.youtube.com/watch?v=y5pbJI43Zvg

matthidinger avatar Jul 01 '20 23:07 matthidinger

Quick schema reference as used in the video linked from @matthidinger if it helps anyone, it's wrapping the adaptive content in the outermost envelope that got this working for me, then it's basically as described at https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference

{
   "type":"message",
   "attachments":[
      {
         "contentType":"application/vnd.microsoft.card.adaptive",
         "contentUrl":null,
         "content":{
            "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
            "type":"AdaptiveCard",
            "version":"1.2",
            "body":[
               {
                  "type":"ColumnSet",
                  "id":"1ede2aba-61b9-faa0-9895-9ed0c26b2e6f",
                  "columns":[
                     {
                        "type":"Column",
                        "id":"e5756242-0963-37a2-7cb4-4397886d60bb",
                        "padding":"None",
                        "width":"stretch",
                        "items":[
                           {
                              "type":"TextBlock",
                              "id":"20f3833e-0435-5c87-fad1-b528e0046fb6",
                              "text":"Company Name",
                              "wrap":true
                           }
                        ],
                        "verticalContentAlignment":"Center"
                     },
                     {
                        "type":"Column",
                        "id":"74215a26-fa8b-e549-cced-7f99fd34a661",
                        "padding":"None",
                        "width":"auto",
                        "items":[
                           {
                              "type":"Image",
                              "id":"795047e2-e63e-6e14-07ba-5a3e13323dff",
                              "url":"https://amdesigner.azurewebsites.net/samples/assets/PlaceHolder_Person.png",
                              "size":"Small"
                           }
                        ],
                        "horizontalAlignment":"Right"
                     }
                  ],
                  "padding":{
                     "top":"Small",
                     "bottom":"Small",
                     "left":"Default",
                     "right":"Small"
                  },
                  "style":"emphasis"
               }
            ],
            "padding":"None"
         }
      }
   ]
}

dylan-asos avatar Jul 03 '20 12:07 dylan-asos

Official Update:- https://microsoftteams.uservoice.com/forums/555103-public/suggestions/35793883-adaptive-cards-webhooks

rkapoor028 avatar Jul 09 '20 23:07 rkapoor028

Quick schema reference as used in the video linked from @matthidinger if it helps anyone, it's wrapping the adaptive content in the outermost envelope that got this working for me, then it's basically as described at https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference

{
   "type":"message",
   "attachments":[
      {
         "contentType":"application/vnd.microsoft.card.adaptive",
         "contentUrl":null,
         "content":{
            "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
            "type":"AdaptiveCard",
            "version":"1.2",
            "body":[
               {
                  "type":"ColumnSet",
                  "id":"1ede2aba-61b9-faa0-9895-9ed0c26b2e6f",
                  "columns":[
                     {
                        "type":"Column",
                        "id":"e5756242-0963-37a2-7cb4-4397886d60bb",
                        "padding":"None",
                        "width":"stretch",
                        "items":[
                           {
                              "type":"TextBlock",
                              "id":"20f3833e-0435-5c87-fad1-b528e0046fb6",
                              "text":"Company Name",
                              "wrap":true
                           }
                        ],
                        "verticalContentAlignment":"Center"
                     },
                     {
                        "type":"Column",
                        "id":"74215a26-fa8b-e549-cced-7f99fd34a661",
                        "padding":"None",
                        "width":"auto",
                        "items":[
                           {
                              "type":"Image",
                              "id":"795047e2-e63e-6e14-07ba-5a3e13323dff",
                              "url":"https://amdesigner.azurewebsites.net/samples/assets/PlaceHolder_Person.png",
                              "size":"Small"
                           }
                        ],
                        "horizontalAlignment":"Right"
                     }
                  ],
                  "padding":{
                     "top":"Small",
                     "bottom":"Small",
                     "left":"Default",
                     "right":"Small"
                  },
                  "style":"emphasis"
               }
            ],
            "padding":"None"
         }
      }
   ]
}

This one worked like a charm. Wrapping it in the type Message and attaching it in the attachments. However, I tried passing array of adaptive cards in it, but it displayed only one.

thechandanbhagat avatar Jul 15 '20 11:07 thechandanbhagat

Here is the documentation on Send adaptive cards using an incoming webhook.

Wajeed-msft avatar Aug 17 '20 05:08 Wajeed-msft

I wanted to know whether the incoming webhook for teams and adaptive cards support the @mention feature in Teams? I have gone through some articles regarding this. How can one find the 8:orgid:{org-ID-of-the-user} and more importantly what is this? Can someone help?

jishwin13 avatar Mar 22 '21 11:03 jishwin13

Currently incoming webhook does not support @mention feature. Also why you need 8:orgid? could you please share more info?

Nikitha-MSFT avatar Mar 25 '21 07:03 Nikitha-MSFT