6 min readRishi

Getting Started with Power Automate Desktop: Your First RPA Bot

You have a legacy desktop app, a spreadsheet full of rows, and a team spending an hour every morning copying values by hand. Power Automate Desktop can remove that pain, but only if you build the bot like production automation instead of a recorded macro. The first win is small: read Excel, enter records into the app, and make failures visible.

Start with the right desktop automation model

Attended automation runs with a person present. It is ideal when a user starts the desktop flow, watches it run on their machine, and can unlock the screen or handle an unexpected prompt. Windows 11 includes Power Automate Desktop for personal productivity, which makes attended learning easy.

Unattended automation runs without a person. It needs the machine to be available, signed in through the automation runtime, and licensed for unattended RPA. Use it when a cloud flow should push work to a machine or machine group on a schedule, from a queue, or after an upstream business event.

ChoiceBest fitWatch out
Attended desktop flowUser-assisted task automationThe user session must be active
Unattended desktop flowBack-office queue processingRequires unattended licensing and machine setup
Machine groupLoad distribution across machinesEach machine needs consistent app versions
Cloud-triggered runEnd-to-end orchestrationCredentials and environment variables matter

Do not start with licensing debates. Start by proving that the target application can be automated reliably. If selectors are stable and the process is valuable, the licensing decision becomes straightforward.

The designer is where you turn clicks into a maintainable flow

The recorder is a starting point, not the architecture. In Power Automate Desktop, the recorder can capture UI steps quickly, especially for a first pass through a desktop or web application. After recording, clean the flow: rename actions, replace literal values with variables, remove timing hacks, and group related steps into subflows.

Use the designer panes deliberately. The left pane gives you actions like Launch Excel, Read from Excel worksheet, Click UI element in window, Populate text field, If, Loop, and On block error. The center canvas is the flow. The variables pane is your live contract between actions.

For a first RPA bot, I usually create these subflows:

  1. Initialize settings and input paths.
  2. Read source data from Excel.
  3. Launch or attach to the target application.
  4. Process one row.
  5. Write the result back to Excel or a log.
  6. Close applications cleanly.

That structure makes the flow debuggable. When one row fails, you can replay only the row-processing subflow instead of running the whole bot again.

Selectors decide whether the bot survives next week

A selector is the bot's way of finding a UI element. If the selector depends on changing window titles, row numbers, or generated IDs, the bot will break. Open the UI elements pane, inspect captured elements, and remove properties that are volatile.

For web automation, prefer stable attributes such as an accessible name, visible label, form field name, or predictable control type. For desktop automation, capture the application window and child controls separately. Avoid depending on screen coordinates unless there is no usable selector.

Application window
  Name: Contoso Legacy Orders
  Class: WindowsForms10.Window

Customer field
  Control type: Edit
  Name: Customer ID

Submit button
  Control type: Button
  Name: Save Order

Add waits, not sleeps. Use Wait for window, Wait for UI element, or web page load actions. A fixed delay might pass during testing and fail under CPU load. A selector-based wait documents the real dependency: the bot proceeds when the application is ready.

Variables, conditionals, and loops make it a bot instead of a macro

Treat each Excel row as data, not as recorded behavior. Read the worksheet into a data table, loop through rows, and pass row values into UI actions. Use variables like CurrentCustomerId, CurrentAmount, and CurrentStatus so the flow is readable in the run history.

The core loop is simple:

Launch Excel and open Orders.xlsx
Read from Excel worksheet into ExcelData
For each CurrentRow in ExcelData
    Set variable CurrentCustomerId to CurrentRow['CustomerId']
    Set variable CurrentAmount to CurrentRow['Amount']
    If CurrentCustomerId is not empty
        Run subflow Process order row
    Else
        Set CurrentStatus to Skipped
    End
End
Save Excel
Close Excel

Validate before typing. If a required cell is blank, skip the row and log the reason. If an amount is not numeric, fail the row, not the entire run. This is the difference between automation that helps operations and automation that creates mystery work.

Build the first bot around Excel to legacy app entry

Use a narrow process slice. Pick one transaction that a human can explain in under five minutes. For example: read customer orders from Excel, open the legacy order screen, key in customer ID and amount, submit, and write the confirmation number back to Excel.

Follow this implementation sequence:

  1. Create a desktop flow named Enter legacy orders.
  2. Add input variables for WorkbookPath and WorksheetName.
  3. Launch Excel, open the workbook, and read the used range into a data table.
  4. Launch or attach to the legacy application.
  5. Capture UI elements for customer ID, amount, save, and confirmation number.
  6. Loop through rows and populate the fields from variables.
  7. After saving, read the confirmation value and write it back to the current Excel row.
  8. Wrap each row in error handling so one bad record does not stop the batch.

For local testing, hard-code the workbook path once. Then replace it with an input variable before connecting the desktop flow to a cloud flow.

Cloud flows turn the desktop bot into an operating process

A cloud flow can trigger the desktop flow through a machine or machine group. Install the Power Automate machine runtime, register the machine, and confirm it appears online. In the cloud flow, use the desktop flow action, choose the connection, select the machine or group, and pass input values such as the workbook path.

{
  "desktopFlow": "Enter legacy orders",
  "runMode": "Unattended",
  "inputs": {
    "WorkbookPath": "C:\\Automation\\Input\\Orders.xlsx",
    "WorksheetName": "Orders"
  }
}

Design for operations from day one. Store input files in a controlled folder, write a run log, and return a status to the cloud flow. If the desktop flow fails, the cloud flow should notify the owner with the machine name, file name, and failed row number.

Build the first version small enough to debug in one sitting, but structured enough that you can run it every day.

Power Automate Desktop rewards boring engineering. Stable selectors, explicit waits, row-level validation, and clean cloud orchestration matter more than a flashy recording. If your first bot can process ten rows, log three failures, and leave the machine ready for the next run, you have built the foundation for real RPA.

Keep reading

Newsletter

New posts, straight to your inbox

One email per post. No spam, no tracking pixels, unsubscribe anytime.

Comments

No comments yet. Be the first.