Перейти к содержимому

Download PDFs in Bulk with Power Automate Desktop (Web + UI Automation)

Anders Jensen

0:00 / 0:00

Download PDFs in Bulk with Power Automate Desktop (Web + UI Automation)

13 331 просмотр · 1 г. назад
Anders Jensen
92,9 тыс. подписчиков
13 331 просмотр · 1 г. назад
A folder of PDF files named after their numbers on the web page is the result when you download PDFs in bulk with Power Automate Desktop, using web and UI automation in the same flow. My 6+ hour Power Automate Desktop e-learning (Beginner to Pro) is in my community, 7-day free trial: https://iloveautomation.ai/community The case is a Danish web page with more than 50,000 decisions, one PDF file per line, and a "Get more decisions" button that loads the next results. Split the flow into subflows and call them from Main with "Run subflow": Initialization sets the URL and folder path variables and opens the page with "Launch new Microsoft Edge", Extract data collects the decision numbers, and Download file saves one PDF. A "Loop condition" with "If web page contains" and "Click link on web page" presses the button for as long as it exists, and a loop index variable limits the demo to three clicks and 40 rows. "Extract data from web page" then stores the numbers in a data table, and a "For each" loop right-clicks each number through a dynamic selector that contains the current decision number. TOP LEARNINGS 🔹 Subflows keep the flow organized and reusable 🔹 Remove a changing ID from the selector, then test it 🔹 Web automation sends the right-click and UI automation handles "Save link as" UI automation takes over after the right-click: "Click UI element in window" chooses "Save link as", "Populate text field in window" types the folder path, a backslash, the decision number and the PDF ending, and a last click presses "Save". The first test stalled with an error on the "Save link as" menu item, and the fix was to disable the name on the Microsoft Edge window element in the selector. After that the flow saves the 40 PDFs one by one. For all results, raise the loop index limit or remove that condition, and expect about 5,000 clicks on the button before the extraction starts. Complete Power Automate Desktop course:    • Get Started with Power Automate Desktop: T...   CHAPTERS 0:00 The case: Download PDFs in bulk from a web page 1:30 New flow and run delay 2:35 Initialization subflow with variables and browser 5:00 Run subflow from Main 5:40 Extract data from web page 8:15 Loop condition for the Get more decisions button 10:45 If web page contains and a stable selector 13:35 Else branch that stops the loop 14:40 Limit the loop with a loop index 16:45 Test the loop 17:40 Download file subflow and For each 19:15 Right-click with a dynamic selector 22:55 Click Save link as with UI automation 24:00 File name in the save dialog 25:40 Test and fix the failing selector #PowerAutomate #Automation #PowerAutomateDesktop