Search code examples
c#botframeworkbotsmicrosoft-teams

How to induce "See More" for long Bot responses in MS Teams


I have a bot built with C# and Bot Framework v3 deployed in Azure and loaded into MS Teams. The bot retrieves task info from Azure DevOps and Jira per user request and sends various field values back to the channel. The issue is that some fields like Description can have fairly long values come back showing as a page of text in MS Teams.

When the bot is being interacted with inside a team the "See More" function hides long responses until clicked. "See More" does not show when the bot is being interacted with inside a private chat.

Is there a way to induce something like "See More" to hide part of the display of long responses in a private chat?

I looked on SO and google and couldn't find where anyone was controlling the "See More" functionality.


Solution

  • This Teams feature is not available in the UI for one-on-one conversations. If you want to implement your own bot-based solution then you have a few options:

    1. If you want to only send the text a little at a time then you can put a messageBack button at the end of a section and then have that button send a message to the bot that the bot can respond to by sending the next section to the user. The bot may have to store the remaining sections of the message in its bot state, or you may include that data in the button's payload.
    2. If you want the text to be collapsible as well as expandable then you should put it in a ShowCard action in an Adaptive Card.
    3. If your only concern is taking up too much vertical space then you can make the text scroll horizontally by splitting it into the cards of a carousel.