cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Post an Adaptive Card and wait for a response

When you use a "Post an Adaptive Card and wait for a response" task in Flow in conjunction with dynamic data the return values are not available.  You can bypass this by putting your dynamic data in after you have set up future tasks, but this is somewhat annoying.  See below for examples to better explain what I mean.

 

Using static content, no problem!

static.PNG

 

Using dynamic content, bit of a problem!

dynamic1.PNG

 

Dynamic content workaround, still annoying!

dynamic2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Grimaldi,

 

It is a known issue that the following action couldn't get a dynamic content return if the adaptive card combines with dynamic content, to solve this problem, there are two workaround:

One is using the expression to get the output of Post an Adaptive Card to a Teams channel and wait for a response action, such as I want to get the response time, the expression should be:

outputs('Post_an_Adaptive_Card_to_a_Teams_channel_and_wait_for_a_response')?['body/responseTime']

Screenshot 2020-09-22 140701.jpg

 

The other one is using Parse JSON action:

{
    "type": "object",
    "properties": {
        "headers": {
            "type": "object",
            "properties": {
                "Accept-Encoding": {
                    "type": "string"
                },
                "Host": {
                    "type": "string"
                },
                "client-request-id": {
                    "type": "string"
                },
                "x-ms-activity-vector": {
                    "type": "string"
                },
                "Content-Length": {
                    "type": "string"
                },
                "Content-Type": {
                    "type": "string"
                }
            }
        },
        "body": {
            "type": "object",
            "properties": {
                "responseTime": {
                    "type": "string"
                },
                "responder": {
                    "type": "object",
                    "properties": {
                        "objectId": {
                            "type": "string"
                        },
                        "tenantId": {
                            "type": "string"
                        },
                        "email": {
                            "type": "string"
                        },
                        "userPrincipalName": {
                            "type": "string"
                        },
                        "displayName": {
                            "type": "string"
                        }
                    }
                },
                "submitActionId": {
                    "type": "string"
                },
                "data": {
                    "type": "object",
                    "properties": {
                        "x": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    }
}

Screenshot 2020-09-22 140059.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @Grimaldi,

 

It is a known issue that the following action couldn't get a dynamic content return if the adaptive card combines with dynamic content, to solve this problem, there are two workaround:

One is using the expression to get the output of Post an Adaptive Card to a Teams channel and wait for a response action, such as I want to get the response time, the expression should be:

outputs('Post_an_Adaptive_Card_to_a_Teams_channel_and_wait_for_a_response')?['body/responseTime']

Screenshot 2020-09-22 140701.jpg

 

The other one is using Parse JSON action:

{
    "type": "object",
    "properties": {
        "headers": {
            "type": "object",
            "properties": {
                "Accept-Encoding": {
                    "type": "string"
                },
                "Host": {
                    "type": "string"
                },
                "client-request-id": {
                    "type": "string"
                },
                "x-ms-activity-vector": {
                    "type": "string"
                },
                "Content-Length": {
                    "type": "string"
                },
                "Content-Type": {
                    "type": "string"
                }
            }
        },
        "body": {
            "type": "object",
            "properties": {
                "responseTime": {
                    "type": "string"
                },
                "responder": {
                    "type": "object",
                    "properties": {
                        "objectId": {
                            "type": "string"
                        },
                        "tenantId": {
                            "type": "string"
                        },
                        "email": {
                            "type": "string"
                        },
                        "userPrincipalName": {
                            "type": "string"
                        },
                        "displayName": {
                            "type": "string"
                        }
                    }
                },
                "submitActionId": {
                    "type": "string"
                },
                "data": {
                    "type": "object",
                    "properties": {
                        "x": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    }
}

Screenshot 2020-09-22 140059.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (38,897)