So, imagine you go to work and
your boss gives you this task: Please extract a list of titles and links for all
our published tutorials to date from this page. Simple task, big problem. The problem is
there are so many tutorials on so many pages. Just the thought of doing this manually gets
you sick in the stomach. Okay, so you go over your options. There's Power Query for Excel, but that
doesn't work because we don't have HTML tables. Google Sheets has an IMPORTXML function, but
it's not easy to set up, especially when it comes to dealing with all these different pages.
But guess what? There is a tool that you can use to do it for you, and it only takes two minutes to
set it up. There is zero coding and you actually already have it on your computer. Well, as long
as you have Windows 11, it's there by default. If you're not running Windows 11, and I assume a
lot of you aren't running Windows 11 yet, you can install it from your Office 365 account. Just go to
your apps, click on Power Automate, go to "My Flows,'" install Power Automate for Desktop, that's the
tool you're going to use. So, I've talked about Power Automate before on this channel. We've seen
the cloud version, but what I haven't introduced you to yet is Power Automate for Desktop. That's
what we're going to do today. Now, I don't just want to go in and say, that's the left side, that's
the right side, that's the middle side, and goodbye. I want to show you a really cool use case for it.
We'll use it for Web Scraping and solve our task. Just to give you a bit of background about this
tool. So, Power Automate for Desktop is a desktop technology that allows you to automate any web or
desktop application, regardless whether it has a built-in API or not. So, that's why it's especially
useful for legacy systems. It uses Robotic Process Automation or RPA, which means you're
building these software robots that perform the actions for you, but you do it in a user-friendly,
drag-and-drop environment without the need to know any programming. It also has a recorder which
allows you to record and then, replicate your actions. Kind of like recording an Excel Macro, only
that you have all your applications to work with. Okay, so let's jump in. Let me show you around and
let's do some web scraping. While we're at it, on this device I have Windows 11. I'm just going
to go ahead and launch the Power Automate app. So, just go and type it in, you're going to see it
pop up. Press Enter and open up the app. If it's the first time that you're opening it up, you're
going to see something similar to me. You're not going to have any flows listed in here. You also
might need to log in to your Microsoft account, so you have to have a work or school account. Once
you do that, you're ready to set up your first flow. Click on New Flow, this is going to create your
first automation. Give it a name, I'm going to call mine, "Get Links", and press Enter. Now, you don't have
to do anything. What's going to happen is that, Power Automate is going to bring up the designer, and it's
going to take a few seconds for it to get things ready for you. Once it does that, we are going to
see this view on the left side. We have the Actions pane. Actions are the primary building blocks of
any of your desktop flows. They're grouped together by different ways. So, sometimes they're grouped
together based on the application. For example, for Excel, we have different actions we can take on the
Excel app. We have different actions for Outlook. We have actions for Files and for Folders, and we
also have different controls like Conditions. We can do an If, a Switch or do Loops. In the middle,
you're going to find the workspace. Here, you're going to be building your flow from the available
actions here, as well as the variables that we have on the right side, and different UI elements, in
case you're going to need them. Now, we're going to see what variables are in a second. But what
you can also do is to record your actions, which is something that we're going to do in a second as
well. Now, as a first step, we're going to start off with doing something very simple. Just to get an
idea on how Power Automate for Desktop works. So, let's just go ahead and create an automatic action
that opens a specific web page. To do that, we're going to go to Browser Automation, we have options
for extracting web data or filling forms on the web. We can also launch a new browser, so depending
on which browser you use, make your selection. I'm using Microsoft Edge, so I'm going to select
launch new Microsoft Edge. Click and drag and drop it to my pane here. Now, the moment I drop it, I get
this pop-up, it asks me what my launch mode is. Do I want to launch a new instance or attach it to an
existing instance? I want to go with a new instance, so I'll stick with the original selection. Next,
I can put in the URL. I'm just going to paste it in and I want to navigate to the "All Tutorials"
page. Then, we can select the Window state, if you want it normal, maximized, or minimized; I'm going
to stick with normal. Notice here on the bottom, it tells me the variable that was produced is
called Browser. So this is an automatic name that it picked up. You can rename this if you want.
But this way, you can always reference this action. We're going to do that later on, so you're going to
see how that works. We're done with these settings. Click on Save, we get the first step of our flow.
Now, we can save this. Just click on Save to see how everything works. We can click on Run, you can
stop at any time or debug by running action-by- action. In this case, we just have a simple step.
When I click on Run, what's going to happen is that Microsoft Edge is going to open up and I should be
taken directly to the All Tutorials page and I do. Okay so, so far, so good. Let's close this. Now, let's
quickly think through the steps that we need done. So, we want to go to this page let me just run
this so that we can see how the page looks once we get here we want to grab the title. So basically,
we want to select this. Copy it, paste it in Excel and then, we want to right-mouse-click,
copy the link and paste it in Excel. We want to do this for each single post. Not only
on this page, but we want to go to the next page and repeat for all the other posts as well. The way
we're going to do this is to use the recorders. I'm going to go back to the design panel and click
on this recorder button. This is going to bring up a new dialog box on the side, and it's going
to give me the ability to record. So, just like the Macro recorder in Excel, once you start recording
your actions, your clicks are going to be recorded. Let's take a look at how it looks like. So, I'm
going to click on Record and start recording. Now, for example I'm going to go and select this,
I can see the actions are recorded here. You have the ability to delete stuff or you can also pause
the recording and go around and do your clicks. And once you're ready, you can resume your recording.
So now, we're ready, we're going to click on record, and start recording our steps. Notice this part
gets highlighted. I'm going to right-mouse-click, I get this dialog box on the side and I have the
ability to extract the element value. I want to extract the text, so I'm going to select text. But I
also want the link, I'm going to right-mouse-click, Extract Element Value and extract the Href, the
hyperlink for this element. So, notice as I'm doing this, this part here is getting updated.
It's telling me, "Extract handpicked record(s) in the form of a 2-column data row on the
screen," and notice, there is a green border around that searchable drop-down list in Excel title. It
means that this is being reflected in my recording. Now, check this out. I'm going to go to the next one,
right-mouse-click and extract the element value, add that for text and do the hyperlink as well. Now
notice, the moment I did it for the second element, all the other elements on the screen are
highlighted as well. Power Automate picked up a pattern. This is similar to Excel's Flash
Fill functionality. It picks up a pattern and it applies it to all the elements on this page. But I
don't just want it on this page, I want it to move on to the next page. So here, I'm going to come down
to the next button, right-mouse-click and "Set this element as pager." That's all I have to do. All the
steps are recorded here, I just have to click on Finish, and it's going to add these steps to my
flow. This added another variable called "OutputData". So, let's go and edit this. I'm just going
to double-click to go and update some of these settings. First of all, we can see that the web
browser instance is using our browser variable. This is the variable or the action that we
created in the previous step, which is great. Down here, we can see that the data is being stored
in a variable. I don't want it stored in a variable; instead, I want it stored in an Excel spreadsheet.
So, I'm going to select that and I get a variable that's produced called "ExcelInstance". I'm happy
with that name, so I'm going to click on Save. Now, I also want to save my Excel file. So, let's
go to the Excel category here and grab Save Excel and drop it here. The ExcelInstance is the
variable that was created in the previous action, that's fine. Where do we want to save it? I want to
save the document as and let's select a place for it. I'll put it directly on my desktop and call it
"My Links," and click on Save. Now, as the last step, we can also close Excel. So, let's drag and drop
this here. We want to close the ExcelInstance, and before closing Excel...Well, why not, we're going
to save the document. Okay so, are you ready to test the whole thing out? Let me just close everything
and we're going to run this. Okay so, let's sit back and enjoy the show. Microsoft Edge should open, it
should take us to All Tutorials page. Now, it should slowly go through each single page, and we should
see the links updating on top, and we can see we're on page 2 now, on page 3. So hopefully, it's
working in the background. It's going and grabbing each of these links and the titles and
it's adding it to our Excel file. So I can happily sit back, enjoy my coffee, and take
extreme comfort as I watch Power Automate do my work. A few moments later. Okay, so I can see
we're getting close to the end. I think this is the last blog post that I have. So, these are the first
posts that I ever wrote on the XelPlus web page, and everything seems to be done. Let's see
if the Excel file was created on our desktop. It's right here it's called "MyLinks". Let's
open it up and we have all the titles of our blog posts and all the links in Excel. There are
284 rows of blog posts. So, the last one is called "How to Incorporate Excel Dashboard Techniques in
Your Reports". Let's just make sure that that is the last post that I have. It's "How to Incorporate Excel Dashboard Techniques in Your Reports". So, as you can see, this is the magic and the power
of Power Automate. All I had to do is give it a simple recording and it figured out what I
want to do and it did the entire work for me. So, obviously you can take it much further and
build really complex automations with this tool. I still need to learn a lot myself. I'm very
excited about the potential. I hope you enjoyed this brief introduction to Power Automate for
Desktop. If you did, please give this video a like. If you have cool ideas how you could implement RPA
in your daily work, please share it in the comments below. You can expect more automation content
as we continue to explore the possibilities. So, consider subscribing, if you aren't subscribed
yet and I'm going to see you in the next video.