How to Send a Collection from Power Apps to Power Automate | 2022 Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey how's it going everyone Michael back with another video in this video I'm going to show you how to pass the collection from powerapps into a power automate flow if you enjoyed powerapps power automate SharePoint and teams videos feel free to subscribe because I'll be pulling out more content tutorials in the future so let's get into it I'm going to start from scratch in the PowerApp just so I can show you guys like some troubleshooting and everything I go through so I have a blink power app here uh just disregard this screen that doesn't really mean nothing all right so I need to get make a collection with some data and for my collection I'm going to select some data from a SharePoint list that I have you can make your own collection if you want to but I'm just going to import data from this SharePoint list to use so let's create a bun because I will do that on to create the collection on select it's currently false so it's not going to do anything when pressed and to select the on select you would click on here unscroll down to on select all right so let's create a formula so to create a collection we're going to use let me zoom in a little bit we're going to use the clear collect statement or function and now it's asking for a collection so that's going to be your collection name I like to do it I like to name my collections with collol at the start and then whatever I want to name the collection so in my case it's a grocery list I'll just do collection grocery list and now it's asking for an item so if I want everything from this list I can actually do first you since I'm doing it from a SharePoint list I would have to add the data from a data source so if this wasn't connected I would click on SharePoint SharePoint click on marketing then click on the list I'm actually working with but since grocery list is already imported into this power up I don't need to do this but if you do you click on connect down here with the SharePoint list so since this is already connected I can type in grocery list as you can see after I close the parentheses it is now a collection and it's not giving me any errors so if we click on this button and then if you double click on the collection in the function bar you can actually double click and then on this drop down you can actually see what's in the collection it's an easy little shortcut for y'all and then it's everything from that SharePoint list so I actually don't want all this data I just want like a few a few columns let's say I just want food deep purchased and do um let's just do these four actually so I can see what these are called so obviously this is the title field it says food here but this is actually the title field title field date purchase price of item quantity of items in my collection it looks like it removed the spaces in between these all right so let me remove SharePoint list I'm looking at and we will do show columns from grocery lists it's asking for the source and now it's looking for column names and the Syntax for this is double quotes and then column names you're looking for so let me close that okay title works and then I want price of item let me just check I'm closing it just to make sure it works um if that column wasn't in that list it would give me an error saying uh incorrect incorrect syntax or something of that nature so we got food deep purchase actually let me do date purchase first just so it matches everything so then we have price of item and then we also have quantity of item all right let's close that uh it's giving me an error so it looks like something is incorrect right here quantity of item does not exist come with a similar name quantity of items I actually forgot the S on it and it looks like I forgot something else in here actually spell quantity wrong sorry my spelling is off today all right there we go it's all fixed so let me click on the button now double click on my collection and as you can see it's giving me the fields that I want to pass from powerapps into the power automate all right so since that is working correctly I'll just show that for a second so you guys can pause if you want to look at the syntax let's head over to power automate right now and let me create an instant Cloud flow and Sim Cloud flows are needed to get the powerapps trigger and I want to just name it powerapps collection power automate and powerapps is going to be my trigger and for this use case I'm just going to take the collection and I will probably put it in an HTML table and then send that in an email all these many cases you can do there's you can play into like a SharePoint list you can update values and stuff like that but there's probably better ways of doing that but for this case I'm going to take the collection and send it in an email all right we got the collection here let's go and create the flow I'll need two things from my powerapps which is the user's email that's currently logged in in the collection so let's go ahead and add a compose statement or action operation whatever you want to call it I rename it so it looks nice and power x so this will be the collection and for the input asking powerapps so as you can see it changed from two collection inputs if I didn't change that I would say compose inputs and it could get confusing within the PowerApp and next I will need the email so compose and I just want to grab the user's email and I will show you how to do that in the application so inputs asking powerapps so let me just save this right now and should be good I just want to pass in the parameters so I know it works so we will need to import this flow right now so on the left hand side you got the power automate Bond add flow and it'll list another one but I want to just refresh this and as you can see my new flow populated the powerapps collection of power automate that's the one I want to use all right it is now in here so we have a bun here this will be create collection just add some labels to them we got the cree collection one and then we'll just copy and we will paste this underneath it and this will be sun and email all right so for the on select we don't want to create the collection again we will do that in that step we want to actually use the flow that we created so to do that we want to make sure the flow is imported it is now you just want to start typing in your flows name it's going to remove the spaces for you the powerapps collection to power automate dot run that's the one you want to select and to pass the collection you're going to ask to use a Json function what is going to look like Json parentheses then your data source for my data source it's going to be that collection so col grocery list and I actually want to pass two parameters after it's going to be ignore binary data so it's not going to let me do images videos of audio columns I don't want these I just want text columns and I'm going to pass ignore unsupported types because sometimes you get errors so let's just say I just I just have Json Seawall grocery list and I closed it first of all it's not going to work because I need two parameters uh email as well so let me add the email so to add one it's going to be comma and then to add a the current user's email it's going to be user Dot email that's a syntax so it seems like it's working right now but sometimes it's not going to it'll throw an error if you have um binary data or on supported types so to add those in your Json function I'm going to have a comma and then you can see it brings up some I'm going to bring up some options down here so ignore binary data and then to add a second one it's going to be the and sign then it's going to be ignore unsupported types so it's a format you want to run to send your collection to power automate so it's not giving me any ears so we'll go ahead and click on this as you can see you got like a little bar up here that you know showed that it worked but I actually want to have like a notification for my user I'm going to toss a notify statement on that and just say hello as RAM so the user knows that flow actually ran when you press the button and so it's just what you want to say and double quotes and then I always usually just do the notification type as success so if we click on this again it is actually going to give us notification saying the flow has Ran So back in our power automate as you can see it ran twice because I clicked on it twice so as you can see it's on our collection in as Json and we got the email so let me actually copy this output from The Collection compose statement so control a control c will copy it all because I want to parse this data using another action in power automate so we know the dado came over successfully so we want to parse Json now because the data is in Json format so for the content we want to choose the collection outputs and since we copied the outputs from it we want to generate that from sample so we're going to go ahead and paste that data as you can see it did all that by itself and now we want to for my use case I wanted to toss this into an HTML table we will go into HTML create HTML table so from that Json from that parse Json you can actually see it allows us to select each of the columns so you see we have day purchase title price of item quality of items you go into the powerapps and you look at the collection that's exactly the com headers that we have so you can actually choose them here I actually want to get down from the body and for the advanced options it'll automatically create those column names but if I wanted to do a custom column name so let's say I wanted to do instead of title so since the title was food I don't want it to say title I want to say food the food and then I would just do the valley to be the title and then I would just map the rest of these out so they purchased rice of item and then last we have quantity I always full quantity Rock hold up quantity of items all right we have our four headers and four data values and this will create an HTML table it's going to create a very basic HTML table it's not going to look fancy unless you uh you add actual HTML and CSS to it and I want to send this to my email so we will do send an email V2 and for the two we want to do Dynamic content and I want to grab the outputs for my email action up above subject's just going to say powerapps generated HTML table and then for the body of the email I'm just going to do the output from the create HTML table just to keep it simple you can go more in depth if you want more information but for this video I'm just going to make it very very easy for y'all as you can see we have the four actually the five five actions a flow is ready to go so we will run it and see what happens let me open up my Outlook so when I click on we'll create the collection again in case there was more data that was entered in here and now we'll send an email and flow has Ram let's go see if there's any errors waiting oh we on air so let's check it out so cannot find any Bell connection reference name shared office 365. so this is actually a good example because here is what happened that's this is why the flow didn't run so is using when I imported this flow to powerapps it didn't have the Office 365 connection the shared office 365. that's because I added the Outlook connection here which is right here I did that after and since I had that after the powerapps doesn't know what connection to use to send the email so to clear this issue out I actually have to re-import this um this flow in the powerapps so let me copy this before I delete it so we want to remove it from the app and now we actually want to re-import it so we'll just click on refresh our apps collection the power automate all right it is back in our flow as you can see I didn't even need to delete this I re-picked it up so let's see if it runs successfully successfully this time so we'll click on send an email low as RAM let's go to the outputs and as you can see it ran and that's how you clear any issues that you have because you can also get like a SharePoint connection if you had like a SharePoint on them like create item or update item after you already ran the flow let's go ahead and check on the outputs election uh the array of items email my email parse Json so as you can see it looked at the schema the schema match the content and so it was able to parse the data into this body of outputs and for the create HTML table as you can see this is the outputs of the HTML table it looks nice and it looks like the email sent successfully so let's go take a look at my Outlook as you can see our option generate HTML table and here's our HTML table of the collection that we took from powerapps and that'll be the end of this video I hope you guys enjoyed it it's a lot longer than I intended it to be but there's a lot of good examples and a lot of things I explain that you can run into well I hope you guys enjoyed it leave a like comment subscribe if you feel like it and any video ideas feel free to comment them because we all run into issues using these Microsoft platforms and sometimes it's easier to just reach out and ask questions I'll be the video and I will catch you in the next one
Info
Channel: Michael Alex
Views: 16,847
Rating: undefined out of 5
Keywords: Microsoft, Microsoft Forms, Forms, Microsoft SharePoint, SharePoint, Teams, Power Automate, Power Platform, Microsoft Flow, Flows, Automation, Tutorial, Guide, 2022, Microsoft Outlook, Outlook, Email, power automate, powerapps, microsoft powerapps, power apps, send a collection, collections, html table, send emails
Id: coB688qd00c
Channel Id: undefined
Length: 17min 22sec (1042 seconds)
Published: Tue Nov 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.