Workaround for Dynamic Output Missing Issue in Post Adaptive Card Action

Introduction

Adaptive Cards are a way in which Developers can exchange data and content in a common way and the JSON payload used for creating the card can be used in any device or UI Framework. In addition to that, there are no programming requirements for building these cards as the structure is completely defined by JSON (JavaScript Object Notation).In addition to it, we can style the card in a standard way so that it appears consistently across different platforms.

We can use the adaptive card designer to design the JSON for the adaptive card.

Graphical user interface, text, application, email

Description automatically generated

Problem

Once we have created the JSON and use it along with action – “Post Adaptive Card and wait for a response”, it will post the JSON to Teams and wait for User input which we can use within the Power Automate for further processing. In the below card that was sent from flow, it is waiting on user input “Approved Bid Value”.

Graphical user interface, application

Description automatically generated

When the value is entered and Approve Procurement Bid is clicked, the data would be sent back to Power Automate for subsequent actions.

Graphical user interface, text, application, Teams

Description automatically generated

In the flow, we have defined the rest of the action that would capture the value from the card as:

A picture containing graphical user interface

Description automatically generated

However, when we try to capture the dynamic content sent back from the card using a variable action, we don’t see the output values from the action “Post adaptive card and wait for response” but we can see the rest of the dynamic values in the right panel:

Graphical user interface, application

Description automatically generated

Solution

After a bit of research, to my surprise, found that the issue has been caused due to the presence of dynamic content in the “Post adaptive card and wait for response” action. Here we have used a couple of dynamic values from previous actions to formulate the JSON syntax of the card.

Graphical user interface, application

Description automatically generated

So as to fix the issue, temporarily remove the dynamic content from the Post to teams action as below:

Graphical user interface, text, application

Description automatically generated

This will start showing up the dynamic content outputs from the Post to team action as below

Graphical user interface, text, application, email

Description automatically generated

We will then update back the values that we removed in the Post to team action as:

Graphical user interface, text, application

Description automatically generated

This is kind of a dirty hack to resolve the issue but gets the job done.

Note: This workaround is needed as of Nov 2021 when we are writing the article and in future Power Automate releases, this issue may be worked upon by the MS engineering team.

Summary

Thus we saw an issue with the Dynamic Content Population of the “Post adaptive card and wait for response” action and how we can work around it with a quick and dirty hack.

Related Articles

Author

Author

Priyaranjan KS is a Modern Workplace Architect primarily focused on developing and architecting solutions around Office 365,Power Platform and Azure.He is also a Microsoft Most Valuable Professional(MVP) and a Microsoft Certified Trainer(MCT)

Latest Articles