Search code examples
c#botframeworkmicrosoft-teams

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


I am developing a bot with Microsoft BotFramework and currently using it in Microsoft Teams.

When bot sends an adaptive card, Microsoft Teams notification text is always the same, "Bir kart gönder" in Turkish language, and English translation is probably "Sent a card".

Is there any way to modify this text?

Some notifications are important and should be taken care immediately, and some are not. If i may change the notification text, my users won't have to open the conversation to see notification for all messages.


Solution

  •  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 Bot 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.

    enter image description here

    enter image description here