I have a card with input choice set of options a,b,others.
If users selects option as "others" then an extra input text block should come below the choice set.
How can we achieve this in microsoft teams bot framework using adaptive cards?
Related
I have implemented a requirement where i need to post a adaptive card from Power automate to a user through Flow bot and get response to log it.
But after clicking on "Submit" original adaptive card is lost and response card is getting displayed.
Is there any way by which we can retain the original card after response.
Original card:
Card after submitting comments:
It is by design and it is not possible to retain the original card after response. In the attached screenshot you can see there is no option to retain the original card in the flow.
Based on the value of a question submitted in a Microsoft Form, I want to send an adaptive card to one or more people via Teams. I think I have the end steps figured out. I have the adaptive card nested within an Apply to each action. The Recipient of the adaptive card is set to the Current item of the Apply to each, and the selection on the Apply to each is the output from a variable.
That variable is where I'm hung up. I'm currently using an if formula to calculate the email addresses. This is probably where I need help.
if(equals(outputs('Get_response_details')?['body/r43d6bce2bb684bf79bff6d8c61fb8f9c'],'Finance'),'josh#.com',if(equals(outputs('Get_response_details')?['body/r43d6bce2bb684bf79bff6d8c61fb8f9c'],'Sales Operations'),'robby#.com','josh#.com'))
You can send adaptive cards to team/group/1:1 by getting user id / channel id.please check this docs
With the "Post an adaptive card" action in Flow / Power Automate -> Microsoft Teams there's the option to specify an "update message" following the user response to the card.
How can I access the data inputs and the submitActionId for use in this message?
The use case is as follows:
user receives the card and enters data into a textfield.
user clicks one of two buttons (similar to "approve" and "reject")
(what I want to do:) card is updated to show what text the user entered and which button was pressed.
I can access other dynamic data that have been created by previous actions in the "update message" field. But the output of this adaptive card action itself is not available "within" the action, not by normal means anyway. Later in the flow it's necessary to parse the JSON output of this action.
Supplementary question: Is it possible to style the "update message". Currently it appears all bold.
Supplementary info: the "update message" field does not appear to accept another adaptive card (would have been logical...). If I enter adaptive card json there, it just gets spat back out literally in Teams.
I m showing a list of users in a card, can I add a scrollbar to the card so that it fits the screen size?
I am currently using Adaptive card 1.0 and sending this card to MS Teams.
AdaptiveCards do not allow scrolling or paging.
If you want to implement paging you could add a "next page" button to your card, when pressed you just update the card with the new list data.
MS Teams allows you to update cards/message you already sent so you could send the first page and when a user clicks on the action button you sent the second page etc.
AdaptiveCards do not have the ability to specify scrolling.But we can do with Carousel feature.
{
attachmentLayout: Attacenter code herehmentLayoutTypes.Carousel,
attachments: [CardFactory.adaptiveCard()]
}
AdaptiveCards do not have the ability to specify scrolling. It would be up to the client to implement this functionality. However, you may be able to send a list card, depending on if it suits your needs.
I'm trying to create a bot, where users are able to select an option from an adaptive card, or type it in. So I am currently displaying a carousel of adaptive cards, and then using a text prompt for a possible input.
Unfortunately, since I'm using a prompt, when I click an action from the card, I get an "I don't understand" output from the bot, as it is expecting a user input.
Is there any way to achieve this?
I am currently displaying a carousel of adaptive cards, and then using a text prompt for a possible input.
I do a test and can reproduce the issue on my side. I assume that you call PromptDialog.Text method after you send an adaptive card to client for collecting user inputs, the PromptDialog.Text would expect a string, if you directly enter the input filed(s) and submit it to bot, it will send back a Activity message with your input value, which would throw "I don't understand" message and let you retry again.
If you provide a string before you enter input field(s) and submit it, your bot should work as expected.