How to change notification text when bot sends an adaptive card in Microsoft Teams?
Published Dec 01 2020 08:28 AM 4,148 Views

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

 

 

 

Version history
Last update:
‎Dec 01 2020 08:30 AM
Updated by: