Power Automate Desktop | Extracting Data from Web Pages to a Variable and looping through data.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] foreign how to use power automate desktop to extract data from a web page and loop to that data to find a value that you're looking for and then taking action on it so we'll go and get started here we have a simple table on this webpage here and for this particular case we would like to extract this data Loop through it and find a country code let's say Cuba and have it display a value population in 2020 show us what was the population of Cuba in 2020. so let's go and get started so um we'll start by opening up launching a Microsoft Edge and we're gonna have it uh navigate to that website fully maximized Next Step we're going to take we're going to go ahead and tell it to extract that data and um extracting is very simple you open that navigate to that page and it will open this little window that will then allow you to select information that you would like to extract as you'll see I'll move my mouse around it highlight certain things that you can extract so in this case we'll extract the value of country um and to get it to do what I wanted to do I'm gonna tell it to extract each value here I'm going to say I also want the country I'm sorry the population of the country and the land area of the country and the density of the country and you can see that it's actually showing me right here that it's going to be extracting all this data which is great so we'll go and click finish there and we're going to be extracting that into the variable called Data from webpage we could save there and we'll go and give it a go and see what it does now so we should be opening a browser and navigating to that particular page and then it should simply stop so we'll go ahead and take a look ER right there and you can see that it did in fact open a web page and extracted 195 rows information so next step is now through Loop to that information and look for country Cuba and then have it tell us what the population of Cuba was in 2020. so to Loop through that information we'll simply use Loops action and tell it to start um start from zero so I'm going to start at zero and we're going to end at uh data rows count which will be basically the 195 rows so it will be value of 195 and we make them it's about one so we're going to start about at row zero and then one two three four five so on and so forth and it's going to be increasing that uh variable by one each time it goes to the loop so now we have our Loop uh the next thing we want to do is give a condition there's a couple different ways of doing this I will do it a particular way here so I'm going to put a condition if in here and I'm going to say that I want to look through the data from web page variable and have it uh look at the uh each row and tell me I'm going to find scuba so basically what I'm doing here is telling it the to each row Loop index basically increases by one number each time so zero one two three four five and uh zero here indicates that I would like to get a column zero which should be the country name so as long as the country name equals Cuba I want you to go ahead and show me that population so when I'm working on my um flows within power army desktop I like to use uh message boxes to find what I need so we will go ahead and um have it tell us the population here 2020 and I will say uh uh elevation in Cuba in 2020 was and then we'll say well we would like that information from the data web page and we're going to get that from Loop index so when it finds that row then grab it from a column one which should be the country we'll do that so let's go ahead and uh we'll also go ahead and stop the flow right there and it finds that uh value for us so we're opening the web page navigating to that website extracting the data telling it to Loop through each row when it finds the road that equals Cuba go ahead and tell me that so we'll go ahead and hit run foreign [Music] country Cuba and it's at the population in 2020 was uh 11 326 616 so let's see if that's correct and that is correct so if I click OK and it's going to go ahead and um stop the flow so to make this a complete flow we'll go ahead and close the browser in time before we stop the flow and that sort of completes our flow right there it's very simple opening the web page now after opening the browser navigate to that web page extracting it looping through that data and saying for every row this Loop index was going to change to 0 1 2 3 4 5. in the column zero if you see the country Cuba then do this action and here we're basically saying that [Music] this message box will tell us that when the message when the funds come to Cuba it's going to show us the value of column one which is basically the population so there you go that's uh the lesson for today thank you all very much for watching thank you a little bit
Info
Channel: Automation Vida
Views: 3,752
Rating: undefined out of 5
Keywords: Accessing Rows and Columns, Extract Data From Web Page, Looping, Power Automate Desktop, RPA, Robotic Process Automation
Id: L6kSQ4hzMco
Channel Id: undefined
Length: 10min 54sec (654 seconds)
Published: Tue Jan 10 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.