Buttons in MS Teams

Hello everyone, I’m trying to implement rasa chatbot to MS Teams. At this point I am running rasa on local computer with ngrok. I connected my bot to microsoft bot service and succesfuly added to MS Teams. Is there any possibility to show buttons in MS Teams? Because for now, when there is response with buttons I’m getting the info in teams “the contents of this tab cannot be displayed”.

I just found a solution. Added type: "postBack" to the button and it’s working. Is there anything about type of button in the docs?

I used this format here which worked:

buttons = [{“type”: “messageBack”, “title”: title, “displayText”: title, “text”: payload}]

displayText is optional, but lets you decide what message is sent on behalf of the user when the button is clicked. In my case, sending a message containing the intentions and entities disrupted the flow of the conversation so I decided to echo the title of the button instead.

Using value to send the payload didn’t capture my entities properly but using text did the trick.

Reference: Add card actions in a bot - Teams | Microsoft Learn

1 Like