Cannot display more than 6 adaptive actions in an Adaptive card in Teams

Viewed 944

I am new to bot framework and c# - we implemented a bot using a QnA maker knowledge base. I am trying to use adaptive cards with Adaptive Submit Actions.

Everything works perfectly in the WebChat, however in Teams I cannot display more than 6 submit actions at the same time...

Please find a test code below:

        var demoActionList = new List<AdaptiveAction>();

        for (int i=0; i<20; i++)
        {
            demoActionList.Add(
                   new AdaptiveSubmitAction()
                   {
                       Type = "Action.Submit",
                       Title = "title + "+i,
                       Data = new QnABot.Dialog.MsTeamsDataResponseWrapper() { MsTeamsResponse = new QnABot.Dialog.MsTeamsResponse() { Value = "title + " + i } }
                   });
        }

        var plCard = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0));

        plCard.Actions = demoActionList;

        var attachment = new Attachment()
        {
            ContentType = AdaptiveCard.ContentType,
            Content = plCard
        };

        chatActivity.Attachments.Add(attachment);

If I run this code in the webchat I will see all the 20 submit actions in the adaptive cards, however in ms teams I see only 6

Please see the example with teamsexample with teams, and the example with the webchat example with the webchat

Any idea how to display all the submit actions in the card with ms teams?

2 Answers

This is a known hard limit in Teams right now - see this answer from someone at Microsoft not long ago: Can I show more than one button/option in teams using cards? which includes some suggested workarounds.

update: I'm also wondering if list cards might be of interest - it would look a bit similar to the web chat example you showed above - basically a long list of options.

Related