Handle responses from Adaptive Cards in Microsoft Teams using different cloud flow

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • That's a hot new functionality, still available only in preview environments ( docs.microsoft.com/en-us/powe... )!
    It allows you (FINALLY!) to send Adaptive Card to Microsoft Teams using one cloud flow and then handle the responses from that card using another flow. Thanks to that, you're able to overcome the 30 days waiting limit plus start building awesome business solutions!
    Still waiting for more actions, like the one which would allow us to update an Adaptive Card using the second cloud flow, and I hope they will arrive to complete this jigsaw puzzle.
    Chapters:
    0:00 Intro
    2:28 Posting Adaptive Card to Teams
    5:33 New trigger for MS Teams: When someone responds to an adaptive card
    7:30 Bind response with listener - Card Type Id
    9:00 Working solution
    10:32 What am I still missing in this jigsaw puzzle?
    12:40 Wrap up

Komentáře • 64

  • @soyebmalek1536
    @soyebmalek1536 Před 2 lety +2

    Great video ! I was looking for this feature as standard from Action in Power Automate.
    Thank you for sharing this

  • @fzawadi
    @fzawadi Před 2 lety +1

    Great Info and hopefully in the future it will improve. Thanks 👍

  • @francescopatella30
    @francescopatella30 Před rokem +1

    Great Video! Is it possible to explain what was inserted into the First function?

  • @Kranis86
    @Kranis86 Před rokem

    @TomaszPoszytek Thanks for a great video! I can´t however grab the response value from the user in the response flow (when someone responds to an adaptiv card). Flow is triggered, but the cardOutputs property is empty. Any idea why?

    • @TomaszPoszytek
      @TomaszPoszytek  Před rokem

      Oh, there may be many reasons. For example, you are referencing wrong ID in the response body - not related to a field, that you want to send data from. Or that it is not escaped. Or, or or :)

  • @SteveRist
    @SteveRist Před rokem

    Hi Thomasz. Really useful video and a great pattern. Unfirtunatley ( and I think this is a common issue) the flow that is triggered by"When someone responds to an adaptive card" doesn't fire for me even though the adaptive card json and Card Type Id are the same as in teh invoking flow. I also note that we can now update a card.

    • @TomaszPoszytek
      @TomaszPoszytek  Před rokem +1

      Remember it has to be created in a default environment and not in a solution...

    • @martinvasek2081
      @martinvasek2081 Před rokem +3

      @@TomaszPoszytek Wow, this is confusing from Microsoft. Just to clarify more, default envitonment is really "default environment of your company" (!). It can't even be created out of solution in enviroment of your project/department/division etc. Very strange and this should be written somewhere with huge text and 10times underlined :-))... took 3 hours of my life.

  • @JordanMatas
    @JordanMatas Před 6 měsíci

    Hi Thomasz !
    Thank you for this helpful video.
    IS there a way to "listen" an updated adaptive card ? I don't figure out how to pass the Card Type Id to the action "Update an adaptive card in chat or channel".
    Thanks !

    • @TomaszPoszytek
      @TomaszPoszytek  Před 6 měsíci

      The Card Type Id is for the trigger "When someone responds to an Adaptive Card": czcams.com/video/2ZHv0l_6W5Q/video.html&ab_channel=TomaszPoszytek

  • @chareunsritwila
    @chareunsritwila Před rokem

    Hello Tomasz, Not sure if you noticed that now there is no 'Card Type ID' field under Post adaptive card to chat or Channel task. it has changed to "hosted Contents". Do you know how should we do now? Thanks!

    • @chareunsritwila
      @chareunsritwila Před rokem +1

      Resolved it after read others' comments, changed to send through flowbot then the Card Type ID appears and it works perfect. Thanks a lot for the video and guidance.

    • @TomaszPoszytek
      @TomaszPoszytek  Před rokem

      Glad you made it work ☺️

  • @divyakabra734
    @divyakabra734 Před rokem

    Hi Tomasz,
    Nice info. Will this work if adaptive card is posted through microsoft graph API?

  • @LauraLuisaRosenberg
    @LauraLuisaRosenberg Před rokem

    Hello, I still have problems with the trigger "When someone responds to an adaptive card". If I click on the card myself, the flow is triggered, if another user clicks on this card then not.
    The flows are both in the default. I don't understand why it doesn't respond to the others' responds?Maybe someone can help me?

    • @TomaszPoszytek
      @TomaszPoszytek  Před rokem

      As far I know the trigger is still in preview. Maybe this is the reason. Basically it should let you get responses to the card that was sent by you, but completed by anyone else.

  • @abinayamuthusamy7479
    @abinayamuthusamy7479 Před 2 lety

    Hello, great video. I have a logic app in azure environment with a adaptive card .And the response adaptive card is in power automate. Will it still work ? Or does both have to be in power Automate ? Because when I run the logic app in azure, it says error “ environment id is null or empty “. Could you kindly give your input ?

    • @TomaszPoszytek
      @TomaszPoszytek  Před 2 lety

      Thanks! Which action is in Power Automate and which in Logic Apps?

    • @abinayamuthusamy7479
      @abinayamuthusamy7479 Před 2 lety

      @@TomaszPoszytek I haven’t got notifications of your reply. Thank you for replying back. The response is in power automate ( the one you have explained ) and the trigger is in logic app( where it post the adaptive card with card type id same as in the one in power automate ). I get environment id null or empty. Thank you again

    • @TomaszPoszytek
      @TomaszPoszytek  Před 2 lety

      @@abinayamuthusamy7479 well since it is triggered from Logic Apps there's no environment context, so that doesn't surprise me...

    • @abinayamuthusamy7479
      @abinayamuthusamy7479 Před 2 lety

      @@TomaszPoszytek is there anyway to make it work ?

    • @TomaszPoszytek
      @TomaszPoszytek  Před 2 lety

      @@abinayamuthusamy7479 i don't know tbh. Maybe some kind of workaround is to create a cloud flow triggered by http and use it from your logic app, to actually post Adaptive Card?

  • @homerggg2
    @homerggg2 Před 8 měsíci

    In the latest Power Automate version, the "When someone reply to an adaptive card" trigger now has a Body property and no "Card Type Id" property. But there is a new tab called Parameters and there's a Tracking Id in that tab. Is that the field we need to use in place of "Card Type Id" ?

    • @TomaszPoszytek
      @TomaszPoszytek  Před 8 měsíci

      Nope, that unfortunately seems to be a bug of the new PA designer :( When you switch to the old version all is in place.

    • @cikforest7136
      @cikforest7136 Před 10 dny

      @@TomaszPoszytek This haven't been fix yet, right? Still need to use old PA design

  • @rjjalosjos9454
    @rjjalosjos9454 Před 11 měsíci

    How do you close the adaptive card when submit is pressed? It's very weird that it stays in the teams chat.

    • @TomaszPoszytek
      @TomaszPoszytek  Před 11 měsíci

      Using the "Reply with Adaptive Card in a channel". Unfortunately you can't make it in a private conversation with user.

  • @kirankumar-ux2he
    @kirankumar-ux2he Před 2 měsíci

    Hi Tomasz Thanks for sharing the amazing content, but why is it only functioning in the Default Environment? Even after so many years, this trigger hasn't been upgraded to Dev and Production Environments.

    • @TomaszPoszytek
      @TomaszPoszytek  Před 2 měsíci

      Yes, exactly. But as for the reason - I really have no idea.

  • @kakis57
    @kakis57 Před rokem

    Hello. I am wondering if you can help me as i am desperate.
    I have a bot posting the adaptive card to a user. However when the user clicks submit, I get the error "the initiator is not a member of the roster in the generic thread".
    I believe that happens because the Flow bot initiates the chat with the user and when I try to update the card i use my own account so i get the above error.
    Do you have any workarounds for that? Thank you in advance!!
    Great videos!

    • @TomaszPoszytek
      @TomaszPoszytek  Před rokem

      Thank you. As per the solution - maybe the childflow, that runs using specific account, would be a solution, so that always a card and the update will happen using the same account?

  • @user-qy2os7ol7g
    @user-qy2os7ol7g Před 6 měsíci

    Great video. One note on language: "mustn't" in English is very categorical (pl nie może). It is not the same as "doesn't have to" (pl nie musi).

  • @InsaneFilms
    @InsaneFilms Před 4 měsíci

    Tomasz- You mentioned you were hoping that MS comes up with new actions to update/refresh the card. Have they done that yet? Thanks

    • @TomaszPoszytek
      @TomaszPoszytek  Před 4 měsíci

      Yes, there is such an action. It allows you to update a card, and must be used in combination with trigger „when someone responds to adaptive card”.

    • @TomaszPoszytek
      @TomaszPoszytek  Před 4 měsíci

      FINALLY! Learn how to update (or replace) an Adaptive Card sent to Microsoft Teams
      czcams.com/video/2ZHv0l_6W5Q/video.html

  • @kyleadammason
    @kyleadammason Před 8 měsíci

    Hello Tomasz, maybe you can help me. I created a card in the card designer to get a text string response. In my card I put some dynamic content but when I use the cards code in the listener trigger I get an error. Do you know if dynamic content is allowed to be used in the post card and in the listener card? After removing the dynamic content it works fine but that limits the trigger since I would need to have more entry data into the card. Any suggestions are welcome. Thank you.

    • @TomaszPoszytek
      @TomaszPoszytek  Před 8 měsíci

      Do you mean the „when someone responds to an adaptive card” trigger? If yes, then you can’t put any dynamic content there.

    • @kyleadammason
      @kyleadammason Před 8 měsíci

      @@TomaszPoszytek yes, I found that out. For anyone having the same issue just paste the card design in the listener trigger and then delete the dynamic content and it works fine. I didn't know if they had to match perfectly for it to work.

    • @JakobElfner
      @JakobElfner Před 6 měsíci

      @@kyleadammason Were you able to work with the dynamic content afterwards in other actions? For me, it does not work out :/

    • @kyleadammason
      @kyleadammason Před 6 měsíci

      @@JakobElfner yes I was. I think the only thing you can really work with are items from the card output section. You can always add things to that by adding data to buttons using the adaptive card designer tool. The format for data goes like this " "title": "data" ". Use this in your card that is being sent and it should show up as something you can use in your listening card.

  • @momosworkshop
    @momosworkshop Před 2 lety

    What if I'm not able to see the "show advanced options" on my post action? Can I set the ID another way?

    • @TomaszPoszytek
      @TomaszPoszytek  Před 2 lety

      No, unfortunately not. It means that the update possibly haven't reached your tenant yet.

    • @momosworkshop
      @momosworkshop Před 2 lety

      I noticed that if I post the card as flow bot I do get the option, but not if I post as a user.

    • @TomaszPoszytek
      @TomaszPoszytek  Před 2 lety

      @@momosworkshop ah yes. This option is only available when you post it as flow bot.

    • @momosworkshop
      @momosworkshop Před 2 lety

      @@TomaszPoszytek it's unfortunate because my enterprise doesn't give access to posting as flow bot, so it really limits what I'm able to do with adaptive cards

    • @TomaszPoszytek
      @TomaszPoszytek  Před 2 lety

      @@momosworkshop oh how's that possible? Can this be limited? I didn't know.

  • @mariome3178
    @mariome3178 Před rokem

    Doens't work for me unfortunately. As soon as I set the Card Type ID I get error "Environment id is null or empty" :(

  • @ashleysummerell7583
    @ashleysummerell7583 Před rokem

    Hi Tomasz, hoping you can help, i have copied your part of the adaptive card JSON underneath the Action.Submit for the hidden data, i know in yours you have the Team and Channel ID, in mine im looking to carry through a SharePoint list ID so i can update a row in a SharePoint list with outputs from the adaptive card but i cant seem to find it on the second cloud flow
    Original Card when input is given
    {
    "type": "ActionSet",
    "id": "ActionSet2",
    "actions": [
    {
    "type": "Action.Submit",
    "title": "Submit",
    "associatedinputs": "auto",
    "style": "positive",
    "data": {
    "ListID": "@{outputs('Create_item_2')?['body/ID']}"
    }
    }
    ]
    }
    Outputs i get from the second flow triggered when there is a response to the adaptive card which is from my input.text box
    },
    "cardOutputs": {
    "inputComments": "Test Comments"
    }

    • @TomaszPoszytek
      @TomaszPoszytek  Před rokem

      Remember to include headers and authentication properties. This may be the reason.

    • @JakobElfner
      @JakobElfner Před 6 měsíci

      Did you find a solution? I am having the same issue.

  • @davymoyon6893
    @davymoyon6893 Před rokem

    Does anyone get a "Unable to reach app. Please try again" when trying to submit the response in Teams?

  • @godeleinpatrick
    @godeleinpatrick Před rokem

    hey there, why aren't you showing and explaining the expression you are using and filter area ?

    • @TomaszPoszytek
      @TomaszPoszytek  Před rokem

      Which step is unclear?

    • @godeleinpatrick
      @godeleinpatrick Před rokem

      @@TomaszPoszytek I see you were using the expression First() yet you never explained that clearly. My advice is that you should always time to expand and explain each step.