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

Teams Connector: Post an Adaptive Card and Wait for the Response

I'm building a new flow to post an adaptive card to a channel. My only issue is coming from using the experimental features. Apparently you can only use the card editor for the original message card and key/value pairs for data to be replaced. I'm guessing this is supposed to work off the data binding in the Adaptive Cards templating. I can't get the data binding to work and replace the tokens I have in my Card with the dynamic content I'm after.

 

Also if this is expected to be a future release it would be nice to have an option in the settings for the action to turn off the card editor view.

 

How does the Key/Values work can the card editor be turned off (I usually have adaptivecards.io open anyways when I'm working with my cards)

4 REPLIES 4
RoryL
Community Support
Community Support

 

Hi crf2011,

 

Thank you for your post. From the Power Automate perspective, we have some documentation that outlines the data types available for a the various parameters when using the Post Adaptive card action. The documentation can be found here: https://docs.microsoft.com/en-us/connectors/teams/#post-an-adaptive-card-to-a-teams-channel-and-wait.... Based on these details, could you confirm that the dynamic content data type matches the same type in the action as seen in the content? This could cause the dynamic value to not be available when trying to use it in the Flow action.

 

Here's some additional content which talks about using Flows in the context of adaptive cards as well: https://docs.microsoft.com/en-us/power-automate/create-adaptive-cards

 

You mentioned the the card editor option - is this showing up on the Flow side, the Adaptive card side, or somewhere else?

 

Thank you!

Rory

crf2011
Frequent Visitor

Hi @RoryL

 

Let me start by saying this is only an issue with the Experimental Features turned on.

 

Issue 1: The only way to use the 'Post and adaptive card and wait for a response' is to put the json template into the embeded card editor. I know the Adaptive Cards team is working on a templating service that would allow you to pull the Adaptive Card template and use in your project. In order to use these services or even a 'Get file contents' from a SharePoint file we'd have to be able to pass in the template without using the embeded editor. I'm also trying to do some loop append variable to pseudo create a table and the editor doesn't like my ill json formated card at the time of its creation.

 

Issue 2: The mapped data isn't working. My template has '{key}' data values to be replaced by dynamic content from each flow run. After completing the different key/value pairs on the action the posted card is exactly as I'd expect the template to look without any value replacements.

 

I feel like we're asking the Experimental 'Post card and wait' action to do too much. I'd love to see a Data Operations Create Adaptive Card action and we still have the Data Operations Select action for the data mapping. This would make it possible to bring an Adaptive Card template from anywhere into our Power Automate flow.

crf2011
Frequent Visitor

Here are some screen shots of what gets posted.

 

Post Card Wait Action.pngPosted Card.png

rmb
Regular Visitor

Is this unsolved since over a year? I just run into the same Issue.

So is this Experimentals Feature ever getting released and is there a documentation for it?

I use now as workaround the Flow style properties inside of the JSON (in the integrated Editor -> JSON)

Example:

"type": "FactSet",
            "facts": [                
                {
                    "title": "Approved by",
                    "value": "@{outputs('Get_file_properties')?['body/Approver/DisplayName']}"
                },

 

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (3,016)