Export Webpage to PDF using Power Automate Bot #PowerAutoamte #Export #PDF #PowerAutomateDesktop

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone today I will walk you through the process of building a power automate bot that automatically turns a web page into a PDF document this is particularly useful when a web page does not have an export button but before we dive into the main topic we kindly request you to like and comment on this video your support will help more people on YouTube to find this video so let's start here I have power VA and Excel related formulas and their respective URLs I need to navigate to each URL in the Chrome web browser and then I need to convert that web page into a PDF document when I launch this URL I don't have the export button which can convert to PDF document hence we are going to use the print option by pressing contrl p and then click save here we need to supply the path and file name so that the web page will be converted into the proper PDF document so let's create the bot you may be thinking where we can use this data but don't worry in any organization you may be having an invoice number or a claim number along with the URL for that resp to or invoice maybe you are working in a financial organization that you have a bunch of invoice IDs along with the invoice URL when you launch that URL you may not be having export button in the web page so that you can use this technique to convert that web page into a PDF document so head back to our automate click on new flow give a meaningful name for your flow here I have given web page to PDF click on create this will take few seconds to open the program window left side you can see all the list of actions uh which are segregated into various sections on the right side you can see variable Spain open and you if you go to UI elements you can see the UI elements if you go to the images you can see the images pen switching back to variable Spen here we have our input data in Excel file so we need to launch the Excel try to find launch under actions you can see launch Excel click and hold that action and drag onto the canvas it opens this dialog launch Excel with blank document or open the following document going to choose open the following document and here we can supply the Excel po click on select file go to the respective folder select the Excel file click open whenever you want to open the document you can directly open or you can open as a read only I'm going to open it as a read only mode click save once we open the file it will be loaded in to excel instance variable after opening the file we need to read the Excel data so try to search the action read here you can see under Excel group there is a read from Excel worksheet drag this action onto the canvas once you drag this popup will come Excel instance the previous variable will be referred here under retrieve we can see couple of choices here going to select all available values from worksheet under Advanced first line of range contains the column names that means if you have headers in your data or the first row we can enable this option since I have my headers on the first row I have enabled it and then save the data will be loaded into Excel data variable here once we read the data we need to Loop through each row so try to find Loop in power automate these many Loops are here going to take for each Loop under each Loop click on this select variable our variable is here Excel data click select click save this for Loop will Loop through all the rows in the Excel data then we need to launch the Chrome under browser automation you can see launch new Chrome drag onto the canvas between for each and end and whenever we launch the Chrome it will be new instance and the URL is click on the select variable and the current item in Excel we have the URL column right that column name is link we need to give this link header into the current item head back to the power automate before the last percentage character open the square bracket within double code link close double code close square bracket the windows State always recommended to take the maximized here you can also rename the variables at any point of time if you would like to give your own variable name you can always give your own variable name launch Chrome click save see here launch Chrome variable is created I'm going to click on the prior to the line number so that it will give a break mode here so if you run the program it will give a pause where the circle is appearing to run the program click on the Run button on the top once the Chrome is launched as we discussed there is no export button instead of export button we can use contrl P from your keyboard which opens the print Dialogue on the Chrome so we need to send the keys from the bot to Chrome application for this stop the program and try finding send keys so drag this after the launch Chrome the send keys to foreground window under the text to send open the curly bracket control close curly bracket open parenthesis open curly brackets capital P close curly brackets close parenthesis the command should be the same if you would like to know the command one more time you can pause the video and see the command click save once we send the keys this dialogue will come and then we need to click on the save button right try to find click here the first group under UI automation you can see click UI element in window drag that action after the send keys under UI element click on the drop down click on ADD UI element this opens the UI element picker now you have to carefully move your cursor onto the save button once the button is identified hold control key and click that button this will capture that button into the program once you drop down that UI element drop down you can see that that is captured the save button click select click save so let me click on the browser also save button now this popup has come so now here we need to identify the file name text box which can help us to update the path and file name head back to Power automate under the actions search for populate under UI automation drag this poate text field on window click on the text box and click add UI element this this UI element picker has come up if you would like to move to right side or left side you can move it always and try finding that text box now the file name text box is found click on the text box choose the file name and then click select under the text box we need to update the path and file name here let me take the path where we need to save the PDF documents copy the path paste here give a back slash click on the select variable select the current item if you go to the Excel we are going to give the PDF file name as formulas so let me copy the header after current item open square bracket within double quote paste the formulas close double quote close square bracket at the end give the file extension as PDF click save now this will update the path and file name into the text field after populating the path and file name in the file name box we need to click on the save button for this head back to Power automate search for click drag this click UI element in window after the populate text click on this UI element add UI element once the button is identified hold the control key and click on that button it will process to capture once the element is captured click on this UI element and click on button save to you can see the preview of the button here click select and save after saving the PDF doc doent we need to close the browser so try searching to close under browser automation close web browser drag that action after click UI element the instance is launch Chrome save after closing the web browser after looping all the rows in Excel we need to close the Excel file as well so under Excel group close Excel drag after the end command uh Excel instance anyway we are opened with the read only mode so no need to save here choosing do not save document save and finally we are going to display a message search for display display message drag after the close Excel the Box title is Success the message to display is all PDF documents have been downloaded message box icon let's take information and save let me save the flow I have given a break at the end command so going to run now the Chrome is launched it sent the key contrl P print dialogue also it updated the path and clicked the save button and then closed the browser since we have given a break point here the program is still running mode and it is given a pause at the command end now let me open the folder if you look at this folder path what we have given there is no PDF document at all why because after updating the path under populate text it is automatically clicking the save and closing the browser when we try to save any document it takes a hoil to process and save the file for that process we have to give a weight command between the popet text and the click UI element save button let me stop the program search for weight there are several weight commands so here we are going to take a flow control weight drag this after the populate text and give the duration let's say 5 seconds save it save the flow and run the flow it open the URL it sent to the key control p and clicked the save button and open the save as dialog box updated the path and file name the file name is formula name and clicked the save button let me head back to the folder and check the files are saved or not still there are no files have been saved the one more mistake here is we need to add the weight command after clicking the save command also so drag one more time the weight command after the save button and the duration I'm going to give 5 Seconds click save and now run the flow again it's going to open the Excel file read the file and launching the Chrome with URL sent the key control P clicked on the save button now the save as dialog box it updated the path and file name is waiting for 5 seconds to click the save button now clicked the save button and waiting for another 5 seconds and then closed the browser now let me get back to the folder and check the file is saved or not now if you look at the folder there is a file saved p PDF document with all all is the formula name now head back to Excel and see the first Formula is all that means successfully it launched the URL and saved the file with the file name all now head back to Power automate let me remove the break mode me stop the program and save the flow let me close the Excel file to head back to the folder delete the existing file head back to program window save the flow and run the flow now it launched the Excel it read the data it's opened the URL in the Chrome sent the control P command and clicked the save button it is the updating the path and file name and trying to click on the save button and it is waiting for another 5 seconds before closing and closed the browser and the second iteration started whenever you have this kind of monotonous tasks or repetitive tasks to perform you can utilize the power automate to automate the process it has a very much High capability to any repetitive tasks now it has closed the Excel and it display the message stating all PDF documents have been downloaded click okay head back to the folder and you can see all the files have been saved let me open one PDF document and you can see the entire web page has been converted into a proper PDF document also it is more readable and you can copy any text from it so this is how you can convert the web page into multiple PD F documents when you don't have the export button I hope this small tutorial will help you a lot in your organization to automate any invoice process or Erp system process request you to please like and comment down your thoughts in this video please subscribe if you are not subscribed yet thank you very much see you in the next video
Info
Channel: Chethana Pixel
Views: 165
Rating: undefined out of 5
Keywords: power automate, power automate desktop, power automate tutorial, microsoft power automate, microsoft power automate tutorial, power automate how to, power automate desktop tutorial, power automate desktop web automation, power automate microsoft, power automate tutorial for beginners, microsoft power automate desktop, power automate desktop web, power automate desktop rpa, power automate for beginners, web automation using power automate, power automate desktop examples
Id: 2bZUVTxlLm0
Channel Id: undefined
Length: 17min 51sec (1071 seconds)
Published: Thu Dec 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.