Microsoft Tech Community Live:  Microsoft Teams Edition
November 09, 2021, 08:00 AM - 12:00 PM (PST)

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

%3CLINGO-SUB%20id%3D%22lingo-sub-2773618%22%20slang%3D%22en-US%22%3EHow%20to%20change%20notification%20text%20when%20bot%20sends%20an%20adaptive%20card%20in%20Microsoft%20Teams%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2773618%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20are%20sending%20adaptive%20cards%20to%20bot%20window%20of%20end%20users.%3C%2FP%3E%3CP%3EThe%20notification%20pop%20up%20showing%20%22Sent%20a%20card%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20would%20like%20to%20update%20it%20with%20custom%20message.%20We%20are%20using%20C%23%20to%20build%20the%20application.%3C%2FP%3E%3CP%3EPlease%20refer%20below%20snippet%2C%20where%20we%20tried%20the%20%22Summary%22%20property.%20But%20it%20did%20not%20fix%20our%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Evar%20connectorClient%20%3D%20new%20ConnectorClient(new%20Uri(serviceUrl)%2C%20credentials)%3B%3CBR%20%2F%3Evar%20response%20%3D%20MessageFactory.Attachment(new%20List%3CATTACHMENT%3E()%20%7B%20GetCardAttachment()%20%7D)%3B%3CBR%20%2F%3Eresponse.Summary%20%3D%20%22Custom%20Message%22%3B%3CBR%20%2F%3Eawait%20connectorClient.Conversations.SendToConversationAsync(conversationId%2C%20(Activity)response)%3B%3C%2FATTACHMENT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKindly%20suggest%20how%20to%20update%20the%20notification%20message.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2773618%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBots%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECommunity%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EConversations%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESettings%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2780792%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20change%20notification%20text%20when%20bot%20sends%20an%20adaptive%20card%20in%20Microsoft%20Teams%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2780792%22%20slang%3D%22en-US%22%3EIn%20browser%20am%20getting%20the%20customised%20message.%20but%20in%20MS%20Teams%2C%20it%20is%20not%20showing%20the%20message.%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi All,

 

We are sending adaptive cards to bot window of end users.

The notification pop up showing "Sent a card".

 

We would like to update it with custom message. We are using C# to build the application.

Please refer below snippet, where we tried the "Summary" property. But it did not fix our issue.

 

var connectorClient = new ConnectorClient(new Uri(serviceUrl), credentials);
var response = MessageFactory.Attachment(new List<Attachment>() { GetCardAttachment() });
response.Summary = "Custom Message";
await connectorClient.Conversations.SendToConversationAsync(conversationId, (Activity)response);

 

Kindly suggest how to update the notification message. 

2 Replies
In browser am getting the customised message. but in MS Teams, it is not showing the message.

I have the same issue - also we've used 'Summary' previously and that worked fine. Although some time ago it just stopped. 

 

I guess something has changed in client / backend? The summary is shown correctly in teams window but when notification comes and gets displayed in the corner - it again reverts back to 'Send a card'

 

Can you please advise what can be done? Seems like summary filed is either no longer properly respected.

 

Thanks