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

  • Thread starter Thread starter Sai_Teja_Nagamothu
  • Start date Start date
S

Sai_Teja_Nagamothu

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

Like shown below:

large?v=1.png

large?v=1.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:

large?v=1.png

And in notification:

large?v=1.png

Continue reading...
 
Back
Top