Hello,

Sign up to join our community!

Welcome Back,

Please sign in to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Sorry, you do not have permission to ask a question, You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Home Latest Topics

  • 29k
  • 29k
Kevin Stratvert

🤖 How to use Microsoft Power Automate Desktop – Full tutorial

video
play-rounded-fill

Hi everyone, Kevin here. Today I want to show you how you can use Power Automate Desktop. With what I like to call PAD, you can automate repetitive and mundane tasks. Basically, the type of tasks that you would hope to never have to do as part of your daily job. To help you understand what you can do with it, I want to share just a quick example. Let’s say that my boss comes up to me and says, Hey Kevin, I’d like you to transfer data from this one legacy system over here, it’s really old. And I want you to transfer all of the data over to this other legacy system over here, which is also very old. Now at first glance, it seems like it should be straightforward enough, but when I dig into it, I start to realize that these truly are legacy systems and there are no APIs and there’s no programmatic way to transfer the data between these. So, it starts to dawn on me that probably the only way that I’m going to be able to do it is to manually go through and copy the data from one system and then paste it into the other system. Now at this point, I’d probably start looking for new work, but luckily with PAD, I could have the computer do all of this for me. With PAD, I could basically go through and tell it step-by-step what I want it to do. Copy this field over here and then paste it in this field over there. It’s kind of like using a macro in Microsoft Excel, if you’ve ever done that before, but instead of being limited just to Microsoft Excel, you can write a macro across any application on your computer. In a sense, it’s somewhat magical and extremely powerful. We’re going to start with how you can get PAD, then we’re going to run through a simple example and at the very end, we’ll finish off with a more complex example just to help you understand the capabilities and what you can do with PAD. All right, well, why don’t we jump on the computer and let’s get started. We’re going to start off with how you can get PAD, but before we do that, I do want to call out two caveats. To be able to use PAD, you need either Windows 10 Professional or Enterprise, and you also need a work or school account. If you have those, you should be able to follow along with no problem. To get started, let’s head to the website, office.com, and once you land on the website over on the left-hand side, click on Sign In. Once you sign in, that’ll drop us on the office.com homepage. Down on the left-hand corner, you’ll see an icon for All Apps, let’s click on that. This opens up the All-Apps page and right over here on the right-hand side of the page, you’ll see an icon for Power Automate, let’s click on that. This will drop us on the Power Automate homepage. To get the desktop app over on the left-hand side, let’s click on the icon that says Create. This will drop us on the Create page, and right up in the top right-hand corner, you’ll see a dropdown menu for Install. When we click on this, we can install the Power Automate Desktop app. Go ahead and click on this and run through the installation process. Down below, there’s also a second option for an on-premises data gateway. What this allows us to do is when we set up automations in the desktop app, if we want it to connect to any automations that we might have on the web, we can use a gateway to create that bridge between the two. For today’s tutorial, I’m going to look exclusively at the desktop app. Once you finish installing PAD, go ahead and launch the application and you’ll land on the screen that looks like this. In the top left-hand corner, we can kick off a new flow and in a moment, we’re going to do that. Down below, you can also see all of your recent flows. This is where you could also run, stop, rename, any of your existing flows. In the top right-hand corner, especially if you have a lot of flows, you can search through your list and here you could choose the environment where you want to view all of the flows or the environment for where you want to create a flow. I’m going to leave it in the default environment. We’re now all ready to kick off our very first flow, so let’s go up to the top left-hand corner and click on this text that says New Flow. This opens up a prompt and we need to give our new flow a name. For this example, it’s going to be really simple. We’re just going to launch an app and then we’re going to close an app. I’ll type that in as the flow name. Next, I’ll click on Create. This drops us into the PAD Designer and we’re going to be spending most of our time here. This is where we build our automations. I want to orient you to the experience just so you understand what’s where. Over on the left-hand side, we have a pane with all of our different actions and there are many different actions you can choose from. In fact, there are over 300 different actions. An action is an instruction that you want the computer to execute on your behalf. And just to show you some examples of what you can do, here if I click into File, you can do things like copy files, move files, delete files. Here if I jump into, let’s say, Web Automation, you can launch a web browser. You could go to a specific website. You could also extract data from that website. Here too, up above, let’s say I have a specific action in mind. Rather than navigating through this list, I could also just type it in. So, let’s say I want to launch an app. Let me type in app. And here I see an action for run application. So I could run any application on my computer. So once again, you have a massive number of actions that you could choose from. In fact, if there’s some step that you can take on your computer, chances are you can turn that into an action. Once we start going through and we start selecting different actions that we want the computer to take, it’ll add them to the main canvas over here. And this will show us a list of all of the different actions that we want the computer to take. And once we start adding them to this list, we can save it. We could run through the list. We could also stop running through it. And over here, we have two more different actions. So over here, you can go through and you could select different actions you want to add to this list. Or as an alternative, you could open up the web recorder or the desktop recorder. What this will do is when the recorder opens, you can click on different buttons on your screen. You can navigate to different places on your computer, and it’ll record all of those different steps that you take. So it’s an alternative to going through and selecting actions on this menu. Over on the right-hand side, there are three additional panes. We have variables right here. You can pass in variables into your flow that you create. You could also get output back from this flow. You also have something called flow variables. And as we start building our very first flow, we’ll see exactly how this works. Down below, you also have different UI elements. These are basically things that you’re clicking on on the screen. As we go through the example, we’ll pull in some UI elements and you can see how this works. Down below, you also have images. And if you capture any images as part of your flow, you’ll see them here. All right, well, now that we’ve walked through the basic interface here, it’s time to start pulling together our first flow. For the very first flow, we’re going to keep it pretty simple. I want to launch Excel, then we’ll show a message box, and then we’ll close Excel, just to show you just the basics of how PAD works. Over on the left-hand side, we want to choose an action that launches Excel. Here, I see a category for Excel, so I’ll expand that. And one of the first options here is to launch Excel. So here I could click on that and I could drag it over onto the canvas. And here you’ll see that my first step is launching Excel. This opens up a prompt where I could specify exactly how I want it to open. So I could have it launch with a blank document, or I could choose an existing document. I want it to open a blank document, so I’ll choose the first option here. I could also decide whether I want the instance to be visible or not. So do I want Excel to open so I could see the window, or do I want it to stay in the background? For now, just because this is a simple example, let’s leave it so it’s set to visible. Down below, I also see that it’s going to produce a variable called Excel instance. So if I want to reference back this open instance of Excel, I can reference that variable. So this will add our very first flow variable over here on the right-hand side. Everything looks good here, so I’ll click on Save. Back on the canvas now, we see our first step for launch Excel, and once again, I now have my flow variable with the Excel instance. So Excel is going to launch, and why don’t we click on Run just to see how this works? I’ll click on Run. This will now start executing my flow, and as we can see, that launched Excel. So, look at that. We have our first flow taking shape. As the next step in this flow, I want to show a message prompt. So over here on the left-hand side, once again, I could navigate through here and find a display message, or I could go up here to search, and let me just type in message. Right down here, I see that I can display a message. Now I could click on this action, and I can drag it over to the canvas. You’ll see this line appears, and that denotes the place where I’m going to put it in this list. So I could place it after launching Excel, or I could place it before launching Excel. I want to place it afterwards, so I’ll release it right there, and now I could type in the details of my display message. Let me go ahead and I’ll type in a title and a message to display. I just typed in the message box title, launched Excel, and for the message to display, you successfully launched Excel. Here I could go through, and I could select different details of this message box, but all of this looks fine, so I’ll leave it as is. Down below, here I’ll also see that it’s producing another variable or another flow variable, and this is whether the button was pressed. Now display messages, it’s not really that useful in this scenario. I’m just launching Excel, then I’m showing a message, but you can use display messages if let’s say you want to see the value of a flow variable or an input or output variable as you’re running your flow, these displayed messages can be very useful for that. So I typed in all the details here, let’s now click Save. Now I have both of my steps, and once again, I can click on Run to see what it looks like. Here I see Excel launches, and then I get a message telling me that it launched Excel, and great, it looks like it was successful. Back in the main designer, I now want to add another step where I close Excel. Back over here in Actions, I can click on Excel, expand that, and I see the option to close Excel. I could click on this action and pull it over into the main canvas. Now, once again, we see that line there, and I can choose where I want this action to take place in the flow. Now, I wouldn’t want it to happen before I launch Excel, it only makes sense at the end, so I’ll drop it right down here. This opens up a prompt where I could specify how I want to close Excel, and at the very top, it says Excel Instance. Basically, which instance of Excel do I want to close? Now, remember earlier on when we originally launched Excel, it generated an Excel Instance flow variable. Here, we specify that variable here, so whatever variable is produced in the first step, here, we’re referring back to that variable right here, so we’re going to close the same instance that we opened at the beginning. Down below, I could also indicate how I want it to close, and for now, I’ll just say do not save document, but I could also save the document if I’d like to. All of this looks good, so let’s click on save. I now have three different steps showing up in my flow. If I wanted to modify any of these steps, I could simply click on the item, and I could drag it to a new position, so maybe I want to launch Excel, then close it, and then show the message. Here, I’ll move that back to the second position. I could also click on one of these steps, and I could press Control C to copy it, and then I could press Control V to paste it, so this way, I could copy one of my steps, and maybe I want to paste the display message to the end again. Now I have a full flow, so let’s click on run to see how this works. Here, it launched Excel, and I also see my message prompt. When I click OK, it’ll now close Excel, and once again, I see the message prompt. Let’s say maybe I don’t want one of these steps anymore. I could click on that step, and then I could press the delete key, and that’ll remove it from my list of actions that I want the computer to take. All right, we’ve now completed our very first, very simple flow. It’s not the most useful flow. We simply launch an app, show a message, and then we close the app, but it shows you some of the basics of how you could use different actions to start building a flow. Now that we’re all done, let’s click on save, and let’s go back to the main interface, and we’ll build another flow that leverages some UI elements. Right up here, I’ll click on X, and here we are back on the main screen. On the main screen, let’s go to the top left-hand corner and click on new flow. For this one, I want this to leverage the calculator, so let’s call the flow calculator. We’re now back in the PAD designer, and it should now look familiar. This is our second flow that we’re going to pull together. This time, I want to launch an application, and then we’ll use the desktop recorder to capture some UI elements. Up here, I want to launch the calculator app, so let’s go up to actions in the top, and then let’s type in app. Here, we want to run an application, so I’ll take this action and pull it over into the canvas. This opens up a prompt where we could specify the application that we want to run. Now, I already looked up the application path for the calculator, and it’s located in this location, so if you want to follow along, feel free to type in this location. All of the other settings look fine, and once again, one thing to call out is we’re producing a variable called the app process ID, so if we ever need to refer back to this app or this instance of the app that’s open, we’re going to have that in our flow variables. Once we’re good to go, let’s click on save. The first step launches the calculator, and to make sure that it’s working properly, let’s click on run. Here, we can see that it launches the calculator app, and we now have the calculator available to us. Next, I want to capture some UI elements using the desktop recorder. This also shows you how you can use the recorder to capture some of the steps that you’re taking. Here, I’ll click on desktop recorder. The main designer screen disappears, and now we have the recorder over here. Now, let’s just do a very basic example. Maybe I’ll just do two plus two. So here, I can click on start recording. So the recording is now on, and I’ll go over to the calculator, and here you see that it highlights one of the UI elements on my screen. So here, if I hover over the number two, you see this red rectangle around it. Here, I’ll click on number two. Over in the recorder, you see that it now captures that action. So it says I pressed the button, and it was the number two. I could pause the recording if I want to do something in the meantime, and then resume recording, but for now, I’ll keep recording going. Next, I’ll click on the plus icon, and here too, you see another step was just added. Here, I’ll click on two again. So we’ll click on two plus two, and next, I’ll click on equals. So here, all of my steps have been recorded. Next, let’s click on finish. Back within the Flow Designer, here, I can see that we launched the application, and I see all of the steps that I just recorded. It goes through two plus two equals, and then we get the result. So here, if I run it now, this will launch the calculator, and now it goes through and adds two plus two, and it gives me four. So once again, it’s copying all of the different mouse clicks that I made, and here, I could see all the steps that it went through. As I clicked on the different buttons on the screen, PAD created UI elements for me. Here, I’ll go over to the right-hand side, and remember when we oriented ourselves to the experience, there was a category called UI elements. Here now that I could see that it identifies the window calculator, and it pulled out the button two. Here, I could click on it, and I could see exactly what that looks like, and then I could see plus, and I could see equals right here. If I want to add additional UI elements, once again, I could go back to the desktop recorder, and I can capture UI elements that way, or I could click on this button that says add UI element. When I click on this, this once again opens up my screen, and here I see the calculator. So let’s say I wanted to do three plus one. Here, I could click on three, and if I press the control key while clicking on it, here it adds a new UI element. Next, I’ll click on one, and I’ve already captured the equal sign, so there’s no reason to click on that again. So now I’ve included three and one as additional UI elements. Next, let’s click on done. This drops me back into the PAD Designer, and within the UI element screen, I now see that for the calculator window, I now have three and one as additional buttons, and I could leverage these UI elements as part of my flow. So previously, I took two and I added it to two, but let’s change it to one plus three. So here, I’ll select the first button press, and when I click on that, here it’s currently referencing the number two, but I can now change that to, let’s say the number one, and here you can see the UI element that corresponds with the number one. So I’ll select that and then click on save. Here for the number two, I can double click on that, and here too, I’ll change it from two, and this time, I’ll change it to the button three, click on select and click on save. Now, instead of adding two plus two, it’s going to add a one plus three. Here, if I run it, let’s see how it works. Here, the calculator adds one plus three, and that gives me four. Back on the main screen, to get this flow here, we use the desktop recorder, but I also want to show you how you can set up this same exact flow using the actions over on the left-hand side. For now, let’s select all of these different items and hit the delete key. So once again, you can very simply delete any of the steps in your flow. Over on the left-hand side, there’s a category called UI automation. UI stands for user interface. The easiest way to think of this is this is any clicks on Windows, any clicks on buttons, those are all referred to as UI. Over here, there’s an item called click UI element in window and on the calculator, we want to click on different elements within that window. So here I can select that item and I’ll drag it over into my flow. This opens up a prompt where I can specify which UI elements to click. Right down here, currently it’s blank, so let’s click on this dropdown. And here I see that I’ve already added UI elements for the calculator app. We use the desktop recorder to capture some of these UI elements. You could also go over to the pane over here like we did before, and you could add UI elements this way as well. Also, let’s say you want another way to add UI elements. You could also click on this, add a new UI element. And this, once again, will open up the same exact screen where we could add additional UI elements. Now I’ve already captured all the UI elements I want, so I’ll simply click on this dropdown list. And once again, we’ll do two plus two. Here I’ll select the button two and then click on select. Here you could specify the click type. We just want this to be a left click, but you could choose all different types of clicks. Once you select that, let’s click on save. And so far, this will open the calculator. It’ll click the number two, but then we want to add, and then we want to have another two, and then we want the equals. Here I’ll click on that action, and I can copy and paste it. So here now I have another step. Here I’ll click on this next step, and here I want it to add. So I’ll go down and let’s choose a UI element for plus, then click on select, then click on save. Here I’ll paste in two again, and let me just make sure that’s after the plus. And then I could paste in one more step, and I want this to be the equal sign. So here I’ll go in and choose the UI element for the equals press. Then I’ll click on select, save, and if I click on run, this will be exactly the same as the flow that I created with the desktop recorder. So just another way to create the same exact flow. Now you could use either the desktop recorder, or you could simply add the different steps depending on which one you prefer and which approach you think is easier. Here let’s run it and just verify that it works the same way. You probably never thought adding two plus two would be so exciting, but we just automated our computer again. So far we’ve been looking at some of the fundamentals of how you can create your very first flow in PAD. Now I want to switch gears and we’re going to look at a more advanced example. If you want to follow along with this one, I’ve included all of the sample files in the description of this video. Here at the Kevin Cookie Company, and yes, I was able to incorporate the Kevin Cookie Company into this tutorial, we have a whole bunch of cookie order forms. And these order forms are all different Word documents. If I open up one of the order forms, you can see the type of information that’s contained within. I have the order number, the customer name, the cookie type, the quantity, and there’s some additional information on here. Now I want to take all of this information from each one of these different order forms and I want to consolidate it or aggregate it into this order tracker that I have in Excel. Now previously, I’d have to go through each individual Word document. I’d have to copy out the information and then I’d have to paste it into Excel. But of course, that takes a long time. It’s a lot of manual work and I really wouldn’t enjoy doing that. So instead, why don’t we use PAD to extract information from each individual Word document and place it into this Excel sheet. Now in this example, I only have five order forms. So there aren’t really that many and you could do it manually, but let’s just imagine I had a thousand order forms or 10,000 order forms. It would be a lot of manual work. Within PAD, just like we’ve been doing all along, let’s go to the top left-hand corner and click on new flow. This opens up the prompt and for this, I’ll say order form in Word to Excel. Once you’ve finished typing in the name, let’s create our flow. We’re back in the PAD designer and as a very first step, I first want to get all of the files that are in the folder. So here, if I go back to my desktop, I have all the cookie order forms within this folder called cookie order forms. So, the first step is going to be to retrieve all of these files. To retrieve all of the files, over on the left-hand side, we have an action category for folders. When I expand this, I see all these different actions that I can take on a folder. Now, I want to get all of those files from within the folder and the very first action here is get files in folder. That sounds exactly like what I want to do. I’ll click on this action and then drag it over onto the canvas. This opens up a prompt and I can select all of the different parameters. Here at the top, I can specify the folder that I want to get files for. Over here, I could click on this and I could hard code the folder that I want to get files for. Here, I have the folder on my desktop, so I’ll select desktop and right down here, I see my cookie order forms. I’ll click on that and then click on okay. Down below, I can also apply a file filter. Let’s say I had different file types in there or maybe file types that were unrelated to the order forms, I could filter them out. Down below, I could also specify whether I want to include subfolders. I don’t have any subfolders, so I’ll leave that checked off. Down below, here you’ll see that it produces a variable and this variable is a list of all of the different files that are contained within that folder. Just like we’ve seen earlier in the other examples, it’ll add a flow variable over here and we’ll be able to leverage that later. All of this looks good, so let’s click on save. It’s now added the first step to the flow and it’s going to get the files in the folder. Here too, we can see some of the specifics of what it’s doing. So it’s getting files in this specific folder. Here, we can see the filter that’s applied. So it’s just going to fetch all of the different files within that folder and then it’s storing them in this variable. And here again, we can see the variable over on the right-hand side. Next, I want to launch Microsoft Excel. So just like we did in the earliest example today, let’s go down to Excel and then let’s click on launch Excel. Here, I’ll drag it over and that’ll be the second step of our flow. Here, it says launch Excel, but we don’t want to launch with a blank document. We want to launch with our order tracker. So here, I’ll click on the dropdown and I’ll select open the following document. When I select that, I can choose a document path and I’m going to hard code this as well. I’ll click on select file and I have the file sitting on my desktop. So I’ll navigate there, select the order tracker and then click on open. Back on the main screen, I could also select whether I want to make the instance visible. I’d like it to show up as it’s running through this. So, I’ll leave that toggled on. Here, I’ll see that it produces a variable called Excel instance and that’ll add it over into flow variables. This all looks good, so let’s click on save. Now that I have Excel open, I want to go through each individual order form in my folder and I want it to scrape out all of the details and I need it to go through document by document. To do that, I need to use something called a loop and over on the actions menu, there’s a category for loops. If I expand that, I see a few different types of loops that I can use. Now, I want it to go through my folder and for each file within the folder, I want it to pull out the details. So I want to set up a for each loop. I can click on this action and I’ll drag it over onto my canvas and I’ll put it after launching Excel. This opens up a prompt where I can specify the value I want the for each loop to iterate over. Now, once again, in the first step, we got all of the files in a folder and then we created a variable with a list of all of the files and that variable is called files. So I want it to go through that list of all of the files. Over here, I can click on the select a variable icon and here I could select the list of files. So, I’ll select this variable. You’ll see here, there’s a percentage sign, files and a percentage sign. This is how PAD denotes a variable. Down here as well, I see that not only is it going through this list of variables, but it’s also creating its very own variable called current item. So when the loop runs for the first time, it’ll pull out that one document and it’ll store it in current item. When it goes through the loop again, the current item will be the second document that it goes through. So each time the loop goes through, this current item will update. All of this looks good, so let’s click on save. We now have the loop showing up in the canvas and we can add steps within the loop. So whatever steps I have within the loop are going to be repeated for each document within the folder. As the first step in our for each loop, I want to take the current item and I want to rename it extract. We’re going to use this one file to extract all of the order details. The reason for this is we’re going to identify UI elements and we want to make sure that they’re the same across all files. To rename the file, let’s go over to the left-hand side and click on file. And here we see an action for rename file. Let’s click on this and then let’s drag this within our for each loop. This opens up a rename file prompt. And first I could select the file that I want to rename. Now I want it to rename every single file that’s within the list. And so right now it has the current item. I’ll click on select variable and I’ll select the current item. So each time the loop goes through, it’ll rename the current item. I’ll select that. And for the new file name, I’ll type in extract. Down below, I could also decide whether I want to keep the extension. That’s .docx and I do want to keep that. Down below, it also says if the file exists. Now, every time it runs through this loop, it’s going to rename the file to extract. So it’s going to exist the second time it runs through all the way up through the last time it runs. So here I’ll click on this dropdown and I want it to overwrite the existing file. So, I’ll select overwrite. And down below, let’s click on save. Now that I have a renamed file, I want to open Microsoft Word so we can extract all of the details from the Word document. Now I need to launch the application. So let’s go over to the left-hand side under actions and here I’ll type in app. Here, the action is run application and let’s pull that over and we’ll do that after renaming the file. This opens up a prompt where we need to specify the application path of the app that we want to launch. And I’ll show you a quick trick how you can get the application path for pretty much any app on your computer. To find where an app is stored on your computer, simply go down to your task bar and within the search field type in Word. This is the application that we want to open. Here I see Word up here. I can right click on this and then we can open the file location. This opens up File Explorer with the location of the shortcut. Now the shortcut is not going to launch the application. So once again, we can right click on the shortcut and then open the file location of that. When we click on this, this will navigate us to where the EXE is and this is exactly what we want. To copy this path now, press the shift key on your keyboard together with the right mouse button. This opens up a context menu and right down here we can copy this as a path. Let’s click on this. Back now within PAD, we can paste in the application path. I’ll paste in what I just copied. The one thing you want to make sure you do is remove these quotes from the path. Here I’ll delete those. Down below, we also need to enter in a command line argument to open up the file that we just renamed. Down below, let’s enter a forward slash, a T and then type in the document location. For the document location, we also need to enter quotes at the beginning and at the end. Once we’re all done, let’s click on save. As a next step, we want to create some UI elements within our Word document. So let’s minimize Power Automate and let’s go back to the cookie order forms. For now, let’s take one of our order forms, let’s copy it and paste it and then let’s rename the copy file extract. Next, let’s open up the new file called extract. Back within PAD, we need to indicate some UI elements that we want to scrape from the Word document. Over on the right-hand side, just like we did in the earlier examples, let’s click on UI elements and then down below, let’s click on add UI elements. This opens up the add UI elements prompt and I also have my Word document here that we just created called extract. Here, we want to pick out all of the data that we want to extract from this document. Here, as I hover over the different elements, I can select which elements I want to copy. So here, I want to take the order number all the way down through the desired delivery date. Now, once again, to add a UI element, I press the control key and then I click on an area of the screen. So here, I’ll get the order number, I want to get the name, the cookie type, the quantity, how they heard about us, the preferred delivery method and also the desired delivery date. So here, I have all of my UI elements. Let’s click on done. Back within PAD, within UI elements, I can see all of my UI elements now. Right now, they have mostly unfriendly names that are hard to understand. Over here, I know this is the order number so if I go over to the ellipsis on the right hand side, I can click on that and I can rename the elements. I’ll go through and rename all of them. I’ve now added UI elements and I’ve renamed them for all of the different elements that I want to scrape from my Word document. Next, I want to extract data from the window. So over on the left hand side, under UI automation, if I click on this, there’s a category for data extraction. When I expand this, right here, I see an option for extract data from window. This is what I want to do, extract data from a Word window. Here, I’ll click on this option and I’ll pull it in underneath run application. This opens up a prompt to extract the data from a window and essentially what I’m doing, I’m taking one of my UI elements, I want to take the value of that UI element and I want to save it as a variable. So here first, I need to select the window. So here I see my window with all the UI elements. First, I want to select the order number. I’ll pick that as one of the UI elements, click on select. Down below, I can decide where I want to store the extracted data and I don’t want to just put it in an Excel sheet yet. Instead, I want to save it as a variable. So I’ll select a variable and down below, it’ll show me what variable will be produced and currently it’s called data from window. Now that’s not really that descriptive. I can click on that and I can give the variable a new name. Now I have to leave the percentage sign in front and in back because that’s what makes it a variable but here I can modify the middle of it. So here I’ll call my variable order number. So, it aligns with my UI element. That looks good and next let’s click on save. I’ve now created my variable and here you’ll see it’ll extract the record from that UI element and it’ll save it as order number. If I go back over here on the right-hand side, I can click on variables and here now I see that I have a new variable that I created called order number. Every time it runs through all of these files, when it runs through the first file, the order number will match the first file. When it goes through the second file, it’ll match the second file. Now I want to go through and do the exact same thing for all of the different UI elements. I want each one of these UI elements to be stored as a variable. So I’ll go through and do the exact same thing, extract the data as I did with order number and I’ll do it for each one of these. I now have variables for all of my UI elements. I now want to pass the value of the variable into Excel. But before I can do that, I need to find the first available row in Excel and luckily PAD can help me with that. Over on the left-hand side, I have a category for Excel. I’ll expand this and here at the very bottom of the list, there’s an action for get first free column slash row. Let’s click on that one and pull it into the canvas. This opens up a prompt and first I need to select the Excel instance. And here the Excel instance, when I launched Excel earlier, it created a variable called Excel instance and here it refers back to that. This will produce its very own variables. Here I’ll get one variable with the first free column and another variable with the first free row. That’s perfect. Let’s now click on save. I now have all of my variables. I also know what the first free row is in the Excel sheet. The pretty much the last thing I need to do now is write to the Excel worksheet. And I still have the Excel category open here and one of the actions is write to Excel worksheet. Here I’ll select this item and drag it over as the next step on the canvas. This opens up a prompt where I could define how I want to write the data to the Excel worksheet. First, I need to choose the Excel instance. And once again, when we launched Excel earlier, we got a variable for Excel instance and here I’m going to refer to that variable right here. Next, I need to specify the value I want to write. First, I want to write the order number. So here I’ll select a variable and here I can see all of the different variables available to me. If I scroll down a little bit, I see a variable for the order number, so I’ll select this item. For the write mode, I want to write it into a specific cell. For the column, let’s jump back into the Excel sheet to see which column we want to write it to. Within the Excel sheet, I can see that the order number is the first column, so we want to write to column one. Back within PAD, for the column, I’ll enter one. Down below, I could also specify the row and I want to make sure I enter this into the first available row. So here I’ll click on the select variable and here I can go down and I’ll find a variable for the first free row. Here it is, I’ll select this variable. All of this now looks good, so I’ll click on save. I’ve now added my step to write to the Excel workbook and it’s going to write the value of order number and here you can see all of the details. Now, I’m going to go through all of the other variables and set up something similar to this and I’ll specify the specific column that these other variables should go into. I’ve now gone through and I’ve added an action for each one of these variables. So for the order number, the customer name, the referral, I’ll go through and I’ll write each one of these to a specific column and an open row within the Excel spreadsheet. As the last step of the loop, now that I’ve copied all of the data into the Excel sheet, I want to close the Word document. This way I could open up the next document in Word. Over on the left-hand side, under the system category, here you see the option to terminate a process. I’ll click on this action and then I’ll drag it over to the very bottom of my loop. This opens up a prompt where I can specify what process I want to terminate. First, I have an option to choose a process name or a process ID. Earlier when we launched Word, that generated a process ID, so I’ll select process ID and here if I click on select variable, I can select the app process ID that we got earlier. I’ll click on that item and then click on save. Here, back in the main view, if I scroll up just a little bit, here again, we see when I launched Word. If I double click on that, here again, we can confirm that it produced a variable called app process ID. We’ve now finished entering in all of the different steps of our flow and our automation. Before we click on run up above, let’s take a quick moment to review all of the different steps. If I go up to the very top, first, we’re going to get all of the files. So these are all of the order forms that are contained within this folder. It’s then going to take all of those files and store it as a list within this variable called files. Next, we’ll launch Excel and we’re going to open this order tracker sheet. That’s when we kick off the loop and we’re going to go through every single order form that we stored in files. Here, first, we’re going to take the current item and we’re going to rename it extract. Then we’re going to launch that file in Word. Then we’re going to go through and we’re going to extract all of the data from the Word document. We’ll find the first available free row in the Excel worksheet and then we’ll write all of the data into Excel. Then at the very end, we’ll terminate the Word document and then the loop will just continue again where once again, we create the next document, we open Word again with the next document, and then it’ll keep going through until it goes through all of the different documents. Now, one more thing to clean up before we click on run, we created an extract file so we could get all of the different UI elements. Let’s delete this file before we click on run. Back now in PAD, we are ready to kick off this flow. In the top left-hand corner, let’s click on run and let’s see it work. Here now you can see it open up the Excel document. It’ll go through and open up each of the Word documents. And here you can see it start populating the Excel file. And there it is. All of those separate Word documents are now consolidated into one Excel spreadsheet. This was just a basic example showing you how we can bring data from Word to Excel, but with PAD, you can really connect any application together. We didn’t get into it today, but you can also take these desktop flows that we created and you can also connect them to web flows. So all in all, PAD is extremely powerful and also versatile. Before we wrap up, one thing I want to call out, especially if you’re using multiple monitors, you really have to be cautious. When I pulled together this flow using multiple monitors, my UI elements just weren’t working properly. When I switched back down to one monitor, identified all the different UI elements, then it seemed to work as I expected. So just a word of caution. All right, well, that’s how you could get started using Power Automate Desktop. If you found this video helpful, please give it a thumbs up. To see more videos like this in the future, make sure to hit that subscribe button. Also, if you want to see me cover any other topics, leave a comment down below. All right, well, that’s all I had for you today. I hope you enjoyed and as always, I hope to see you next time. Bye.

Related Topics

You must login to add an answer.

Hide picture