Table of Contents

    RPA Basics (Desktop Automation)

    RPA Basics (Desktop Automation)

    RPA stands for Robotic Process Automation. In Microsoft Power Platform, RPA is commonly implemented using Power Automate for desktop, where users create desktop flows to automate repetitive desktop-based tasks. Microsoft Learn describes a learning path for desktop flows and robotic process automation in Power Automate that covers building and configuring flows, handling variables, defining parameters, automating tasks with loops, scripting, web automation, recording flows, and managing exceptions and errors. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    Desktop automation is useful when a business process requires interaction with desktop applications, web pages, files, folders, Excel, legacy systems, or user interface elements. Instead of manually repeating the same steps again and again, a desktop flow can perform those steps automatically.

    RPA Basics means understanding how desktop flows automate repetitive tasks by interacting with applications, webpages, files, folders, variables, conditions, loops, and UI elements.

    What is RPA?

    Robotic Process Automation is a method of automating repetitive business tasks that are usually performed by humans on computers. In Power Automate, RPA is commonly built using desktop flows. Microsoft Learn explains that desktop flows help automate repetitive tasks and can free up time for more important work. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    The word “robotic” does not mean a physical robot. It means a software-based automation that follows defined steps. For example, a desktop flow may open an application, copy data, paste it into another system, save a file, extract data from a website, or process records from Excel.

    Term Simple Meaning Example
    RPA Automation of repetitive computer-based tasks Automatically copying invoice data from Excel to an application
    Desktop Automation Automation that runs on a computer and interacts with desktop applications or webpages Opening a desktop app and entering form data
    Desktop Flow A Power Automate for desktop automation workflow A flow that reads an Excel file and updates a system
    Bot A software automation that performs configured steps An unattended desktop flow running on a designated machine

    What is Power Automate for Desktop?

    Power Automate for desktop is the desktop automation tool used to create desktop flows. Microsoft Learn’s desktop flows and RPA learning path covers how to build the first Power Automate for desktop flow, explore Power Automate for desktop, record actions, edit recorded actions, and test flows. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    Power Automate for desktop allows users to build automations using actions. These actions can work with applications, webpages, files, folders, variables, loops, conditions, and UI elements. A desktop flow can be built manually by adding actions, or it can be created faster by recording user actions and then refining the recorded steps.

    User Task
       |
       v
    Repeated Manual Steps
       |
       v
    Power Automate for Desktop
       |
       v
    Desktop Flow
       |
       v
    Automated Execution

    The diagram is an educational representation based on Microsoft Learn’s explanation that Power Automate for desktop flows can automate repetitive tasks and include recorded actions. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    Why Desktop Automation is Needed

    Desktop automation is needed because many organizations still use applications that do not always have modern APIs or direct connectors. In such cases, users may need to manually interact with screens, forms, buttons, files, browsers, or legacy applications. RPA helps automate those interactions.

    Microsoft Learn explains that desktop flows use UI elements to interact with applications and webpages, so they do not need to use image recognition or absolute coordinates. Most UI automation and browser automation actions use UI elements as input to identify specific elements on windows and webpages. [2](https://learn.microsoft.com/en-us/power-automate/desktop-flows/ui-elements)

    • Desktop automation reduces repetitive manual work.
    • It helps automate tasks in legacy applications.
    • It can interact with desktop applications and webpages.
    • It can use UI elements to identify buttons, fields, windows, and webpage controls.
    • It can help connect manual desktop tasks with broader business automation.

    Common Desktop Automation Scenarios

    Desktop automation is useful for tasks that are repetitive, rule-based, and performed using desktop or web interfaces. Microsoft Learn’s RPA learning path includes topics such as building desktop flows, variables, input and output parameters, loops, web automation, recording flows, and exception management. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    Scenario What RPA Can Do Example
    Data Entry Enter data into desktop or web forms Copy customer details from Excel to an internal system
    Excel Automation Read, write, update, and process spreadsheet data Prepare a daily report from Excel data
    File and Folder Automation Create, move, rename, copy, or organize files Move downloaded reports to a folder
    Web Automation Interact with webpages and browser elements Extract data from a website and save it to Excel
    Application Automation Interact with windows, buttons, text boxes, and menus Open a desktop application and update records
    Report Processing Collect, transform, and save information Generate a weekly operations report

    Desktop Flows

    A desktop flow is an automation flow created in Power Automate for desktop. Microsoft Learn’s beginner module “Build your first Power Automate for desktop flow” describes learning how to use Power Automate for desktop flows and automate repetitive tasks. [3](https://learning.cloud.microsoft/detail/2da6037f-27b2-420e-9631-f4150667e4ae?context={%22subEntityId%22:{%22source%22:%22M365Search%22}})

    A desktop flow contains a sequence of actions. Each action performs one step, such as launching an application, reading a file, setting a variable, checking a condition, looping through records, selecting a UI element, or writing output.

    Desktop Flow
       |
       +-- Action 1: Open application
       +-- Action 2: Read data
       +-- Action 3: Enter data into form
       +-- Action 4: Save result
       +-- Action 5: Close application

    Actions in Power Automate for Desktop

    Actions are the building blocks of desktop flows. A flow is created by arranging actions in a logical order. Microsoft Learn’s desktop flows and RPA learning path covers flow control, conditional actions, variables, input and output parameters, loops, web automation, recording flows, and error management. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    Action Type Purpose Example
    Application Actions Open, close, or interact with desktop applications Launch an accounting application
    Web Actions Interact with browser pages and web elements Fill a web form
    Excel Actions Read, write, and process Excel data Read rows from a worksheet
    File Actions Work with files and folders Move a file to an archive folder
    Flow Control Actions Control the order of execution Use conditions and loops
    Error Handling Actions Manage unexpected failures Handle a missing file error

    Flow Control

    Flow control means controlling the order in which actions run. Microsoft Learn describes flow control as the ability to alter the order in which actions and functions are implemented, and explains that Power Automate for desktop enables flow control through flow control actions. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    Flow control is important because real business processes do not always run in a straight line. Sometimes a flow must check a condition, repeat a step, skip an action, or stop when a requirement is met.

    Start
      |
      v
    Check Condition
      |
      +-- If condition is true → Perform Action A
      |
      +-- If condition is false → Perform Action B
      |
      v
    End

    Variables in Desktop Flows

    Variables are used to store and reuse information while a desktop flow is running. Microsoft Learn explains that variables act like storage bins that save valuable information for later use when a flow is running. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    For example, a flow may store a customer name, invoice amount, file path, current row number, email address, or extracted webpage value inside variables.

    Variable Type Simple Meaning Example Value
    Text Stores words or characters Customer name
    Number Stores numeric values Invoice amount
    Boolean Stores true or false values Is file found?
    List Stores multiple values List of invoice numbers
    Data Table Stores tabular data Excel rows loaded into a flow

    Input and Output Parameters

    Input and output parameters make desktop flows more flexible. Microsoft Learn explains that varying input and output parameters allows outcomes to change for every run of a flow, and that input and output parameters allow desktop flows to handle tasks and processes with conditional input and output. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    An input parameter provides information to a flow before it starts. An output parameter returns information after the flow finishes.

    Parameter Type Purpose Example
    Input Parameter Passes data into the desktop flow Invoice number to search
    Output Parameter Returns data from the desktop flow Status message or extracted value

    Conditions in Desktop Automation

    Conditions allow a desktop flow to make decisions. Microsoft Learn explains that conditional actions allow you to modify flow actions at runtime based on information available in the environment. The learning path includes the If group of actions and the Switch group of actions. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    For example, if a file exists, the flow can process it. If the file does not exist, the flow can send a message or stop. Conditions make desktop flows more intelligent and practical.

    If file exists
       |
       +-- Yes → Process file
       |
       +-- No  → Show error message

    Loops in Desktop Automation

    Loops are used when a set of actions must be repeated. Microsoft Learn’s RPA learning path includes using loops to repeat blocks of actions in a flow, including simple loops, loop conditions, and for each loops. [4](https://www.classcentral.com/course/microsoft-learn-desktop-flows-and-robotic-process-automation-in-power-automate-427155)

    Loops are very useful in automation because business processes often involve many records. For example, a desktop flow may loop through all rows in an Excel file and enter each row into a business application.

    Loop Type Purpose Example
    Simple Loop Repeats actions a fixed number of times Repeat 10 times
    Loop Condition Repeats until a condition is met Repeat until file is downloaded
    For Each Loop Repeats actions for each item in a list or table Process each Excel row

    Recorder in Power Automate for Desktop

    The recorder helps capture user actions and convert them into flow steps. Microsoft Learn’s beginner module includes recording Power Automate for desktop actions and editing and testing recorded actions. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    The recorder is useful for beginners because it helps them quickly create a starting version of a desktop flow. However, recorded flows should usually be reviewed and improved by cleaning unnecessary steps, adding variables, using conditions, and improving error handling.

    Manual User Actions
            |
            v
    Recorder Captures Steps
            |
            v
    Recorded Desktop Flow
            |
            v
    Edit, Test, and Improve

    UI Automation

    UI Automation means automating applications by interacting with their visible user interface elements, such as buttons, text boxes, menus, tables, windows, and checkboxes. Microsoft Learn explains that desktop flows use UI elements to interact with applications and webpages and that UI automation actions accept desktop UI elements while browser automation actions accept web UI elements. [2](https://learn.microsoft.com/en-us/power-automate/desktop-flows/ui-elements)

    UI automation is useful when an application does not provide a direct connector or API. Instead of calling a system directly, the automation interacts with the same interface that a user would normally use.

    UI Element Meaning Automation Example
    Button A clickable control in an application Select Save
    Text Box A field where text can be entered Enter customer name
    Window An application screen or dialog Activate invoice window
    Dropdown A selectable list Choose country or status
    Table A grid or tabular user interface Read values from application grid

    UI Elements in Desktop Flows

    Microsoft Learn explains that desktop flows support two types of UI elements based on their source: desktop UI elements and web UI elements. Desktop UI elements can be captured from Windows applications, including non-webpage browser components such as the address bar. [2](https://learn.microsoft.com/en-us/power-automate/desktop-flows/ui-elements)

    UI elements make desktop automation more reliable because the flow can target specific controls instead of relying only on screen position or images.

    UI Element Type Used For Example
    Desktop UI Element Windows desktop applications Button in a desktop application
    Web UI Element Webpages and browser automation Textbox on a website form

    Web Automation

    Web automation means automating tasks performed inside a browser. Microsoft Learn’s RPA learning path includes web automation as one of the learning areas for desktop flows and robotic process automation in Power Automate. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    Web automation can be used to open websites, enter data into forms, extract information, download files, or move between pages. It is useful for browser-based systems where the task is repetitive and rule-based.

    Open Browser
       |
       v
    Navigate to Website
       |
       v
    Enter or Extract Data
       |
       v
    Save Result

    Attended Automation

    Attended automation runs when a user is in front of the computer. Microsoft Learn explains that in attended scenarios, automation is executed when users are in front of their computers, is suitable for individual task automation, is often triggered manually, and may require human interaction or decisions between steps. [5](https://learn.microsoft.com/en-us/power-automate/guidance/planning/attended-unattended)

    Attended automation is useful when the user needs to review information, make decisions, or confirm something before the automation continues.

    Feature Attended Automation
    Who starts it? The user usually starts it manually.
    User presence User is in front of the computer.
    Human decision May require user interaction or decisions.
    Best for Individual-level task assistance.

    Unattended Automation

    Unattended automation runs without human interaction. Microsoft Learn explains that in unattended scenarios, a designated computer or server is set up to run the automation on behalf of a user, the whole process is run fully by Power Automate, and the process can be triggered automatically from another system, service, or on a schedule. [5](https://learn.microsoft.com/en-us/power-automate/guidance/planning/attended-unattended)

    Microsoft Learn also explains that triggering desktop flows from cloud flows enables desktop flows to run in unattended mode, and unattended desktop flows are ideal for automating tasks that do not need human supervision. [6](https://learn.microsoft.com/en-us/power-automate/desktop-flows/run-unattended-desktop-flows)

    Feature Unattended Automation
    Who starts it? It can be triggered automatically from another system, service, or schedule.
    User presence No human interaction or decisions are required.
    Machine setup A designated computer or server runs the automation.
    Best for Background business processes that do not need user supervision.

    Attended vs Unattended Automation

    Microsoft Learn states that automation is either attended or unattended. It also explains that attended automation usually requires human interaction or decisions and is manually triggered, while unattended automation does not require human interaction or decisions and can be automatically triggered. [5](https://learn.microsoft.com/en-us/power-automate/guidance/planning/attended-unattended)

    Comparison Area Attended Automation Unattended Automation
    User Presence User is present at the computer No user interaction is required
    Trigger Often triggered manually Can be triggered automatically or on a schedule
    Decision-Making May require human decisions No human decisions required during execution
    Best Use Personal productivity and assisted automation Background process automation
    Machine Session Requires an active user session Runs on a designated machine or server

    Microsoft Learn also notes that attended automation requires an active session and unattended automation requires users to be signed out or have a disconnected session, so the same machine or machine group should not mix attended and unattended automation. [5](https://learn.microsoft.com/en-us/power-automate/guidance/planning/attended-unattended)

    Cloud Flows and Desktop Flows Together

    Desktop flows can be part of larger automation solutions. Microsoft Learn explains that triggering desktop flows from cloud flows enables desktop flows to run in unattended mode. [6](https://learn.microsoft.com/en-us/power-automate/desktop-flows/run-unattended-desktop-flows)

    In a typical business automation design, a cloud flow may start when an event happens, then call a desktop flow to perform local computer automation. For example, a cloud flow may start on a schedule and then run a desktop flow that processes files on a machine.

    Cloud Flow Trigger
       |
       v
    Run Desktop Flow
       |
       v
    Desktop App / Web App Automation
       |
       v
    Return Result to Cloud Flow

    Error Handling in RPA

    Error handling is important because desktop applications and web pages can behave unexpectedly. Microsoft Learn’s desktop flows and RPA learning path includes managing exceptions and errors as part of desktop automation learning. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    A desktop flow may fail if a file is missing, a window does not open, a UI element changes, a website loads slowly, or credentials are incorrect. Good RPA design should plan for these situations.

    Error Scenario Possible Handling Approach
    File not found Check file existence before processing
    Application not opening Retry or show a meaningful message
    UI element not found Validate UI element and use stable selectors
    Website slow to load Use wait logic before interacting with elements
    Unexpected data Use conditions and validation rules

    Benefits of RPA

    RPA helps organizations automate repetitive desktop-based processes. Microsoft Learn’s beginner desktop flow module describes using Power Automate for desktop flows to automate repetitive tasks and save valuable time. [3](https://learning.cloud.microsoft/detail/2da6037f-27b2-420e-9631-f4150667e4ae?context={%22subEntityId%22:{%22source%22:%22M365Search%22}})

    • Reduces repetitive manual effort.
    • Improves consistency of rule-based tasks.
    • Helps users save time on routine operations.
    • Can automate desktop applications and webpages.
    • Can support legacy systems where modern connectors are not available.
    • Can work with variables, conditions, loops, input parameters, and output parameters.

    Limitations and Considerations

    RPA is powerful, but it must be designed carefully. Desktop automation depends on applications, screens, UI elements, user sessions, machine configuration, and permissions. Microsoft Learn explains that unattended desktop flows require an available machine with all users signed out, and locked Windows user sessions can prevent unattended desktop flows from running. [6](https://learn.microsoft.com/en-us/power-automate/desktop-flows/run-unattended-desktop-flows)

    Microsoft Learn also explains that Power Automate creates a remote desktop session on the machine to run unattended desktop flows and creates, manages, and releases the Windows user session on target devices. [6](https://learn.microsoft.com/en-us/power-automate/desktop-flows/run-unattended-desktop-flows)

    • UI changes can break automation if elements are not captured properly.
    • Unattended automation requires proper machine/session configuration.
    • Slow applications or websites may require wait logic.
    • Credentials and permissions must be managed carefully.
    • Flows should be tested after application updates.

    RPA Design Best Practices

    The following best practices are learning-friendly recommendations based on the concepts covered in Microsoft Learn’s RPA learning path, UI element documentation, and attended/unattended automation guidance. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)[2](https://learn.microsoft.com/en-us/power-automate/desktop-flows/ui-elements)[5](https://learn.microsoft.com/en-us/power-automate/guidance/planning/attended-unattended)

    • Choose repetitive, rule-based tasks for automation.
    • Use UI elements instead of relying only on screen coordinates.
    • Use variables to store reusable data.
    • Use conditions to handle different process paths.
    • Use loops for repeated record processing.
    • Use input and output parameters to make flows flexible.
    • Test flows with different data conditions.
    • Add error handling for missing files, unavailable windows, and unexpected data.
    • Separate attended and unattended automation scenarios properly.
    • Document the flow purpose, inputs, outputs, and dependencies.

    Example: Invoice Data Entry Automation

    A simple RPA example is invoice data entry. A user may receive invoice data in Excel and manually enter it into a desktop application. With desktop automation, the flow can read the Excel file, loop through each invoice row, open the application, enter invoice details, save the record, and continue until all invoices are processed.

    Read Excel Invoice File
            |
            v
    Loop Through Each Invoice Row
            |
            v
    Open Invoice Application
            |
            v
    Enter Invoice Details
            |
            v
    Save Record
            |
            v
    Move to Next Row

    This example is a learning scenario based on desktop flow concepts such as variables, loops, UI automation, and repetitive task automation described in Microsoft Learn’s desktop flows and RPA learning path. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    Example: Web Data Extraction Automation

    Another common desktop automation scenario is extracting data from a website and saving it into Excel or another system. Microsoft Learn’s RPA learning path includes web automation as part of the desktop flows and robotic process automation learning path. [1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)

    Open Website
       |
       v
    Search or Navigate
       |
       v
    Extract Data from Webpage
       |
       v
    Store Data in Variable or Table
       |
       v
    Write Data to Excel or System

    When to Use RPA

    RPA is best suited for repetitive desktop-based processes where the steps are predictable. It is especially useful when users must interact with systems through screens and when no direct connector or API-based integration is available.

    Use RPA When Reason
    The task is repetitive RPA can repeat the same steps consistently.
    The task is rule-based Automation can follow clear rules and conditions.
    The task uses desktop applications Desktop flows can interact with windows and UI elements.
    The task uses webpages Browser automation can work with web UI elements.
    No connector or API is available UI automation can interact with applications like a user.

    When Not to Use RPA

    RPA is not always the best solution. If a reliable API, connector, database integration, or system-to-system integration is available, that approach may be more stable than automating the user interface. This is a general design suggestion, not a direct Microsoft Learn claim.

    • Do not use RPA for highly unpredictable tasks.
    • Do not use RPA when the business rules are unclear.
    • Do not use RPA when data quality is too poor to automate safely.
    • Do not use RPA as a replacement for proper system integration when a strong connector or API exists.
    • Do not use RPA without testing error scenarios.

    Common Mistakes Beginners Make

    • Recording a flow and using it without cleaning or testing the steps.
    • Using fixed screen coordinates instead of reliable UI elements.
    • Not using variables for dynamic data.
    • Not adding conditions for alternative process paths.
    • Not using loops for multiple records.
    • Not handling missing files, slow applications, or failed logins.
    • Trying to run unattended automation on a machine that is not configured correctly.
    • Mixing attended and unattended automation on the same machine without understanding session requirements.

    These cautions are based on Microsoft Learn’s topics around UI elements, variables, conditions, loops, exceptions, and attended/unattended automation requirements. [2](https://learn.microsoft.com/en-us/power-automate/desktop-flows/ui-elements)[1](https://learn.microsoft.com/en-us/training/paths/desktop-flows-robotic-process-automation-power-automate/)[5](https://learn.microsoft.com/en-us/power-automate/guidance/planning/attended-unattended)[6](https://learn.microsoft.com/en-us/power-automate/desktop-flows/run-unattended-desktop-flows)

    RPA Basics Checklist

    Checklist Area Question to Ask
    Process Selection Is the task repetitive and rule-based?
    Application Type Does the process involve desktop apps, web apps, files, or Excel?
    Input Data Where does the flow get its input?
    Output Data What should the flow return or produce?
    Variables What data must be stored during execution?
    Conditions What decisions must the flow make?
    Loops Does the flow need to process multiple records?
    UI Elements Which buttons, fields, windows, or web elements must be captured?
    Error Handling What can go wrong, and how should the flow respond?
    Run Mode Should the automation be attended or unattended?

    RPA Terms to Remember

    Term Simple Meaning
    RPA Robotic Process Automation; software automation for repetitive tasks.
    Desktop Flow A Power Automate for desktop automation workflow.
    Action A single automation step inside a desktop flow.
    Variable A storage container for data used while the flow runs.
    Condition A decision rule that controls which path the flow follows.
    Loop A structure that repeats actions multiple times.
    UI Element A captured application or webpage control used by automation.
    Recorder A feature that captures user actions and creates automation steps.
    Attended Automation Automation that runs while a user is present at the computer.
    Unattended Automation Automation that runs without human interaction on a designated machine or server.

    Important Points to Remember

    • RPA automates repetitive computer-based tasks.
    • Power Automate for desktop is used to create desktop flows.
    • Desktop flows contain actions arranged in a logical sequence.
    • Variables store information during flow execution.
    • Conditions allow a flow to make decisions.
    • Loops repeat actions for multiple records or until a condition is met.
    • UI elements help desktop flows interact with applications and webpages.
    • The recorder can capture user actions, but recorded flows should be reviewed and improved.
    • Attended automation runs with a user present.
    • Unattended automation runs without human supervision on a designated machine or server.
    • Error handling is essential for stable RPA solutions.

    Simple Summary

    RPA Basics means learning how to automate repetitive desktop-based tasks using Power Automate for desktop. A desktop flow can open applications, interact with windows and webpages, read and write data, use variables, make decisions with conditions, repeat work using loops, and handle errors.

    Desktop automation is especially useful when users manually perform the same steps in applications, websites, Excel, files, folders, or legacy systems. Power Automate for desktop helps convert those manual steps into automated flows.

    RPA can be attended, where a user starts and supervises the automation, or unattended, where the automation runs without human interaction on a designated computer or server. Microsoft Learn explains that attended scenarios are often user-triggered and may require human decisions, while unattended scenarios are fully automated and can run from another system, service, or schedule. [5](https://learn.microsoft.com/en-us/power-automate/guidance/planning/attended-unattended)

    Conclusion

    RPA and desktop automation are important parts of Microsoft Power Automate because they help automate tasks that happen on desktop applications, webpages, files, folders, and legacy systems. For beginners, the most important concepts are desktop flows, actions, variables, conditions, loops, UI elements, recorder, attended automation, unattended automation, and error handling.

    A good desktop automation should not only repeat user actions. It should be reliable, understandable, testable, and easy to maintain. Learners should start with simple processes, then gradually add variables, conditions, loops, UI elements, and exception handling.

    After learning RPA Basics, learners can move to Building Desktop Flows, where they will understand how to create practical desktop automation flows step by step.