{"id":42664,"date":"2025-10-29T12:32:23","date_gmt":"2025-10-29T07:02:23","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=42664"},"modified":"2025-10-30T11:22:50","modified_gmt":"2025-10-30T05:52:50","slug":"how-to-auto-fill-third-party-web-forms-using-power-automate-desktop-and-javascript","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2025\/10\/how-to-auto-fill-third-party-web-forms-using-power-automate-desktop-and-javascript\/","title":{"rendered":"How to Auto-Fill Third-Party Web Forms Using Power Automate Desktop and JavaScript"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42672\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/How-to-Auto-Fill-Third-Party-Web-Forms-Using-Power-Automate-Desktop-and-JavaScript.png\" alt=\"JavaScript\" width=\"2100\" height=\"1200\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/How-to-Auto-Fill-Third-Party-Web-Forms-Using-Power-Automate-Desktop-and-JavaScript.png 2100w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/How-to-Auto-Fill-Third-Party-Web-Forms-Using-Power-Automate-Desktop-and-JavaScript-300x171.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/How-to-Auto-Fill-Third-Party-Web-Forms-Using-Power-Automate-Desktop-and-JavaScript-1024x585.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/How-to-Auto-Fill-Third-Party-Web-Forms-Using-Power-Automate-Desktop-and-JavaScript-768x439.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/How-to-Auto-Fill-Third-Party-Web-Forms-Using-Power-Automate-Desktop-and-JavaScript-1536x878.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/How-to-Auto-Fill-Third-Party-Web-Forms-Using-Power-Automate-Desktop-and-JavaScript-2048x1170.png 2048w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/How-to-Auto-Fill-Third-Party-Web-Forms-Using-Power-Automate-Desktop-and-JavaScript-660x377.png 660w\" sizes=\"(max-width: 2100px) 100vw, 2100px\" \/><\/p>\n<p>In today\u2019s digital workflows, teams across HR, operations, finance, and support deal with repetitive manual tasks every day. One of the most common inefficiencies is manually entering data into third-party web forms, especially when those portals do not provide APIs for direct integration. This repetitive work not only slows down productivity but also leads to inconsistent data entry and a higher risk of manual errors.<\/p>\n<p>Power Automate Desktop (PAD), Microsoft\u2019s powerful automation tool, helps users streamline routine desktop processes. By integrating custom JavaScript into PAD flows, users can interact directly with web pages, filling forms, performing validations, and handling scenarios where traditional UI automation or selectors may fail. This approach allows precise and efficient manipulation of HTML elements, making it ideal for automating third-party web forms.<\/p>\n<p>In this blog, we\u2019ll walk through how to configure Power Automate Desktop to read data from Excel and automatically populate a web form, eliminating manual data entry and accelerating workflows.<\/p>\n<p><strong>When is This Automation Useful? <\/strong><\/p>\n<p>Let\u2019s consider a potential use case:<\/p>\n<p>The HR team receives details of new candidates in an Excel file, including information such as name, contact details, skills, and experience. Currently, HR personnel need to manually enter each candidate\u2019s data into the recruitment portal to initiate the further hiring process. Our goal is to automate this task using Power Automate Desktop (PAD) combined with JavaScript, so that the data from Excel can be directly populated into the web form on the HR portal. This automation eliminates repetitive manual entry, reduces errors, and ensures that candidate information is consistently updated in the system in a fraction of the time.<\/p>\n<p>We will walk through the steps below to achieve the above requirement.<\/p>\n<p><strong>Prerequisites:<\/strong><\/p>\n<p>Before we get started, we need to have the following things ready:<\/p>\n<ul>\n<li>Power Automate Desktop is installed on the system.<\/li>\n<li>An Excel file containing the candidate entries we need to populate on the web form.<\/li>\n<li>Access to the web form that we plan to automate.<\/li>\n<\/ul>\n<p><strong>Step-by-Step Implementation<\/strong><\/p>\n<p><strong>Step 1: Retrieve Data from Excel<\/strong><\/p>\n<p>Use the \u201cLaunch Excel\u201d action to open the Excel file containing candidate details.<\/p>\n<ul>\n<li>Enable: Open the following document<\/li>\n<li>Specify: File path of the Excel sheet<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42665\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/1Power-Automate-Desktop-and-JavaScript.png\" alt=\"Power Automate Desktop and JavaScript\" width=\"1446\" height=\"797\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/1Power-Automate-Desktop-and-JavaScript.png 1446w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/1Power-Automate-Desktop-and-JavaScript-300x165.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/1Power-Automate-Desktop-and-JavaScript-1024x564.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/1Power-Automate-Desktop-and-JavaScript-768x423.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/1Power-Automate-Desktop-and-JavaScript-660x364.png 660w\" sizes=\"(max-width: 1446px) 100vw, 1446px\" \/><\/p>\n<p><strong>Step 2: Read Records from Excel<\/strong><\/p>\n<ul>\n<li>Select the \u201cRead from Excel Worksheet\u201d action to extract data from the Excel file.<\/li>\n<li>Set the Retrieve option to \u201cAll available values from worksheet\u201d.<\/li>\n<li>Enable the toggle for \u201cFirst line of range contains column names\u201d.<\/li>\n<li>Rename the output variable to Candidates.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42666\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/2Power-Automate-Desktop-and-JavaScript.png\" alt=\"Power Automate Desktop and JavaScript\" width=\"1400\" height=\"816\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/2Power-Automate-Desktop-and-JavaScript.png 1400w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/2Power-Automate-Desktop-and-JavaScript-300x175.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/2Power-Automate-Desktop-and-JavaScript-1024x597.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/2Power-Automate-Desktop-and-JavaScript-768x448.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/2Power-Automate-Desktop-and-JavaScript-660x385.png 660w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><\/p>\n<p><strong>Step 3: Loop Through All Records<\/strong><\/p>\n<ul>\n<li>Select the \u201cFor each\u201d action to iterate through all the records in the Excel data<\/li>\n<li>Set the Value to iterate field to the %Candidates%<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42667\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/3Power-Automate-Desktop-and-JavaScript.png\" alt=\"Power Automate Desktop and JavaScript\" width=\"1475\" height=\"489\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/3Power-Automate-Desktop-and-JavaScript.png 1475w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/3Power-Automate-Desktop-and-JavaScript-300x99.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/3Power-Automate-Desktop-and-JavaScript-1024x339.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/3Power-Automate-Desktop-and-JavaScript-768x255.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/3Power-Automate-Desktop-and-JavaScript-660x219.png 660w\" sizes=\"(max-width: 1475px) 100vw, 1475px\" \/><\/p>\n<p><strong>Step 4:<\/strong> <strong>Launch the Web Form<\/strong><\/p>\n<ul>\n<li>Select the \u201cLaunch Chrome\u201d action and enter the web form\u2019s URL in the Initial URL<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42668\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/4Power-Automate-Desktop-and-JavaScript.png\" alt=\"Power Automate Desktop and JavaScript\" width=\"1427\" height=\"745\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/4Power-Automate-Desktop-and-JavaScript.png 1427w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/4Power-Automate-Desktop-and-JavaScript-300x157.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/4Power-Automate-Desktop-and-JavaScript-1024x535.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/4Power-Automate-Desktop-and-JavaScript-768x401.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/4Power-Automate-Desktop-and-JavaScript-660x345.png 660w\" sizes=\"(max-width: 1427px) 100vw, 1427px\" \/><\/p>\n<p><strong>Step 5: Map Excel Values to Variables<\/strong><\/p>\n<ul>\n<li>Use the \u201cSet Variable\u201d action to initialize variables by assigning values from the current Excel row: Set the value as %CurrentRow[&#8216;&lt;Column name in Excel&gt;&#8217;]%.<\/li>\n<li>Repeat this process to initialize variables for all columns in the Excel sheet.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42669\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/5Power-Automate-Desktop-and-JavaScript.png\" alt=\"Power Automate Desktop and JavaScript\" width=\"1468\" height=\"744\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/5Power-Automate-Desktop-and-JavaScript.png 1468w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/5Power-Automate-Desktop-and-JavaScript-300x152.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/5Power-Automate-Desktop-and-JavaScript-1024x519.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/5Power-Automate-Desktop-and-JavaScript-768x389.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/5Power-Automate-Desktop-and-JavaScript-660x334.png 660w\" sizes=\"(max-width: 1468px) 100vw, 1468px\" \/><\/p>\n<p><strong>Step 6: Auto-Fill Form Using JavaScript<\/strong><\/p>\n<ul>\n<li>Select the \u201cRun JavaScript function on web page\u201d<\/li>\n<li>Within the JavaScript function, write the code to perform validations and target each form field using its ID with getElementById.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42670\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/6Power-Automate-Desktop-and-JavaScript.png\" alt=\"Power Automate Desktop and JavaScript\" width=\"1448\" height=\"741\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/6Power-Automate-Desktop-and-JavaScript.png 1448w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/6Power-Automate-Desktop-and-JavaScript-300x154.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/6Power-Automate-Desktop-and-JavaScript-1024x524.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/6Power-Automate-Desktop-and-JavaScript-768x393.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/6Power-Automate-Desktop-and-JavaScript-660x338.png 660w\" sizes=\"(max-width: 1448px) 100vw, 1448px\" \/><\/p>\n<p><strong>Step 7: <\/strong><strong>Submit the Form<\/strong><\/p>\n<ul>\n<li>Select the \u201cPress button on Web page\u201d action to click the form\u2019s submit button.<\/li>\n<li>Next, use the \u201cClose Web Browser\u201d action to close the browser. Finally, save and test your flow.<\/li>\n<li>When executed, the flow will open the Excel file, read the data, launch a new Chrome browser for each record, and automatically fill and submit the web form.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-42671\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/7Power-Automate-Desktop-and-JavaScript.png\" alt=\"Power Automate Desktop and JavaScript\" width=\"1803\" height=\"886\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/7Power-Automate-Desktop-and-JavaScript.png 1803w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/7Power-Automate-Desktop-and-JavaScript-300x147.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/7Power-Automate-Desktop-and-JavaScript-1024x503.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/7Power-Automate-Desktop-and-JavaScript-768x377.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/7Power-Automate-Desktop-and-JavaScript-1536x755.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/10\/7Power-Automate-Desktop-and-JavaScript-660x324.png 660w\" sizes=\"(max-width: 1803px) 100vw, 1803px\" \/><\/p>\n<p><strong>Why This Approach Works (Benefits)<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Benefit<\/strong><\/td>\n<td><strong>Impact<\/strong><\/td>\n<\/tr>\n<tr>\n<td>No dependency on APIs<\/td>\n<td>Works on any web portal<\/td>\n<\/tr>\n<tr>\n<td>Reduces manual work<\/td>\n<td>Saves hours per week<\/td>\n<\/tr>\n<tr>\n<td>Eliminates human errors<\/td>\n<td>Ensures consistent entries<\/td>\n<\/tr>\n<tr>\n<td>Scalable &amp; repeatable<\/td>\n<td>Works for HR, CRM, finance, support workflows<\/td>\n<\/tr>\n<tr>\n<td>Low code-friendly<\/td>\n<td>Easy to maintain<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>Frequently Asked Questions <\/strong><\/p>\n<ol>\n<li><strong> Can I use Power Automate Desktop to automate web forms that do not have API access?<\/strong><\/li>\n<\/ol>\n<p>Yes. This is one of the primary use cases for Power Automate Desktop. Even if a third-party web portal does not provide an API or connector, PAD combined with JavaScript can interact directly with web elements (such as input fields, dropdowns, and buttons) through the browser. This allows you to auto-fill and submit forms <strong>without relying on backend integration<\/strong>.<\/p>\n<ol start=\"2\">\n<li><strong> What if the form fields do not have an ID or the element selectors change frequently?<\/strong><\/li>\n<\/ol>\n<p>If a form field does not contain stable HTML element IDs, you can locate elements using:<\/p>\n<ul>\n<li><strong>Class names<\/strong><\/li>\n<li><strong>Name attributes<\/strong><\/li>\n<li><strong>CSS selectors<\/strong><\/li>\n<li><strong>XPath<\/strong><\/li>\n<\/ul>\n<p>In dynamic UI environments, Power Automate Desktop\u2019s UI Selector Recorder and browser inspection tools can help you identify reliable selectors. In cases where selectors change often, combining JavaScript DOM traversal with relative element paths enhances stability.<\/p>\n<ol start=\"3\">\n<li><strong> Is this method secure and suitable for production workflows?<\/strong><\/li>\n<\/ol>\n<p>Yes, as long as proper governance and credential handling are applied. You should:<\/p>\n<ul>\n<li>Use Windows Credential Manager or Azure Key Vault for secure credential storage<\/li>\n<li>Avoid hardcoding sensitive information in scripts<\/li>\n<li>Apply role-based access controls for automation execution<\/li>\n<li>Test workflows across multiple browsers and input data sets<\/li>\n<\/ul>\n<p>Many enterprise teams use this approach in HR onboarding, CRM data entry, invoice processing, and supplier portal updates, especially when system-level API integrations are not possible.<\/p>\n<ol start=\"4\">\n<li><strong> Can this automation work for multiple rows of data automatically?<\/strong><\/li>\n<\/ol>\n<p>Yes. By using the For Each loop in Power Automate Desktop, you can read multiple rows from Excel and submit the form for each set of data automatically. The automation will:<\/p>\n<ol>\n<li>Pick one row,<\/li>\n<li>Populate the form,<\/li>\n<li>Submit,<\/li>\n<li>Move to the next row \u2014 completely unattended.<\/li>\n<\/ol>\n<h3><strong>Conclusion<\/strong>:<\/h3>\n<p>By integrating Power Automate Desktop with JavaScript, you can automate repetitive web form data entry \u2014 enhancing accuracy, reducing manual effort, and improving productivity. This approach is especially useful when working with third-party portals where APIs are not available.<\/p>\n<p>If you are looking to streamline data entry workflows across HR, CRM, operations, or business applications \u2014 adding an automation layer like this can deliver immediate efficiency gains.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In today\u2019s digital workflows, teams across HR, operations, finance, and support deal with repetitive manual tasks every day. One of the most common inefficiencies is manually entering data into third-party web forms, especially when those portals do not provide APIs for direct integration. This repetitive work not only slows down productivity but also leads to\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2025\/10\/how-to-auto-fill-third-party-web-forms-using-power-automate-desktop-and-javascript\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[33,1985,2361],"tags":[],"class_list":["post-42664","post","type-post","status-publish","format-standard","hentry","category-javascript","category-power-automate","category-technical"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/42664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=42664"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/42664\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=42664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=42664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=42664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}