Forum Discussion
Kzawadka
Dec 29, 2020Copper Contributor
Unfurlink Link (Adaptive card) in
Hello We try to return an adaptive card to the Microsoft Teams message area after pasting a URL in the MS Teams message area as shown https://github.com/microsoft/BotBuilder-Samples/blob/ddab761d5bb...
PaulJereb
Jul 22, 2021Copper Contributor
Kzawadka I found the following solution: apparently the attachment requires a preview defined when returning an Adaptive Card.
Here a snipped how it works in Javascript:
const adaptiveCard = CardFactory.adaptiveCard(card);
const heroCard = CardFactory.heroCard("card title", "card text");
const attachment = {
contentType: adaptiveCard.contentType,
content: adaptiveCard.content,
preview: heroCard
}