cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Post an Adaptive Card and wait for a response

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
Highlighted
Community Support
Community Support

Re: Post an Adaptive Card and wait for a response

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Users online (6,882)