web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Providing $data proper...
Power Automate
Unanswered

Providing $data property to adaptive card

(0) ShareShare
ReportReport
Posted on by 18

Hello, 

Is there a way to provide array to $data property, or repeat items, when using power automate to post an adaptive card to teams channel? I'm using "Post your own adaptive card as the Flow bot to a channel" action with message:

 

 

{
 "type": "AdaptiveCard",
 "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
 "version": "1.2",
 "body": [
 {
 "type": "Container",
 "items": [
 {
 "type": "TextBlock",
 "$data": [
 { "name": "Matt" }, 
 { "name": "David" }, 
 { "name": "Thomas" }
 ],
 "text": "${name}"
 }
 ]
 }
 ]
}

 

 

I only get this in teams channel chat.

Muri_0-1598895711270.png

 

I expected the same behavior as in https://adaptivecards.io/designer/

Muri_0-1598900232014.png

 

 

Categories:
I have the same question (0)
  • rimatos Profile Picture
    on at

    Hi @Muri ,

     

    Can you confirm if the expression you pasted is correct? I just tried to test it in the https://adaptivecards.io/designer/ and I get the same output as you do through Flow.

     

    rimatos_0-1599032875501.png

     

    Regards,

    Ricardo

  • Muri Profile Picture
    18 on at

    Hi @rimatos ,

     

    Posted code should work. Yes, it will appear as a template at first. If you click on the "Preview mode" button at the ribbon, it should display the desired output.

    Muri_0-1599034640878.png

     

    I am now trying to figure out how this works when used with the power automate and teams activities. How to get it previewed there?

  • Verified answer
    rimatos Profile Picture
    on at

    Hi @Muri ,

     

    So I just tested this on my end and indeed the usage of Teams Adaptive cards with Templating is not functioning properly in Power Automate.

     

    Given that this connector is in preview mode it could be that this functionality is still in developing phase.

    Nevertheless, I found this video with some steps on how to achieve Templating in Power Automate: https://www.youtube.com/watch?v=dq_qGQ_3hd0 

    Hope this helps!

     

    Regards,

    Ricardo

  • Muri Profile Picture
    18 on at

    @rimatos Thank you for your time and help. Yes, in the video they say that it is not supported by the Teams now, but they plan to support it in the future. I needed that for now. I don't know why it was hard for me to find that information in the first place.

     

    Thanks again,

    Muris

  • cherwan Profile Picture
    Microsoft Employee on at

    Can someone confirm that $data binding in power automate is not possible? I can't find any doc about this. It feels like the Adaptive Cards in Power Automate is a different story. Some functions aren't the same either.

    https://docs.microsoft.com/en-us/adaptive-cards/templating/language#repeating-items-in-an-array

     

    I've been struggling with this for days. My card design works perfectly in the adaptive cards designer/preview with data binding. I just can't figure out how to make the card work in Power Automate. It's dumb to manually write inline data instead of using an array to populate every section. If that's the only solution, then what's the point of  "automate"?

  • virakones Profile Picture
    389 on at

    @cherwan Hello

     

    Have you had any luck?

     

    I have a Parse JSON action in my flow that collects some data in an array. From there I would like to bind this data to $data of an Adaptive Card so that elements can repeat.  

  • skandadai Profile Picture
    10 on at

    This is certainly a important feature that Microsoft is missing for Teams. Also for Teams even with turning on experimental feature, this option is not visible. Looks like they removed it completed.

  • Nielf Profile Picture
    306 on at

    The only working solution I have found for repeating items, is to create a string variable, and append that in Power Automate for each item.

     

    E.g. Here I am adding an input toggle to the adaptive card for each row from a previous list rows action:

     

    NielsL_1-1618384610401.png

     

    I then add the variable to the message of the adaptive card, which repeats the toggles:

    NielsL_2-1618384780059.png

     

    This works fine when the adaptive card is posted to the user:

     

    NielsL_3-1618384910297.png

     

    However, the issue with this solution is that the output from the adaptive card is pretty useless and I can't really do anything with that afterwards in Power Automate. E.g. I would like to use an 'Apply to each' action for each of the items but that is not possible with the current output.

     

    NielsL_4-1618385116119.png

  • Community Power Platform Member Profile Picture
    on at

    Thanks @NielsL . I ended up doing what you mentioned. Concatenating the individual items ibn Power Automate and passing that. But that kind breaks the advantage of password the data dynamically. But the solution works and my use case is simple. So I am good for now. Thanks again.

  • Nielf Profile Picture
    306 on at

    Yes, it is  not an optimal solution but it can be used for simple use cases. Let's hope that there are some more features added once it gets out of preview. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard