简体   繁体   中英

Using MS Teams, Power Automate and Adaptive Cards: how to use inputs from user using the Flow Bot to use in another Adaptive Card

I'm trying out Powerapps and would like to try out this low code approach.

The idea is as follows:

  1. Display an Adaptive Card ( going to use the sample one ) to the user using Microsoft Flow/Power Automate application within Teams.
  2. The user would then input some information on the card and submit it
  3. Use that input that was submitted to populate another Adaptive Card.

To illustrate the above, in Power Automate: 显示如上所述的三个步骤

Here is how the output is displayed when used in the Schema Explorer for Action.Submit : 我想获得在弹出窗口中显示的输出,以便 Flow 机器人在 Teams 中的另一张自适应卡上输入

In Microsoft Teams, the Flow bot will display the ticket to the user to be filled in: 在此处输入图片说明

How can I get the values from the inputs and reuse them in Power Automate. Does anyone know how to get those values and reuse in the next step (see first image) ?

Thank you in advance for your assistance. Would appreciate any help.

Basically, the problem is that the "submit" action of the Adaptive Card returns the response to the original source, in this case the "Flow Bot". However, Flow Bot is a general bot, and doesn't have a way to route the response back to your individual Flow, and specifically to the instance of the Flow. Thankfully, this is changing - see here for information. It's not clear from the post whether it will handle the "Bot-to-user" scenario in version 1 though, which I see you use in your solution, and also, as stated in the blog, it's only expected in Feb. So, it would seem there are two options:

  1. Wait till Feb for the new feature
  2. Create your own Bot to send the cards from, and handle the responses - there are a few small tricky parts here as you need to send the initial message on a schedule, so you'd be using something called "pro-active messaging", but it's not too complex and something there's good guidance on here in Stack Overflow (I've myself answered a few questions recently on it so can help more if you go this route)

Not an ideal answer I'm sure you were looking for, but hopefully it helped

@Carike, There is one more way you can implement this scenario is by handling all your action of adaptive card submission event in different flow. You can set the trigger as "When HTTP request received" for the second flow. When you set this trigger, you receive one url - which you can set as the submit URL of the first flow's adaptive card.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM