 Hello everyone and welcome back to another video focusing on power automate And this is a really good video because we're going to be using power automate to extract Information from a website. So as you can see on the screen at the moment I've loaded up Amazon and we've done a quick search for Excel books and These other results that we get so what we want to do with this power automate flow is we want it to automatically go to Amazon for us Extract all this information having done the the search for Excel content and Display that information in an Excel workbook So obviously if you happen to do this task on a daily basis or you just have a lot of information that you need to do Then a power automate once again gives you a great quick and easy to install solution to do just that So we'll close this window for the time being and we'll open up the power automate Desktop application which again we now have on the screen if you're not familiar with how to get started a power automate You can check one of our previous videos being linked now actually linked to the playlist It's really easy to get started But as soon as you've done that you can obviously follow along from this point here at the moment We've got no active flow saved So all we're going to do is go into create new flow that we can either do at the top left here or by Clicking the blue button on the bottom and the all important first thing to do is to give our flow a name So we'll call this Amazon Excel books And if I could spy Amazon correct as well that might help but they go nice or hopefully useful name For our flow so we can see it's been created there But yeah, we now got this additional window opening up and it's just getting things ready for us to get started So the first thing that we need to do is to first launch A new instance of our Chrome browser That's obviously we need to do this for the content to be loaded so that power automate knows and or has access to the data to extract So in order to do that all we need to do is go into our browser automation down the left hand side here And we can see we've got multiple options. So you could do this in Firefox or Edge I'm just going to stick with Chrome as it's the default browser. I have on my system So all we need to do is drag that into here and we can see we've got a couple of options So we could have launch new instance or you could attach to a running instance So if you had a version already open We're going to just stick with launch new instance because we want this to open a new window every time that we run this and for me the website is going to be HTTPS and We'll do Amazon.co.uk Okay, Windows stay we don't need anything here and we don't need to worry about any advanced information either we simply click save and Not much is going to happen at this stage, but we'll just run this so that we can see what will happen so if we click run and I think it's going to probably open up on a different screen No, we can see it's open on the screen. Perfect. So you can see what it's done Is this open up a new browser or Chrome browser more specifically and it's taken us straight to the Amazon.co.uk Website so so far so good The next there's a couple of steps or three steps to be specific that we then need to do The first thing is going to be selecting books from our all drop down here We'll then need to enter the text Excel into our search bar And then finally we need to click this search button that to search and return our results So if we close this browser once again, we can now move on to the next step So as we look down the left-hand side again under browser automation, you'll see there's an option for web form filling So what we'll simply do is expand that and the option that we're looking for is to set a drop-down list value So you can see the second from the bottom here click drag and place that underneath your step number one The first option we have here you can see web browser instant is browser So what it's automatically done by default for us is it's picked up the browser variable as you can see Captured in step number one and it's predetermined for us. So it's going to be utilising that same browser element that we had The next thing we need to do is we now need to create a UI element So what it's wanting us to do is to define where this This drop-down list is so what I'll just need to do first is let's just open up Chrome once again Should just kept it open in that first one and actually notice this go step back So what we'll do is this rerun our our flow and then it will pop up our browser exactly where we want to get to Perfect. So that's where we want to start from and I'll go back into power automate And let's just bring back in this set drop-down list variable Go into UI element. So here we'll go into add UI element and You can see it's obviously gone back or it's closed power bi, but it's brought up Not only our browser, but also if I drag it in from another screen, you can see we've got this UI element picker So this is what power bi is using to help identify these elements so in order for me to Identify this particular element all you need to do as you're instructed here is to hold the control button and then click On the element of interest as I glide over the page or the browser You can see it's identifying various different elements on there All I'm going to do is make sure I've got this all option selected here So you can see yep when I hover over all it's selected a range that looks bigger than my drop-down list But nonetheless, I'll hover over here hold down control and do a left click and You can see it's now picked up that information. So UI element is identified where our drop-down is But I now need to say what operation do I wish to do on this drop-down? So in the operation, I don't want to clear options. I want to actually select an option by name So all we'll do is click on to that And then here we're going to free type what option we wish to choose. So for me, it's going to be books Once that's been typed in there, we can go on to save and that's the second step done What I am going to do, however, is if we just reduce this down Oh, no, sorry not that if we open our browser Sorry is I'm just going to double-check and make sure I've spelled that correct yet So books is the correct term obviously if I'd written that book it wouldn't match the option of books here So that's just what I was quickly doing a double-check on The next thing that we want to do is we also need to add the same instance But for this search bar here to add our text So we'll go back into power automate and this time will do populate text field on web page. So this second one Let's drag that into here Once again, it's going to want us to define this UI element So when we click into here, we can see our pre-existing one that we've set in step number two But we're going to go into add UI element so that we can do another Once again UI picker has gone on a different screen. So just drag that back in for you here And all we need to do now is again hit cold down control having selected the input text. I'm on the left click You can see it's obviously picked that section up and all I need to do in here is now type Excel Or if in your scenario you want to do a different search term, obviously you can enter that different term here What we'll now do is go save and there we go step number three is done So the last part we had to do in terms of getting to our desired data is to now Select our search button. So in order to do that, we just close this option here and within the browser Automation, we should better go down and find an option to click the link on web page so hopefully the steps that we're going through in the in their titling in In power automate you see these steps here and as we're stepping through and we're starting to make logical Sends in the steps that you as an individual would also go through if you're to try and get to the same result So let's do one more UI element add UI element Drag that back in from the other screen And the last one we want to do is hold down control and select this search option here on the option the search icon And you can see what it wants to do is do a left click if we're to expand on this You can see we have a number of options available to us should they be appropriate But we're just gonna stick with a left click and select save So now might be a good time to retest our what we've done so far So let's just close our browser and do the all important save just to make sure we're not going to be losing any of the work we've done so far and Give that a couple of seconds more so it can save the flow. So let's now click run and see what happens So what should happen hopefully happen first is the browser will load on our screen You can see the drop down will now go and select books Excel has added search button is selected and there we go We've got our list of results all matching our search term of Excel. So so far so good So we now move on to the part of actually extracting the Information that we require from this page so what we'll do is now go back into power automate and Again under the browser automation section. We're going to now expand web data Extraction so we'll should just expand that and we'll go into this very first option here of extract data from web page so we should drag that over to here and So far you can see his information is populated here, but what I need to do now is navigate back into my Chrome browser and As always the pop-up is going to go to different window But this is the desired result that we shall now see so similarly to when we're doing our UI Information we had a pop-up now. We have this live web helper Which is going to help us to simply identify the information we wish to extract So as you would seen previously as we hover over the page It highlights all the various elements available to us with the red border. So the first thing I'm going to do is hover over our Text that we wish to extract for the name of the book So it is a bit fiddly and you do need to move around a bit, but hopefully yeah We can get there now so we can see head or two is the information that we require from here So what we'll do is simply go right click Extract element value and we can see that that is starting to match the title of our book So let's just left click here and you can see it's now been captured on the left-hand side What I'm going to do is now move on to the second item that we can see on the page Which is this book here Excel 2020 and make sure I extract exactly the same Element from this one here. So we'll go right click extract element value and extract the text and You can see we've now got a list of all the items So hopefully these should now start aligning with obviously the information that we have on this page We obviously don't just want one piece of information We want multiple parts. So I also would like to get the author's name and the date So I'm going to go back to the first option here. I'm going to hover just to the right where we can get this div I'm going to go right click extract element value. Oh Right click extract element value text and You can see what it's now done is it started to identify a pattern in the information that we're extracting So value number one is the books title value number two is now the author and Date and as we scroll down we can see that and you could go down and validate at this point to make sure the information here Matches the values in the order you see on the right-hand side The third and final piece of information. I'd like to get actually, you know, let's get a couple of extra pieces So what I'd like to do is I also get the price So again a bit fiddly just need to hover around to you get the area selected that you require So I'm going to get right click Extract element value and I want the text what's the price and the last thing I'm going to do is just get this piece here So where it says about prime get it Sunday 7th the September 11th So you may this may not be useful information, but let's just add another bit there and go right click extract value and select there So you may be interested to know if it's available with prime so you can see for some of the values It's populated others. It's not so once we've done that we've done everything we need to do in terms of extraction so we'll click finish and Only element we need to populate on here is this store data mode So in future examples when we go look at extracting data from the web We'll store this data as a variable so we can use it elsewhere But for us in today's example, all we want to do is to store this data in an Excel spreadsheet So we'll select Excel spreadsheet and we'll go on to save and And then of course the last thing we need to do there is go into our right to Excel worksheet So obviously we want to write this information into an Excel So let's close our browser automation and now go into Excel So the one step we have that's not within this section And then we'll go down until we can find right to Excel worksheet. Let me just click and drag that into here So we can see we've got Excel instance so it's obviously using the information that we captured here in step number five and We're going to write. What's the value that we wish to write? So we want to write our Excel instance. So the data that we captured. So we'll just select that here select Right mode on specified cell Yeah, we can just go with that as fine and where do we want to do that? We want to specify We want this to be in column one row one. So that's where we want to start entering our data So we'll lastly select save and then hopefully this is now giving us everything We need to extract that data from Amazon and extract it into an Excel file So we'll just close our browser. So we start from fresh Well, I'll do the all-important save to our power automate flow just to make sure again. We don't lose anything Pretty good ways of working But I'm sure you're familiar keep saving as you go just in case because you never know what might happen with Applications that get closed or problems that you run into So let's now click run and see how it happens. So we should hopefully see the browser open up on the screen as well Yet we can see we've got that there and as we see the steps also updating in the background We navigate through to do our search of Excel The next piece should be happening is our extract data from web page again As you can see step five is highlight in the background and typically it's opened in another page But let me just drag that across we can now see that we've got an Excel work But that's opened and it's got our extracted data in here as well. So let me just do this Let's go wrap text and condense this down a bit so we can see what we're looking at So we've got all on one page there and there you go. So we've got all of our book titles Authors and that the price of the book and all this also this information if you number about our prime delivery So when could we get this book delivered? Maybe useful information if you're looking for the earliest one that you could get delivered So I hope you enjoyed that video and it's probably worth mentioning at this point that You may want to add additional steps to now save and close this Excel workbook But all those and various other scenarios will look at in future videos So in order to make sure you see that content, don't forget to subscribe to the channel and also hit that bell notification So you're notified as and when those videos come out in the future If you did enjoy this video, maybe it showed you some new functionality You weren't aware of or we've helped answer a question that you're searching for Please don't forget to give that the video a like as not only is it greatly appreciated by me But it'll help other people on YouTube to find this video and content and lastly if you do have any Questions about the content of this video do just drop a comment below this video and I'll get back to you as soon as I can So thank you very much for watching and we'll see you in the next video