How to change notification text when bot sends an adaptive card in Microsoft Teams?

This post has been republished via RSS; it originally appeared at: IIS Support Blog articles.

When bot sends an adaptive card, Microsoft Teams notification sent a "Sent a card" message.

Like shown below: 

Capture.PNG

Capture.PNG

To send custom summary in place of "Sent a card" edit following values... 

 

var response = MessageFactory.Text(string.Empty); response.Attachments.Add(cardAttachment); response.Summary = "showing custom greeeting from the Bot - rather than a card"; await turnContext.SendActivityAsync(response, cancellationToken);

 

Once we add a summary as shown, it will not show "sent a card" message in teams and even in the notification we'll not see "sent a card", we'll get a summary message. 

 

Result: 

Capture.PNG

And in notification: 

Capture.PNG

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.