2024: Power Automate Desktop Developers MUST Learn This

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
AI is revolutionizing how you can work with power automate desktop as an RPA developer stay ahead of the curve and I'll show you here how much you can do there's no boring PowerPoints today this all practical stepbystep guidance which you can apply yourself so please open up power automate desktop and do all the things with me you will learn much faster if the video goes too fast simply just pause or rewind it it's the sign for that I'm an Yensen a Microsoft most valuable professional let's get started by applying AI to our work we will use chat DVT we will use open AI co-pilot and much more first of all we will open power toate desktop then we also want to open up a web page so go to RPA challenge.com this is a common challenge solved by IPA developers usually we want to solve it with Selective work we will do so today but we will not Solve IT ourself we will make chat DBT and more directly we will create an API call to the open aai backend that's the company behind chat DBT and have chat DPT solve it directly for us dynamically so we will start a place and that is we want to download this Excel book so please do so with me so I will right click this this one save link as and let's just place it on our desktop it's Li find that it's easy to find so I click save let's go inspect it so I'll double click here the first thing you want to do is to click enable editing and here can see some data we have seven columns first name last name company name rolling company address email and phone number we also have 10 records from John to Lara with their data there are some invinci ible invisible rows here so click this 12 and this is part of the challenge but we could easily have power toate desktop Sol it but that's not the scope today we are looking into the future with AI so simply just click the 12 control shift down arrow that will Mark everything then right click here click delete we have deleted this invisible all these invisible rows so what we want to do here is to iterate this data and fill it in on our web page that we will see in a few seconds so simply just save it here and close it and you go to the browser so what you want to do here is to fill in for each one of these rows you want to fill in here that is once we start the challenge we click Start and you can see all these fields we have the address email and so forth each time we fill in the record we want to click submit and now you can see these fields are changing this mimics an unstable system you can see that as a CRM system or something similar and we want to handle that that's part of the challenge usually we had to handle this ones ourself today we will have ai handle it for us live so let me minimize this again we will pick up the path to this Excel book so shift right click and then you'll find the copy as path if you are Windows 10 however you want to press shift right click and if you on Windows 11 you can just right click so there's a little difference there doesn't make any uh thing uh changing just need to know so we create a new flow here in power toate desktop I will call mine RPA challenge GPT and I'll click create we will first read our data then we want to uh read that into a data table that is the Excel data into a data table then we want to open a web page we want to have uh this filling in and then we will solve the problem through the chat TPT so go up to actions and here you want to find a set variable and drag it in this is for the Excel path so I will call this one Excel path then in value I press contrl V remember we had the path to our Excel book so I delete the two quotation marks power automate desktop doesn't need those so I click save then we can open the Excel instance go up here to actions and then find a launch drag in the launch Excel we will not open a blank document so click this drop down open the following document we want to open this document which we just created a variable for so click this x double click the Excel path we don't need it to be visible so untick this and we also want to open as read only so far so good so then we can click save we can open it as read only only because we're not going to save any data back then we can read the data so I'll say read from Excel worksheet and drag this one in we're working in the Excel instance that we just created and click this drop down all available values from the worksheet we going to read everything we're also going to tell power toate desktop that we don't have headers that we have headers in our data so click this Advanced first line of range contain column names default is that we have no headers which we of course have here variables produced that is called Excel data that is a data table I can click save that's fine for now I also want to close the Excel instance so I just find a close Excel and drag it in here the instance I want to close that is the Excel instance and I don't want to save the document I can't because I open it as read only click save now I want to launch a new browser so I find a launch new I'll take the Microsoft Edge that's my preferred one but you can easily go with chrome or Firefox just avoid Internet Explorer we're going to launch a new instance and then we go to the RPA challenge www RPA challenge.com maximize the window that is because it's easier to see when we develop there's no real reason for it and then we want to say variabl produced called browser that will be the browser instance variable which we will work in so here I click save I can also go down here to run delay change this to one that is just the delay between the actions here in the development phase that is only when we have the editor open it's a little bit easier it goes a little bit faster Let's test it and see that we can indeed read the data so I click run then we are launching the Excel and we should open up the browser in a few seconds and there we go and this is our page go back to Power toate desktop so what you want to see here is that we have a status ready and a green check mark that means that we made uh Power toate desktop found no errors I also want to go over here to variables in case it looked like this simply just click this x here double click the 10 rows and seven columns here you go we have our 10 rows so these are the data that we want to iterate through we want to populate the web page with these so click close let's go back here the first thing I want to do before populate is to click Start I only want to do it once and then the challenge starts these 10 um records will be filled in by our power toate desktop flow so find a click link on web page and drag it in here we want to create a UI element for that start button so click this drop down add UI element open up your page let me move here in case you don't have the start button that could be that you already clicked it then it doesn't say start you can simply just refresh the web page the RPA challenge then you will see the start once you can see here you can pick these elements with red borders around it so press control and then click on this button with your mouse we have created a UI element so that's a UI element got a an address it's called a selector that's what power toate desktop does automatically for here and we click save once we click Start we can iterate to each data record that is rows in our data table a data table is a collection of data rows that mean that we can use a for each so we take this collection of data rows one by one and iterate through go up to actions and find a for each in case you don't see it you simply just need to expand this loops and find it here drag in the for each the value to iterate that will be the Excel data that will be the data table with 10 10 rows and seven columns click this little X here and double click here we want to store it into the curent row and that is just a reference variable we call it curent row because it is indeed the row that um takes that is um just a storage name where so for each iteration we can refer to the curent row to get the data of that row now we can do something I want to populate so I want to find a populate text field on web page which is here I drag that one in here so I'll also create a UI element for that click the drop down add UI element my address is here and that's what's the one that changes so you your will probably be in another place that's fine once you found it you find this input text press control click with your mouse this UI element gets um created go down to text that is the text that we want to send to this field here I click this little X and now I click q and row so this will be the entire data row I also want to specify which column that will be the address column so hard bracket single quotation mark and I'll say address single quotation mark hard bracket that's it so once we click this one here let us find the RPA challenge again I also want to click submit and that was um I want to do that for each one of these records so let's also do so here I find a click link on web page and drag this one in here what I really think this should be named as is Click element on web page because as you see here it clicks on a link or any other element of a web page so I use it for all things that I want to click and it it's silly that it only says a link but hey that's how it is and it's been that for many years so I click this drop down add U element find this submit press control click it with your mouse and we're there so now we can test it um I can click run what you'll see here it opens up the Excel instance closes it again open up here it will click Start that one works but then you will see it failed and that is indeed because these fields are changing and that's part of the challenge which we usually usually have solved manually we will not do so today so right now power toate desktop probably failed if we go back here and we can see what's going on it says that the forms field with the selector and then the selector comes input an input element and an attribute and an attribute value ID equals QB not found and that is because this populate text field on web page it looks for this input address field and let's go over here to the UI elements click this stack of papers then you double click on the input text mine is called QB you probably have four other characters double click those this is the selector for this element so this is what power toate desktop tries to find an input element with the ID QB 72q and let's go to the last instance of IPA challenge over here and that is this address element so then we want to inspect what's really behind it because these selectors they they are called CSS selectors and that's because they look for the CSS or HTML behind this web page each element on this web page got an address and that is called a selector we open up the developer console either by clicking F12 or right clicking and and click inspect so if I click right click I can actually do it anywhere on the page just right click inspect then I want to make sure that I'm inspecting this as you can see down here we have the code for the web page and you can see here I can scroll to it with mouse different elements gets selected in case your developer console goes over here to the right I think it's more easy to have it below because these um rows can be quite long so simply just click the three dots and duck to the button make sure you are in elements now you want to click this screen with this Arrow go up here to address and click then this row gets highlighted you can see that we indeed have the input element right here and then we had this IID attribute that also fine but then we see the attribute value it's something with a CR and we had and we were looking for an attribute value called QB that is because this attribute value changes each time we hit submit or reload the page so once you see I click submit here let me inspect this address here you can see the name uh the ID is now called v8k so that one changes that's that's why chat power toate desktop can find it we want to solve it with chat DPT and usually you want to you have solved that this challenge by going to you the NG reflect name attribute because here we can see we have a unique and stable attribute value but today we will solve it dynamically that is we want have to have chat DPT to read these HTML code off the page and then we want to um send that to chat DBT and create this selector dynamically for us so that is so so nice and let's see how we can do that so I can close down this developer console now what you want to do here is to right click anywhere on your page then you want to click save as let's go to our downloads folder which is here make sure that it says RPA challenge. HTML and then click save so now we have the HTML file saved here and let us uh try uh let's go look for it and let me just open up the file explorer go to downloads I can also open it up here so here it is this HTML we also downloaded the folder which we will not use go right click on it open with then you will see notepad here we have this file so what we want to do here is that we want to find uh the body that is will be where the elements lies where we have it so what you can do here when you're in this IPA challenge. h ml press contrl F that will be to look for something delete this what you want to do is to have look for a body like this press enter and that one is here so we want to mark this then take a few lines then you want to say control shift and then home because then it marks everything before that body you can just press delete and maybe I can also delete this lines here that's it then this is the code that we want to use I also can also take away this body in the end and the HTML so this is what we want to send and have analyzed and by the way you can probably see we have the last name here we have and we have the first name we also have the address someone here I can of course I can look for it and that's because we need a d like this and we have it up here so so here we have uh what we just found before we have the value address label address and all the other things from before so this one we sent to chat DPT and then we have chat DPT to look at it and create um a dynamic selector that will probably be we use this ID here so it needs to say where is this ID and then it will pass that data and use it in a selector so so what you will do here is to press controls or save now we modified it we just took out everything between the two bodies let's go to chat DBT so do that in the browser I'll say chat open.com for those of you not familiar with chat DBT this is a large language model a chatbot where it can help us with many things it can write stories brainstorm ideas summarizes L text write codes and it can also create good selectors so in case you see a login or sign up simply just sign up for this it will bring you so much value in case you have the chat DBT we need to be in the paid version that will be the chat DBT 4 because then we can upload files we can also use the free model and then we just need to copy paste uh the text in but that's also an option you can have the free version of chat DBT I will show you both so here I'll say this is the HTML body of a web page colon shift enter three single quotation mark shift enter this is just to create a little structure these three single quotation marks that is just to separate my data because now I want to have the the HTML body inside it and let's Also let's wait a bit by uploading it let's just um in fact right click open with the notepad let's just copy the text here because then everyone can be it so I I mark it and contrl C then everyone can uh help us with this so then I just contrl V shift enter three single quotation marks and then I want to paste in the task so you can also do this if you use the free version and here I want to say create a CSS selector for the input field where you can enter where someone is living incap incapsulate the selector between two and then I want to say pipes like this that is just to isolate it do not return any other text and let me explain what this is so create a CSS selector that is a CSS selector that's the selected type that we use in power automate desktop in fact it is a child combinator CSS selector then I want to say where you can enter where someone is living so here I'm not saying I want to take the address and that is if this one changes so if they call the element res residence residential address or something this will also work then I want to say encapsulate the selector between two pipes and that is um just to isolate it so it's easier to pass do not return any other text that is to make uh that I don't need any other text just to make completely sure I can send this and if you go here we can see that we created a selector called input ID VH k8k and that was indeed the selector that we used here and which we found up here in the address so right now we created that in this browser interface what we want to do is to connect to the back back end of this program so of course we don't want to sit typing or have a robot typing in chat GPT it would work I want to send an API call and that is a call behind the scenes to open AI That's the company behind chat GPT and create this selector dynamically so now we see it's possible we need to find some reference for this API call so open up new browser tab then you want to go to platform open.com log in if you're not but if you just logged into chat DBT you will be logged in you can see that by going down here I can see I'm logged in first thing we want to do is to make sure we have some credits here so click settings then you want to click billing and you can see I have a credit balance that's fine we will probably be using $0.1 today then you want to say add to credit balance if you are out of credits here here otherwise everything is fine then you click this lock where it says API Keys create a new secret key and here we can call this one pad challenge click create secret key we now have a key in our clipboard if we click copy here API key copied icon click done remember to not share this key with anyone because then you can use your credits I only have $7 and I will delete this key after this video but if I didn't anyone would could use those $7 so so far so good I go back to Power toate desktop and here can just get canceled because before we use this selector we will make an API call to open Ai and then we will send the HTML code ask open a to give us the selector which we will use here so this is quite revolutionizing and let me show you how clever that is first we will create a few variables so I will have a set variable up here and I will call the first one API key contrl V to paste it in here in the value and I'll click save I also want an endpoint an endpoint is the address to this open AI API so I'll have another set variable I will call this one endpoint and I'll go to Value let's find that endpoint so if you're still in the open AI page I can click this logo up here API reference scroll a little bit down to making requests and it's this https colon is what we want unfortunately it's a little bit difficult to copy from here mine is lagging so what I want to do here is to click this copy code and I can open up a new one here and I want to take this https completions so this is the endpoint so this is URL I use to call the API from open AI so I will have that one go back here and contrl V we will paste in that endpoint here so what we want to do here is that we uh will click save then we also want to in the flow we want to save the file and where do we want to save the file to we want just want to save it here to the downloads so we need to pass first what I can do here is that I can right click if I'm in Windows 11 or shift right click if I'm in Windows 10 copy as path now you can delete it you can delete both files if you want but we will delete it and then we have the path in our clipboard go here create one other variable and this one will be the HTML file path the value control V delete the two quotation marks so this is where we want to store the htmls that we download for each iteration and we also delete them don't worry so now we have that so remember that um this one um these this page changes each time we press submit so before we do anything we want to save this site and what we can do here let me go to challenge what you can do to save the HTML code behind the side is in fact you can press uh control that will open this dialog box and you can see we downloads we can just click save here um so that's what we're going to do and let me just click cancel now we will send this keys to the browser window to do so we will have a send ke here drag it inside the for each we will not send it to the forground window B the UI element we will create the UI element and here you will just just pick the document you can see it here so press control click the entire page doesn't matter where you are in which field we have it here then we want to say what keys do we want to send we want to send the control in curly brackets and in parentheses you will find an S can also have used these ones here and just find it easy to type it out when we know it then you want to send text as Hardware Keys like this so now we is saving it but we also wanted to remember when we here and press controls we also need to press save so we will add that one in and that will be a click UI element in window remember here that we're not on the web page anymore of course we have it in the background but this download window that is in fact a UI element so make sure you take that one here click UI element in window and then we want to create that UI add UI element take the save button control click the save button and we click save so now we're downloading it we also know that we need to read it but sometimes there's a little lack of maybe one second so we want to add a little delay and we want to have a wait for file and that is so we want to pause to flow until this file is downloaded so after we click save we will have a wait for file wait for the file to be created what file do we need to wait for well we want to wait for the HTML file path because that is exactly where the file is going to be downloaded and yes we could make this even more stable but that's not part of the exercise so here we have it we can also say only wait 10 seconds because it should be downloaded by then I can do this so then I know that either it fails here then the whole automation stops we will not do error handling today we could do and then we can start reading from the file so here I will say read text from file so this is we take everything here and here the file path that will be the HTML file path here so what do we want to say well we want to read it as a single text value that is fine so here down here let's just pick a better name I will say web page HTML so then we saved it into web sorry web page HTML I save it here let's we also want to delete it because otherwise we'll have a popup box where it says should I overwrite and all these things let me just uh go back here and let me just cancel here so if we try to click save and the file already existed existed it will with would override so let's find a delete files and have it in here right after R read it so and this will just be the HTML file path like this so now we can start to now we have this uh all the entire HTML we can take out the body part because we know that that's where it is of course we can send it enre HTML file up but because you pay per data that means that it will get more expensive than simply just isolating it to the body so that's what we're going to do we know we have it here in the web page HTML so now you find a crop text here and right after the delete files so the original text that was the web page HTML here in the mode I want to have it between the two specified flag and that is exactly like we searched for before that would be the body here and let me control C copy it here and then you want a forward slash here so we want to look in there and let me do this click on the variables produced is flag found don't use that and the crap text let us just say HTML body so now we have the body um I olated here in this variable in the crop text now we want to take and create the prompt and let's do so so that one will be after the crop text this is the prompt that we will send to chat gbt not in the browser this time but through the API call so we will have a set variable we will have it here and up here we will call this prompt that will be our prompt and here we could go to chat DPT and take take what we had uh created before if I didn't close the window here and let me go up here and and I need to remove all of this so let me just take the last part just because I'm lazy I can also take the single quotation marks then we will write this up here and yes we could write everything or we could um so here I'll say this or we could not have done it this is the HTML uh body of a web page colon then we have an enter click then we have these three single quotation marks and now we're not going to use the HTML as copy paste but we will use the HTML body so click this little X here HTML body make sure you pick the right variable enter three single quot we didn't need that we can just press control V then we have the last part of it of course you're more than welcome to rewrite it so what we have here is that we have the prompt and we can click save what you need to do here is that um the API um will not accept um because we using the de notation we need to take out uh we need to ensure that quotation marks in our prompt are not confused with the quotation marks by the Json formatting so yes I know there's quite a few steps here but I hope you learn lot because this will not only teach you to use to leverage these AI Technologies but it will also uh improve your power toate desktop skills dramatically so the text to pass we will work within the prompt here the text to find that will be a quotation marks we place it with the single quotation mark and that is because we want to make sure that we don't get errors in our Json formatting that is the way to the pass this prompt to the API in a little while let's save it back to the prompt that's fine I can click save now we have a working prompt then we can have a um a variable which where we will have the API uh body Json because this needs to be in a Json format where we send it to um open AI oh we just need to have a set variable here and I'll drag the set variable down here after the replace text so here I can call this one API body Json and now we need to write so at Json we have a curly bracket in the start I'll have a few enter clicks here and curly bracket in the end and then we want to say model in quotation marks and then we want to use the GPT for in the document ation you can use other models so this is our first key value pair so we say we want to use the model GPT 4 and this is all in the documentation now we just write it then we want to have a comma and a new line then we want to have we want to say messages colon and then we want a hard bracket then we want a new line and then we want an array so we have another curly bracket and in in this array of these hard brackets sorry and then we want a new line and I can say roll user comma then we want to have a new line I'll say content and this is also to show you what we can do here and of course it would be easier to copy from the reference then we want to the content is our prompt and yes this is all what open AI say they want so we just write whatever they say they want then we want a new line L then we want an end in curly bracket to end this array and we also want an end hard bracket that is here so this is an array this messages now we have our API body Jason and then we just need to make sure that we have no uh line carriages that will be uh new lines because the API doesn't accept those so then I click save we're almost done I promise so then we will have our rep Place once that is done we can make the API call so here I will have the replace text and I will have it down here so the text to pass that will be the API body Json the text to find and now we're using regular expression so this is not a regular expression but this is an regular expression that finds a carriage return followed by a new line so that's what we're looking for here we want to use the regular expression and then we want to if we find that that would be a line break then we want to replace it with um with nothing and then what we can do here is to say replace with percentage to say it's a it's a code block and then two double quotation marks and a percentage again what this will do is to say this is empty after we click save it will remove one of them and only have one it will still work but you cannot make one here you need to make two so yeah there's a little bit difference between this is an empty variable um it's empty value but um that's just how it is and here we will have save it to the API button again API body Jason like this and click save now we can make the API call and use whatever we get here in this populate text field on web page to make an API call we find an invoke web service uh and put it down here after the replace text the URL that is where we want to send it we already have that up here in the endpoint which we created in the beginning so I simply just find the endut put endpoint variable that was difficult to say and I hopefully if you enjoyed this video if you learn a lot please give it a thumbs up and let me know in the comments that you want more of this that's how I make my living I would love to be a full-time YouTuber so please yeah support it if you like what you see the method that will be post and here we will use the Json formatting this is also part of the documentation but this is the same you write every time so you just do this so the custom headers that will be uh where we use our API key because now we need to authorize that is us so what you will do here is to say authorization colon barer and we will paste in the API key so author right ation Barrel API key then we also want to the request body we also created that one so now it gets easy because we already created we have this API body Json then um you also want to go to Advanced here and disable the encode request body then in the variabl is produced down here we are not using these headers you can delete those then we have this um web uh service response where our results gets saved into then we click save it comes in adjon once it comes back from this API that is just how data is transferred that's called adjon JS o n we will convert it into a custom object and that is because we can work with it easily here in power tomate desktop it's almost the same so here I will find a convert Json to custom object put it in after uh the invoke web service so the Json that will be the web service response here and the variable is produced that will be response custom object like this I can save it so now let's try to see that this works that we actually get out the selector because if we do so we can easily use it down here in the pop at text field on web page so let's have a breakpoint here this just mean that it will por here because then we're done we know this will not work because this is um a static selector so let's go try this and see that it actually works so we're going to launch a new site and we're not going to fill anything in it will click the start and then we're done in the web because we already set a breakpoint point we can go back here oh sorry we had to save it so I think I just messed it up here of course we need to save this sorry we'll we'll try it again that's when you create these long live web uh builds I hope you enjoyed anyway so let's try it again so we will launch it and then we will start and then in a few seconds we will click the control s that might be a little bit delay here and that is just uh the windows and power toate desktop nothing uh nothing we're not working in the chat DPT um yet so here we are in a few seconds we are uh clicking the save it can take up to a minute so I will just fast forward here that's it it tooks a little bit time um and here you can see it always also takes a little bit time to click the save that is probably just my connection now we save the RPA Challenge and we're done here working in the UI so then I go back here and you will see that we are um we came to this breakpoint it's uh the the flow is paused and I can just stop it because we know it will not work here but if I go over to this response custom object I can double click here let me move this this is the response that comes back from open AI so what we want to do here is to go into choices click more here and then if you see uh this uh inside this message so we move into choices then we take the message then we take the content and here you have your selector that will be NW rjw let me see if I deleted this but if I inspect this there you go that's our selector we got we created that with the openai API bingo so let's grab this because we want to isolate this from the custom object so that we can use it so let me close this so once we have it here we want to have a variable with our selector so I have a set variable I want to have it here and we can call this one address selector and yeah now uh it gets a little bit tricky not tricky but um we're going to write an expression we want to move into response custom object we know that then we want to move into the choices so hard bracket single quotation marks choices like this then we want to have a zero that's because it's the first element there's only one but we still need to specify it then we wanted to have the message like this this is just how we move in and then we wanted the content like this so choices zero message content like this read more about this response format on the open AI website but it will look like bort except that um it will come in a Json format which we um converted so that's fine I can click save so now we have this set rle let me also disable this one this breako here so what we want to do here is to open up the UI elements up here and then in this input text um we are going to use this actual selector that gets created here so I can also just right click rename it just to make sure that we can see what's going on it's not necessary but we do it double click it now so this is the old one click Text Editor because now now what you want to do here is to instead um we're not going to um we're not going to use this entire one so what we're going to do is to select the variable and then we're going to find the address selector so then we're using that one instead and the address selector that will be the one where which which we will pass from here to our set variable so that will be this input but we can see we have this pipes around it so what we'll do here is to have a crop text and remove those we did that to isolate the selector so we made completely sure that we had the selector so what we want to do here is to after the set variable we will have a crop text and then we are um we are soon there really really soon we have a crop text here so the original one that will be be the address selector and then we want to get the text uh between two specified flag this one will be a pipe and this one will be a pipe so and then the variables produce is flag found disable that we will not use those crop text that will we will save it back to the address selector so now this is all good we also want to have a little weight here because there's a little limit on the API and how much data we can send per minute so here I will have a 2C uh delay and uh let's just have a wait here go up to the flow control and have a wait here of two seconds like this so um then you can delete if you have anything in downloads let's just um refresh it to see I can also delete this just to make sure that um there's not nothing to be overridden then we want to run and inspect it and be aware here because um we know we will only have 10 out on 70 and that's because we only fill out the address which is uh what we want I can also close all these so we're not going to um have those ones so now we are uh launching Excel I will stay with you for the first uh uh first address here once we do that and then I will fast forward and yes um in this way we can solve the classic IPA task which has become the industry Benchmark for how good we are with working with selectors and yeah it is indeed an extensive procedure the robot doesn't run so fast but imagine the potential we we don't need to use this method for all selectors but it's a really powerful tool to have in the toolbox if we have Troublesome Pages like this one we can also use it as a fallback method that means that we can use the classic selector um and if that one fails we can have this as backup this is not chat DBT to stalls it this is for some reason my browser instance um it as we saw before we saw that I fast forwarded a little bit wide this could also be the fallback method if web developers here we go if web developers um change the website then we want to make sure that we have this one updated there you go we have the North Road and now we will do it similarly it runs a little bit faster now that's probably just the first element uh it had some trouble with uh not trouble but my browser there you go so now we are filling in this and I think this is uh so amazing that it's possible to to to create these dynamically this will be a part of the future either uh you want um to implement it yourself or it will get implemented in the tools so understand it and this is not only uh for selectors but understand how to leverage this open AI API or other large language models apis if you understand those you can easily Implement cool things in your company's IPA solution and if you want to know more and solve problems I created a Discord Community it's 100% free community-driven we help each other with these Solutions and our careers the link is in the description below it's called I love automation Discord um we are 11,000 developers helping so if you have problem with anything here or your career or just want to hang out and create a powerful Network join the Discord so now we have these we are in round eight we will continue to round 10 and then we will have our score but stay tuned I want to show you more cool things we can do with AI as IPA developers so this is is round nine and we will get 10 out of 70 if we of course have passed these things right so um this will be the last round then we click submit and we will see that we get 10 out of seven 70 Fields really really nice so now let's move on to the next next one we want to create test cases to create a test case let's move back to our flow so what we will do here is that we have our flow I will simply justr a contrl c everything and please remember you actually we're going to put this one in a file and upload it to chat gbt so make sure you either change this API key or disable it in the platform. open.com now we um open up another notepad here we paste in this entire flow this is the code behind what we just wrote here so can probably see we had the set Excel path this is written in Robin language is only used in power tomate desktop which were wi automation before so this is rubbin language which is part of the tool that's the back of it you see only the nice blocks which makes it easy but this would be the code that you had to write so let's save this so save as let's go to my desktop and let's call it IPA challenge DPT pad for power toate desktop but this doesn't make a you can call it what you want then we save it we can now upload this to chat DBT and ask chat DBT to uh create test cases and this is nice because often the internal audit wants us to document this test now we can just uh find the best ones here so I do this then I want to attach the file first here in chat DPG and I go to my desktop this was it so I do this then it will upload I can start create my typing my promp create it's been a long case but I hope you enjoyed it create test cases for this code review entire script before answering and here uh please say see I'm not going to say it's power toate desktop I'll just upload the code and then I'll have chat TPT do it for me the cas is must test different aspects of oh sorry aspects of the code export the cases to an Excel sheet the sheet must contain columns uh with expect Ed result and result and then I want to say be very explicit so exit like this so this is my prompt We R entire script before answering so here we send it true we uploaded the file and here this only works in chat gbt 4 which is the paid version so now it reads my text and um it says what it does it says involving in interactions with Excel web pages and an API so um here it says what um how we can test it so um we have test with an Excel file having the expected it creates a lot of test data test cases this is really nice now it says that it will create an Excel sheet with these test cases and the specified columns so here we can see that it uses python we don't need to understand python at all although I recommend it if you are an RPA developer um so now here we can see that what what happens if it's an invalid or expired API key then you want to do this or do that so now it creates all it creates the code for the test cases and in a little while we will have our Excel uh gets produced so here then I can say download the test cases Excel sheet I downloaded it here with all my IPA challenges and if I go up here I can do this and I can do that so now we have test cases and the expected results just printed out I have the best test cases I just uploaded the script for my robot the next one we want to see is the power automate co-pilot because now we want to start this flow from the cloud based on the trigger we only want to do it with our words to use co-pilot in power automate that is power automate Cloud I can close these test cases and let's start up a browser then you want to go to powermate.com and log in if you're not already logged in I am then um this is the workflow engine be in the Power Platform it's closely related to power toate desktop then I'm saying create I will say instant Cloud flow and here I'll call this one RPA challenge stup for now we will just manually trigger our flow and we will click create so here we have the canvas this is the new designer and we have the co-pilot over here Microsoft Pur uh 49% of open Ai and that's why we have it here H co-pilot with GPT integrated in our flow with just natural words we can build our flow so let's CH change that so here I'll say change my flow so that the flow is started whenever I and let's just fix this spelling whenever I receive an an email if the subject of the email is RPA challenge then run a desktop flow like this when the desktop flow is done running move the email to a folder called processed uh processed here so if I click enter Now power automate will say that oh you need to remove this trigger and then we need to add those ones here and here we have our flow so we have a new trigger when a new email arrives then we have a condition and here I can check this is when the subject is equal to the RPA Challenge and here I can see invalid parameters that means that we need to fill that one out so and that is because we need to select a desktop flow so if I go back here we called it RPA challenge DPT a while ago so if I scroll this one down here then I can find the RPA challenge um DPT so let me just uh find it here um maybe I scrolled through it RPA challenge GPT I have a lot of flows here it is chat DPT or did I call it GPT IPA challenge GPT sorry that was the wrong one um that is the I have a lot of GPT let us just see something ending in DPT uh and I know why I can't find it that is because we haven't saved this flow yet so um let's just make sure we save it so we can see it here and um that is something that you once in a while will see so um let me just uh do this and now we are refreshing we can also search we can see here so then we searching for IPA challenge DPT here we have it so now we created a flow that says that when a new emails arrives then we want to uh run this flow we also see we have this move here and this will move each one of these emails so yes we could have made it differently can move this move email up here so it only moves when this flow runs or we could change the condition to uh a filter up here so once this runs um this flow will run in power to my desktop and I can also close this one here so let us try to test it so for that I have an email here I will send this to myself here and we know that we need to in have the subject called RPA Challenge and down here I can just say blah blah doesn't matter so if I send this to myself like this the the flow should start I can go out here oh I have to save it sorry and um then I need to forward this one again um now we save it let me forward this email and let us see here so here I will send it again because now we saved it uh remember to save your flows will be the keyword of today I like these live builds because you can see how I work and think and how we sometimes stumble into like small things that we need to fix I also do it so don't worry just know how to fix them and again we can say blah blah so now the trigger should run this will usually take like one minute then we can see that the flow runs down here we will see that uh we trigger the flow if we have the connection here to the MK Ms s o OJ and here I can just um refresh press this a little while then we will see that um once this triggers then it it usually takes like 30 seconds then um this will trigger now you can see our flow is running so now it runs then you will see that we are starting our um so now it it runs through then you will see that uh something happened here on our desktop now it starts the RPA Challenge and we kicked it off from Power automate just through co-pilot if you enjoyed this video you should definitely check check this co-pilot guide that's a complete guide that will take you to get started with co-pilot and also learn how to use chat DPT with Exel those are my two advices to you have a great day
Info
Channel: Anders Jensen
Views: 9,934
Rating: undefined out of 5
Keywords: power automate desktop, power automate, ai, generative ai, rpa challenge, tutorial, 2024, copilot, use ai in power automate, use ai in power automate desktop, how to use chatgpt in power automate desktop, how to use openai in power automate desktop, chatgpt power automate desktop, openai power automate desktop
Id: cieSRNUykvo
Channel Id: undefined
Length: 60min 44sec (3644 seconds)
Published: Mon Feb 19 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.