How to get output from a Teams Adaptive card with Power Automate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign from A team's adaptive card just a little bit of information about myself about me I'm a self-taught Power Platform developer and I've been in power bi for however many years but I used to actually be a former hairstylist and I turned to it and I've recently started my own website which I put a QR code on on the screen for you guys so that's a little bit about me and let's talk about teams adaptive cards so for the cards how I use it is I can use it as both an approval or as an information form so this actually started when one of my clients asked that they wanted to have one single method of getting information out of the business so I figured okay I could do an approval through a card that's fine because if somebody says yes or no and adds a comment that's an approval so what you can do is you can do an approval and information form I put in something about free t-shirts and how how does it actually work so um this card gets or gives gives a certain output now Microsoft was not being nice to me because they actually changed the way that this works so earlier about a month ago you needed to do a partiation to get the output from the team's card so the most important thing is that when you may when you're making your car that your ID is recognizable so that you can say approval is uh your approval your yes or no or remarks is your comment field so how does that actually work so let me stop this and there's actually many different ways on making a team's adaptive card so what I'm currently showing you now is an explanation on how the new on how the new powerapps preview works which is this one you can do a adaptive card here but my favorite is using the adaptivecards.io designer so this website gives you the option to actually choose teams which theme and the most important one is which Target version I I I've actually found out the hard way that if you select the wrong target version and you have some type of error in your code or you try and use any any other of the codes it doesn't work in teams it doesn't display the card so always make sure to do Microsoft teams Target version 1.4 or newer and then you're free to actually create your very own card and it says easy as just drag and drop putting in the information and then this one the ID is the most important one that you have to set so what it actually does is at the bottom here it gives you the code so you don't have to write this whole code yourself it's a it's really easy so you just copy paste and let me go to my flow so in here I've added post adaptive card and wait for a response so I'm posting as a flow bot and I'm doing it in a chat and then under message you just copy paste that whole that whole code from the side and it's as easy as that and then make sure under update message and recipient you add your information now the the tricky part was under here under an email for example you can do this person has requested these socks so socks choice is the ID I gave to my choice option for free socks I mean who doesn't love Free socks so what this actually does is it sends an email with output from this adaptive card however sometimes with these adaptive cards uh the output isn't directly available so in the past we had to do a Json parsing getting the output from the body from that card parsing through through the Json code then putting that in a variable or something because sometimes within power automate you have different branches or for each or any different uh condition and then sometimes the output from that is not available so how I go around that is on the top I add an initialize variable if I can if I can type correctly initialize and then let's say a variable socks I want to make sure that it's a string because we are parsing through text and then under my teams card I go to attend to string variable and then in here I want to save my variable for socks I want to make sure that my socks choice is then inside this variable so what then happens if I have different branches or for or for each or a condition or any other area that I can actually use this variable throughout that whole flow and it it doesn't really matter where it is so then I can for example let's say this is a really deep nested email I can just add my variable socks and there it is and then that's the output from that adaptive card and then once somebody gets this within teams and I will show you what it looks like run the flow here it shows within my teams it shows the card that I've just designed and I'm gonna say hey I like power Pages hugos here I like power pages hit Smith and then in my flow it gets that output and it stores it in my variable socks that I've selected power pages and then then you can use that to feed that into your power app or any other thing that that you may want to use it for so that's about it and that was my explanation on how to get power automate to get the team's uh output for you awesome Natalie this is a great if there's questions we'll look in the chat just uh in the interest of time and everything uh but an excellent excellent demo thank you for sharing such uh Simplicity and fantasticness uh and love how you brought everything together right it's not just one product or another product uh but you're really shown how they work together there so excellent job thank you very very much [Music]
Info
Channel: Microsoft 365 & Power Platform Community
Views: 5,449
Rating: undefined out of 5
Keywords: SharePoint, PnP, Dev, community, open-source, Microsoft, Teams, Power Automate, Power Platform, Adaptive Card
Id: cr9oqwQzk2A
Channel Id: undefined
Length: 7min 1sec (421 seconds)
Published: Wed Jan 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.