cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anthonys123
Helper III
Helper III

"Post an adaptive card to a Teams user and wait for a response" no longer available. Can't edit adaptive card.

I started this flow a while back and need to expand on it. The action I've used before is no longer available, or has changed significantly. What's the work around for this and why is it far more difficult now than it used to be? Is Edit Adaptive Card permanently removed from PowerAutomate? (Totally not cool!)

 

Screen Shot 2021-10-05 at 9.16.09 AM.png

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.2",
    "body": [
        {
            "type": "TextBlock",
            "weight": "Bolder",
            "size": "ExtraLarge",
            "text": "An Employment Application has been submitted!",
            "color": "Attention"
        },
        {
            "type": "TextBlock",
            "text": "Hey Anthony,  \n{$root.First} {$root.Last} just submitted a new Employment Application. ",
            "isSubtle": true,
            "wrap": true
        },
        {
            "type": "TextBlock",
            "text": "DETAILS \n\nName: {$root.First} {$root.Last}\n\nPhone: {$root.Mobile}\n\nEmail: {$root.Email}"
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "Cool",
            "id": "cool"
        },
        {
            "title": "Not Cool",
            "type": "Action.Submit",
            "id": "notcool"
        }
    ]
}

 

3 REPLIES 3
gabibalaban
Super User
Super User

@anthonys123 ,

Build your adaptive card inside message property and  replace the variables from adaptive card with your powerautomate values (directly in message).

Remove from message :

{$root.First} 

and replace it with: 

outputs('YourActionForName')['body'] and so on ....

 

Hope it helps !

Yes. Of course Microsoft's solution to complexity is to make things more difficult...  

Thank you for the help. The correct expression seems to be @{outputs('Action_Name')} which you either need to know in your head or you can compose the expression and copy/paste it into the JSON. Not hard, but not intuitive or easy either. 

 

Using outputs('YourActionForName')['body'] resulted in an error.  

Unable to process template language expressions in action 'Post_adaptive_card_and_wait_for_a_response' inputs at line '1' and column '31415': 'The template language expression 'outputs('First_Name')['body']' cannot be evaluated because property 'body' cannot be selected. Property selection is not supported on values of type 'String'. Please see https://aka.ms/logicexpressions for usage details.'.

Yes ... I forgot to say that you need the expression tab from dynamic content to write the formula starting with outputs, but you get the catch. From my point of view is useful to see the entire code behind the adaptive card and I like the idea, so it's all about preferences. 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,246)