Closed miguelc1221 closed 4 months ago
Thanks, @miguelc1221, for giving it a try! The type
is correctly set to AdaptiveCard,
so it's weird that it is returning that error in your environment. Something may be wrong with the card data itself.
I just released version 0.0.3
, where you can set the debug
property on the reporter to true.
Once you enable the debug mode, it will pass the card to the console. Would you be able to pass me this card JSON so I can validate it on my end?
@estruyf I'll post it when I have some time but also want to add, I think it may be something wrong with the webhook endpoint because i forked playwright-msteams-reporter
in order to debug and I would get the same error response even when using the following payload from https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using?tabs=cURL%2Ctext1, the messageCard example works fine though.
{
"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": "TextBlock",
"text": "For Samples and Templates, see [https://adaptivecards.io/samples](https://adaptivecards.io/samples)"
}
]
}
}
]
}
@miguelc1221 that's weird indeed. That body should indeed work. How was the webhook created?
I created the webhook following these docs https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=newteams%2Cdotnet. Even though connectors will be deprecated next month https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/
It might be some settings in my orgs team not allowing this or something, i am not sure. I opened an issue to see if they can shine some light on what is happening. https://github.com/MicrosoftDocs/msteams-docs/issues/11222
Seems like the library is working correctly and just an issue on my end. Thanks for trying to look into it!
Thanks for the update! In that case, I'll add the support for the Power Automate too.
There are some minor differences, but not a lot has to be changed.
I just updated the reporter. Support for Power Automate webhooks has been added to version 0.0.5.
Hopefully, they will remove the footer from the card in the future.
Closing the issue as it is not a bug from the reporter.
Tried using this lib but keep running into the following exception when making the request, any ideas?
Currently only passing webhook url
AdaptiveCards.AdaptiveSerializationException: Property 'type' must be 'AdaptiveCard'