Use the Power Automate v2 Trigger for Power Apps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Microsoft took away the V1 connector for power apps to trigger power automate flows yikes so what we're going to do in this video today is we're going to walk through what does that mean for you right like if you go in there and create a new flow the v1's gone so that means I've got 50 plus videos out there to show you how to use the V1 connector that they're not there so the idea of this video is we're going to walk you through how to use the V2 connector and kind of bridge the gap like explain like what it does versus what the V1 did show you how that works we are also going to do a little bit of a deeper dive into one of my most popular videos uploading files and show you how the new V2 connector you can upload files the old way with the V2 connector or you can upload them the new way and last but not least if you really still want the V1 connector well I found a way to still get it today so we're going to talk about how to do that who knows how long that'll be good but until it is it is because I like the B1 connector sound fun well let's just switch over to my desktop and take a look okay so let's just build a new flow to kind of start right so we're going to say create and we know that power apps flows start under instant Cloud flow so you search for instant and if you look right here you'll notice that the power apps V2 trigger is the only one here but maybe that's not a problem I don't know so let's just say skip since we know that sometimes that interface doesn't show us everything let's try this way right so from here under triggers we'll click on power apps and Wampa Wampa the V1 trigger is not here it didn't say V1 it just said power apps before notice that they put power apps V2 but they didn't even put the space in here it's like they try to AG so you can only use the V2 two trigger now why so let's choose it so what is really different about the V2 trigger is that remember how in V1 we always asked in power apps like let's switch over here to one of my flows it has the V1 trigger still and in this old flow right you can tell it's the V1 trigger because it says no additional information here right whereas this one has the add an input but inside this one what we would do is we'd go into our box and we'd say ask and power apps which would be then how we'd create Dynamic content right so that's how the V1 worked that's how all those other videos show it so with this one if we go in here and add a compose right this is back to the V2 there's our compose so if we go here and look there is no Dynamic content because what you have to do on this one is go back up here and add an input when you choose add an input then you have to tell it the type so the same way I can flow how we have to cast or tell it what our variable types are when we do Dynamic content we have to tell it what that is when we did ask in power apps in the V1 it figured out what type of content we wanted so now we have this option so like if we do text now you can do text by giving an input or here we probably would just change this to be like my text right always change these to something less generic so you understand what they are but now if we get down here under this we now have my text and so we' use the dynamic content right so that would be now it's the same everything's the same right like you still would trigger this with power apps you would have to pass in the property my text that would have to be a text propert property and when you passed it in it would get placed here as Dynamic content so all of it works the same way as V2 once you get past this point but you had to get to this point and you had to manually add the input if you want to ask again or ask for something different you go here add an input you could add another one so the different types so you got text yes no this is Boolean true false like it should have probably said true or false right is true or false a file data type that's a little bit different we're going to explore that in a few minutes email which is really just text that to me is kind of confusing like it's just a string it doesn't actually do any email stuff a number so if you want to pass a number and then a date okay so that's all you have to do you choose which one of these you want and then you're going to get it you can rename them or not also remember with all of these you can always go up here and you can change it to make the fields optional you're not going to want to make them drop downs of things like that right because that's not in power apps you want to drop down power apps build drop down power ups you just want to pass this thing text but you could make a field optional if that was something you desired okay so that's all that so here let switch over I made one of these flows already that has one of each of these let me switch to that one real quick all right so here you can see I just added one of each of the input types so we could kind of see how they would work and then down here in the compose I just have each one of those I make a compose for each one right because this is how I learn right like I don't get to watch a YouTube video from me I have to go and figure this out so I can make the YouTube video but if you trying to figure that out on your own this is exactly what you do right make one of each input and then throw each one in compose and see what happens right so we have this flow called flow practice it's all set so let's jump over to power apps over here we will say add a flow we will search for flow practice I know me and my fancy names We'll add that in right you can see the other flows we're going to mess with a little bit already sitting here while that loads we will create ourselves a new screen so we don't get that confused with the old screen and now it's added we will say insert a button and then here we would start to type in flow we'd have flow practice. run and so you can see up here at the top that it's like hey I need a text right so unfortunately like the name it says text it tells you the type of data here this is what we named it over in flow right Boolean and we know we name that yes no right so if we do text we'll say hi Mom Boolean so that's true or false so we'll just call uh we'll say false for that email and so just to prove you it doesn't actually have to be an email email went here email is really just text we're just going to prove that as we go by number so we do like 12 remember numbers don't have double quotes around them text if you put 12 in double quotes that makes it the text one two not the number 12 for date here we'll just use the today function and then for the file record one I don't want to do that one yet so you know what we're going to do we're going to close this close this and then we're going to go back over to that foil real quick we're going to go to file content and we're going to say you know what oh look it's already not required right so we do that that make it required we're going to make the field optional perfect okay so let's see what happens let's see if that works right I didn't practice this in my run because I didn't expect it to be there but we're going to hit play we'll press the button it ran pretty licky split we'll go back over here now we need to see that run right so we got to kind of back up a step there is our 28 day run history if we click on it our flow run failed and it's mad because the file didn't exist so the triggered but because we hadn't composed it didn't work so we're going to ignore that for now all right so the trigger didn't care that it wasn't there but my flow body wasn't set up for it to be optional so but if we look here hi Mom false email went here so emails really just text the number 12 and then today's date 1025 2023 okay so that works exactly the way that we would expect it to work so if you're watching one of those old videos you and I say hey ask in power apps for and you know getting some text then you're just going to go in here with your V2 trigger create an input that is that and then kind of go from there okay so that's the first lesson with this is it's not radically different I mean it's different to set it up but once you get it going once you add the inputs and you add the right type of inputs then you're going to just do everything exactly the same that you saw in Old video's old flows now speaking of old stuff I would not just jump to the conclusion that I had to go replace it is like I'm not going to go rewrite all my flows with V1 triggers right there it's deprecated but the V1 trigger still there it's still going to work I'm not rewriting those you're welcome to but it sounds like a lot of work to me so I'm not going to just go jump and do that okay now let's explore that file one a little more right because this is the one that I think is going to trip people up the I know it's going to trip people up the most because it's a lot more complicated right when we did all these other ones you know as long as you understood that you know your data types so text Boolean so true or false email is actually text numbers a number dates a date so long you understood that like what you pass super simple and once again it just Wants What It Wants It doesn't care how you get there so if you need to give it text it doesn't care if you hardcoded high mom if you used a variable if you did a look up if the number was there from a number or a calculation or you know whatever right all of these it doesn't matter just Wants What It Wants It doesn't care how you get there so the file that one is very similar as well it's just doesn't care but it needs the right data right and this one's a little harder so what we're going to do first is we're going to kind of do this an old school way we're going to add a picture control because this is the simplest way so we're going to say play we're going to add a picture real quick of buddy so we'll jump over to my desktop and there's buddy sitting nice and pretty right so let say open okay so we got the picture of buddy here so how do we pass that to flow so we're go up here we know that we have that optional one so comma and look is says hey I need this I need a record but it needs a record inside of a record which is confusing so first thing you're going to do is recreate what it says here so we're going to go curly bracket file colon and then close that now where it says the word record it doesn't want record right there it wants a record all right so we know records are in curly brackets as well so if you make in curly brackets and now if you hover it's going to yell at you hey your formula is missing a column file content byes with type of blob so this is its way of telling you what goes inside the record right like it's not magic that I know what's there power apps tells me so it wants something called content bytes now when you do this make sure that you get the capitalization correct it has to be capitalized that weird way and now it wants a blob well I know that my ad media button one so add media button one. media is that that blob right that is the blob that is the file that we just uploaded right it doesn't know how to tell me that but that's what it is and now if we hover again now it says hey I'm also missing a file. name and notice I'm not typing in the file part so I just want name all lowercase with a type of text okay so we'll put our cursor there we'll say Name colon and then we're going to do add media button one. file name that is the file name of the photo that we just uploaded okay so that's the record at once s right all the Red's gone it's a really weird format I totally agree but like if you don't have it memorized and I don't have it memorized I just kind of showed you through how we walk through to get that but now if we hit play press this button go back to our flow we'll go back over here look this run succeeded and if we click in here there's all of our beautiful composes we've already seen all of them but six and so in six it's like hey this is the file you just gave me very cool right like that's gar Gage we don't know how to use like we can't use it that way we're going to talk about how to use it in just a second but it gives you what you need right so that's how you pass all the different properties fun right all the different inputs I guess the right word for that hey if you're using power automate flows like this type of stuff right this video this is the type of stuff we teach in my training classes I've got a live class coming up I have the on demand classes always available we got Power Platform University we can even do one-on-one mentoring if you want So if this is the type of stuff that interests you please go over to training. power 911.com and check us out now one thing that is neat about the V2 trigger go back over here so have you started seeing this new edit with new designer button up here right we got edit like we've always had we got edit with new designer if you click on this you get the new flow studio so one of the things to understand is that the V2 trigger works in the new studio if my flows trigger is V1 it doesn't work it wouldn't let me edit in studio so this is why they've gotten rid of the V1 they didn't want to support that trigger in the new studio so now they want to kind of really push us all into this V2 space but this is one of the things that I thought was kind of interesting right because now we can use the new UI we're not going to go through the new UI right now I kind of introduced that in the last video or two videos ago whatever it was but it is here and available right but if we go back to remember that one that I had with the V1 so this is power apps composed too if we go back here and we say edit with new designer it tells me right because you've got a V1 trigger you can't use it so that's how that works now what if you want to create a flow with V1 trigger right how can you so I you know me I like to kind of explore and do it actually wasn't that hard so if we go back over here to power apps we go here and we go to our power automate interface and if you say add a flow and create a new flow you get this lovely screen right where you can use do choose different templates or create a flow guess what happens when you create a flow you guessed it you get the old power apps V1 trigger super confusing I agree I'm sure Microsoft is going to fix this hopefully sooner than later but as of right now if you want to make a V1 flow today then just use the interface through here Bingo Bango you can you know build the flow and once you build the flow here and save it it'll show up in the regular studio right so you don't have to always use this interface you just have to use this interface to create the flow okay let's close that right there's no reason to save any of that so the last thing I want to talk about is uploads right so I'm going to remake that video we all know that I invented how to upload files a thousand years ago and it was the only way to do it and so that video's got a kazil views but it's a little confusing because now you don't have the V1 trigger so I'm going to remake the video but in the meantime I wanted somewh to show people how to do this so if we go back over here to my power app and go back to the screen so I've got this one set up to do the same upload process three different ways right so if you look at the first V1 upload button this is what we learned a long time ago right we take an attachment control we Json encode it that gives us all the base 64 we then parse down to get rid of the header uh from the base 64 and the trailing double quote and then we just run our flow and we send this over right so we're running a V1 this is running a flow called um V1 upload and if we go open that flow real quick it had a V1 trigger and then it just had a create file and so we uh asked in power apps for the create file file name and then we did the same thing for file content we had to run it through that base 64 to Binary right that video I'll put a link to that video up there if this is all brand new to you but I'm hoping that you you're here because of you watch that video already but it doesn't matter either way you're good okay so that's how the V1 way worked awesome what if you want to use V2 but you want to use V2 to do it the old way that is um I think a fair request so actually this all looks exactly the same so if you're going to use a V2 the difference is be when you go and create the V2 one so let me open that one up here I would have a ask for input notice these are both text I didn't use the file one both of them are text file name is a text file content is a text down here file name is used that file name text same way we always did and then that file content same thing you run it through that same base 64 to Binary function right so if you just want to do it one for one where that video did just when you got here this V2 trigger instead of saying asking power apps over here on the side you would create the dynamic content up here and they would both be text okay then you're just doing a video one for one awesome but what if you want to take advantage of the new file capability and do it A Better Way well it turns out you can so if we go over here so I had this V2 upload look we're going to just pass one thing we're going to pass the file content bytes is that same last attachment control value so we don't have to process it through an image control we don't have to J on it we don't have to VAR Bas 64 nothing we can just directly reference it out of the attachment control and then over here for the name same thing we can reference the name okay so that's what it would look like and what does the flow look like so the flow right we're just asking for the file content no little green icon here like you can cheat that means it's a file one then down here for the file name you have to do file name and then file content it is file content now this one's a little different so what I'm going to show you real quick is how to get that because that this is different so we'll just do the same action SharePoint create file now if we go to file name and then we go down here to inputs notice that file content is the only thing that shows here if you put file content here you hover look trigger body file content bytes that's not what you want you want a trigger body file name no big deal what you're going to do you're going to click on this once see how it's kind of funny blue you're going to say contrl + C you're going to x out of it click in there click expression paste this in you're now going to get rid of the at and the curly bracket on the front and the curly bracket at the end okay so now now we got trigger body so that's the power apps V2 trigger it's saying get the file okay and then get the content byes we don't want the content byes what do we want here we want the name okay so that's how you get there right unfortunately their UI doesn't understand the the pieces I don't know why but yeah whatever right so we put name there then if you go here to file content you don't have to do anything special you can just directly reference file content because that's trigger body file content byes which is the A's and the B's the ones and the zeros that make up the file but that's it you also don't have to do the VAR base 64 but now if we go over here right and let's just test them all to make sure they all work but if we say play we'll get rid of the Buddy image we'll attach a file let's get the latest picture of Buddy one second all right so we attached the file right so if we say V1 upload that's done we'll say V2 upload that's done and let's say V2 upload the old way that's done and so now we can see the files named 2023 blah blah blah apparently when I took the picture we'll do a refresh over here in my SharePoint document library and look so there's the V1 there's the V2 and there's the V2 old way now remember whenever you upload a file with flow you always want to double check that they're all there right so we'll open this one a buddy close that we'll open this one make sure they all work boom and then just make sure boom right so all three of them are there that's an important mistake I see people make they do the uploads and they don't validate that it works and it turns out they got a little typo somewhere but it created a broken file we don't want that we want to see Buddy's cute little face all right I think that's enough for one day right so the new V2 trigger it's part of our Lives now I will start making it using it new content I get that but you know I realize there's hundreds of thousands of views out there that are showing you the old V1 so this hopefully Bridges the gap for you get you kind of on the right footing to start using this questions comments leave them below speaking of below click the like button you guys don't like it my videos I don't care it's uh I mean I do care I wish you would but I'll be over it all right anyway whatever wrap this video up Shane so thanks and have a great day
Info
Channel: Shane Young
Views: 13,035
Rating: undefined out of 5
Keywords: Shane Young, powerapps911, power automate, power automate tutorial, power automate tutorial for beginners, power automate triggers, power automate powerapps trigger, powerapps trigger power automate, power automate powerapps v2 trigger, powerapps flow trigger, powerapps button trigger flow, power apps trigger power automate flow, powerapps trigger flow on button click, powerapps v2 trigger, power apps, powerapps911 youtube, power automate tutorial for beginners 2023
Id: vpjf5mD-COs
Channel Id: undefined
Length: 19min 9sec (1149 seconds)
Published: Mon Oct 30 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.