Attended vs Unattended Desktop Flows
Earn 25 points (50 with Pro) in two steps
- ① Read through the lesson — each section gets a ✓ as you scroll through it.
- ② When every section has a ✓, tap Complete lesson.
0 of 10 read · keep scrolling
✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro
Module: Design Automations
Section: Power Automate Features and Capabilities
Lesson: Attended vs. Unattended Desktop Flows
Introduction: Understanding the Automation Landscape
In the world of robotic process automation (RPA), the way a software robot interacts with your computer determines not just how the work gets done, but how much that work costs, how it scales, and how it impacts the daily life of your employees. When we talk about Power Automate Desktop (PAD), we are essentially talking about digital workers that can mimic human actions—clicking buttons, typing text, scraping data from websites, and interacting with legacy desktop applications. However, these digital workers do not all operate under the same rules.
The distinction between "Attended" and "Unattended" automation is the cornerstone of any enterprise automation strategy. An attended flow is like an assistant sitting at your desk; it waits for your signal and works alongside you to complete a specific task. An unattended flow, conversely, is like a background service that runs in a dedicated, virtualized environment without any human intervention. Understanding which of these modes to choose is critical because it dictates your licensing costs, your hardware requirements, and the governance model you must adopt. If you choose the wrong mode, you might find yourself with a process that is either too expensive to maintain or one that creates a bottleneck in your office operations.
This lesson explores the technical, operational, and strategic differences between these two modes. We will look at how they function, when to deploy each, and the common pitfalls that automation developers face when moving from a proof-of-concept phase to a full-scale production rollout.
Not read yet
Defining Attended Automation
Attended automation is designed for processes that require human judgment, real-time input, or security verification that only a human can provide. In this mode, the Power Automate flow is triggered directly by a user from their local machine. The user initiates the process, perhaps by clicking a button in a Power Automate console or a desktop shortcut, and the robot performs the repetitive parts of the task while the user continues to monitor or participate in the workflow.
Think of a customer service representative who needs to update a customer's address across three different legacy systems. Instead of the representative manually logging into each system, copying the data, and pasting it, they trigger an attended flow. The robot opens the systems, performs the data entry, and then stops, allowing the representative to verify the final result before hitting "save." This keeps the human in the loop, which is essential for sensitive data or high-stakes transactions.
Key Characteristics of Attended Flows
- User-Triggered: The process begins only when a human user initiates it.
- Shared Workspace: The robot shares the screen, keyboard, and mouse with the user.
- Human-in-the-loop: The flow can pause to ask for input (e.g., a message box asking "Is this address correct?").
- Context-Aware: The flow can easily access the user's local files, specific browser profiles, or active desktop applications.
Callout: The "Co-pilot" Philosophy Attended automation is best viewed as a co-pilot relationship. Just as a co-pilot assists a pilot by handling routine navigation tasks while the pilot manages the overall flight path, the attended robot handles the "robotic" aspects of a task—copying, pasting, and navigating menus—while the human handles the decision-making and quality assurance. This maximizes productivity without removing the human's ability to oversee the process.
Not read yet
Defining Unattended Automation
Unattended automation represents the "lights-out" scenario. These flows run on dedicated machines, often virtual machines (VMs) hosted in a cloud environment or a private server room. Because no human is sitting at these machines, the process is entirely automated from start to finish. Once a trigger occurs—such as a new email arriving in an inbox or a scheduled time being reached—the robot wakes up, logs into the machine, executes the task, and then logs out or returns to an idle state.
Unattended automation is the holy grail for high-volume, repetitive tasks. If you have a process that generates 5,000 invoices every night at 2:00 AM, you do not want a human to be there to trigger it. You want an unattended robot that runs overnight, processes the data, sends the reports, and reports any errors in the morning. This requires a much higher level of stability in your code, as there is no human present to click "Cancel" if a pop-up window appears unexpectedly.
Key Characteristics of Unattended Flows
- System-Triggered: The process starts based on a schedule, a queue item, or an API call.
- Dedicated Environment: The robot runs in a virtual environment, isolated from human activity.
- High Reliability: Error handling must be robust because there is no one there to fix a "stuck" window.
- Scalability: You can spin up multiple virtual machines to handle large volumes of work in parallel.
Not read yet
Comparison: Attended vs. Unattended
| Feature | Attended Automation | Unattended Automation |
|---|---|---|
| Primary User | Human worker (at their desk) | System/Server (back-end) |
| Execution | Triggered by user interaction | Scheduled or event-driven |
| Environment | User's local machine | Dedicated VM / Server |
| Licensing | Per user | Per bot (unattended capacity) |
| Best For | Tasks requiring human judgment | High-volume, routine tasks |
| Error Handling | Human can intervene in real-time | Must be fully automated/resilient |
Technical Implementation: A Practical Example
To understand how these work in practice, let’s look at a simple automation task: extracting data from an Excel spreadsheet and inputting it into a web-based CRM.
The Attended Approach
In an attended flow, you might build a flow that includes a "Display input dialog" action. This allows the human to specify which file to process.
// Pseudo-code for Attended Flow
Display input dialog "Select Excel File"
Get file path from user
Launch Excel
Read data from path
For each row in Excel:
Launch Web Browser
Navigate to CRM
Populate fields from Excel
Display message "Please verify data for row: %CurrentRow%"
If user clicks "Yes":
Submit form
Else:
Skip row
In this example, the robot is dependent on the user. If the user is on a lunch break, the robot stops. This is perfect for verifying sensitive data but inefficient for bulk processing.
The Unattended Approach
In an unattended flow, we remove the "Display input dialog" and the "Display message" steps. Instead, we use a shared network folder or a queue.
// Pseudo-code for Unattended Flow
Get files from network folder "C:\Automation\Input"
For each file in folder:
Launch Excel
Read data
Launch Web Browser (Headless or hidden)
Navigate to CRM
Populate fields
Submit form
Move file to "C:\Automation\Processed"
If error occurs:
Log error to central database
Send email notification to admin
Note: When designing unattended flows, you must use "Headless" browser modes or ensure the browser is configured to run without requiring a physical display. Always include comprehensive logging, as you will not be there to see the screen if something goes wrong.
Not read yet
Best Practices for Development
Developing for attended and unattended modes requires different mindsets. When you are the one watching the robot, you might get lazy with your error handling. When the robot is running in a data center at 3:00 AM, that same laziness will result in failed processes and lost data.
1. Robust Error Handling
For unattended flows, never assume the application will be open. Your flow must include steps to check if the application is running, launch it if it is not, and verify that the correct window is in focus. Use the "On block error" feature in Power Automate to capture exceptions and trigger recovery steps, such as restarting the application or sending an alert to a Slack or Teams channel.
2. Environment Variables and Secrets
Never hardcode credentials or file paths. Use environment variables to store paths for development, testing, and production. For credentials, use the CyberArk or Azure Key Vault integration. An unattended robot should never have a password written in plain text within the flow logic.
3. Modular Design
Break your flows into smaller, reusable sub-flows. If you have a specific process for "Logging into the CRM," make that a separate sub-flow. If you need to update that process later, you only have to change it in one place, rather than updating every single flow that interacts with the CRM.
Tip: The "Golden Rule" of UI Automation Always prefer API-based automation over UI-based automation (clicking buttons). APIs are much faster and more reliable than clicking on interface elements. If a website offers an API, use the "HTTP" action in Power Automate to interact with it directly. UI automation should be your last resort when no other integration method exists.
Not read yet
Common Pitfalls and How to Avoid Them
Even experienced developers fall into traps when scaling their automations. Here are the most common mistakes:
The "Hardcoded Resolution" Trap
In unattended automation, the robot runs on a virtual machine. If you record your clicks based on a specific screen resolution (e.g., 1920x1080), and the virtual machine is set to a different resolution, the robot will click on the wrong parts of the screen.
- The Fix: Always set the resolution of your virtual machines to a standard size, such as 1920x1080, and configure your Power Automate flows to work relative to window elements rather than absolute coordinate points.
Ignoring the Session Timeout
When a user logs out of their computer, the session is locked, and the UI becomes inaccessible. An unattended robot must be able to log itself into the machine, perform the task, and then either lock or leave the machine in a state that is ready for the next run.
- The Fix: Work with your IT department to ensure the service account running the robot has the correct permissions to log into the VM and keep the session active without needing a physical monitor or keyboard.
Over-reliance on "Wait" Actions
Many beginners use "Wait 5 seconds" to ensure a page loads. This is a fragile way to build automation. If the network is slow, 5 seconds might not be enough, and the robot will fail. If the network is fast, you are wasting time.
- The Fix: Use "Wait for element" or "Wait for window" actions. These tell the robot to proceed as soon as the element appears, making your flow faster and more reliable.
Not read yet
Scaling Your Automation Strategy
As your organization begins to deploy more bots, you will need a governance model. You cannot simply have everyone running flows on their own laptops. You need to transition from "Desktop Flows" (which are often experimental) to "Cloud Flows" that manage your desktop flows.
The Role of the Power Automate Gateway
The gateway is the bridge between the cloud and your on-premises machines. Whether you are running attended or unattended flows, the gateway allows the Power Automate cloud service to communicate with your desktop machine. For unattended flows, this is non-negotiable. It allows the cloud service to queue up jobs and distribute them across a pool of machines.
Machine Groups
Once you have more than one machine performing unattended tasks, use "Machine Groups." A machine group acts as a load balancer. If you have five machines in a group and a task comes in, the cloud service automatically assigns the task to the next available machine. This ensures that your automation processes do not backlog if one machine goes down for maintenance.
Callout: Licensing Insights Licensing is often the most confusing part of Power Automate. Attended flows usually require a "Per User" license, meaning each person who triggers the flow needs a license. Unattended flows require a "Per Bot" license. This is a flat fee for the bot itself, regardless of how many people trigger it. Always consult with your internal IT procurement team early, as the cost difference between these two models can be significant at scale.
Not read yet
Step-by-Step: Setting Up an Unattended Environment
If you are moving from a single desktop flow to an unattended production environment, follow these steps:
- Provision the Virtual Machine: Work with your infrastructure team to create a dedicated VM. Ensure it has the necessary software installed and that it is not being used by a human.
- Install the Power Automate Runtime: Download and install the Power Automate machine runtime on the VM.
- Register the Machine: Log into the machine with the service account that will run the flows and register the machine in the Power Automate portal.
- Configure the Service Account: Ensure the service account has the minimum required permissions. Avoid using "Domain Admin" accounts; use a dedicated service account with access only to the necessary applications and folders.
- Create a Machine Group: Even if you only have one VM, add it to a machine group. This makes it easier to add more capacity later without having to rewrite your flow references.
- Test in "Headless" Mode: Disable the visual debugging tools and run the flow as a service to ensure it completes without any UI pop-ups.
- Monitor the Logs: Use the "Monitor" tab in the Power Automate cloud portal to review run history. Look for patterns in failures, such as specific times of day where network latency might be causing timeouts.
Not read yet
Advanced Troubleshooting: When Things Go Wrong
Even with the best planning, robots fail. The key is in how you handle that failure. A good automation developer builds "Self-Healing" flows.
Implementing a Retry Logic
If your flow fails to connect to a website, don't just stop. Build a loop that attempts the connection three times with a short pause in between. If it fails on the third attempt, then—and only then—send an email alert to the support team.
// Example of Retry Logic
Variable 'RetryCount' = 0
Loop while 'Success' is false AND 'RetryCount' < 3:
Try:
Navigate to URL
'Success' = true
Catch:
'RetryCount' += 1
Wait 10 seconds
If 'Success' is false:
Send Email "Automation Failure: CRM Unreachable"
The Importance of Screenshots
In an unattended flow, you cannot see what is happening. Use the "Take screenshot" action inside your "Catch" block. Save the image to a temporary folder or attach it to your failure notification email. Seeing exactly what the screen looked like when the robot crashed is invaluable for debugging.
Not read yet
Comparison of Development Approaches
When deciding whether a process should be attended or unattended, use this quick reference guide:
| Factor | Favor Attended | Favor Unattended |
|---|---|---|
| Data Sensitivity | High (Human needs to verify) | Low (Standardized, trusted data) |
| Complexity | High (Requires human judgment) | Low (Rule-based) |
| Volume | Low/Medium | High |
| Frequency | Ad-hoc/On-demand | Scheduled/Continuous |
| Application Stability | Variable (Human can fix issues) | High (Must be stable) |
Summary and Key Takeaways
As we wrap up this lesson, it is important to remember that the choice between attended and unattended automation is not just a technical decision; it is a business decision. You are choosing how to allocate your human capital and your financial resources.
Here are the key takeaways to keep in mind:
- Human-in-the-loop is the defining feature of Attended Automation. Use this mode when the process involves subjective decisions, physical verification, or high-risk data that requires an audit trail of human approval.
- Unattended Automation is for scale and efficiency. It is designed for high-volume, repetitive tasks that run best without human interruption. It requires a stable, virtualized environment and robust, self-healing code.
- Environment matters. Never build unattended flows that rely on your local machine’s specific configuration or browser state. Use virtual machines, standard image configurations, and centralized credential management (like Key Vault) to ensure consistency.
- Error handling is the difference between a project and a product. A proof-of-concept might work on your laptop without error handling, but a production-ready unattended bot must be able to recover from network drops, application crashes, and unexpected pop-up windows.
- Start with the Process, not the Tool. Before you decide on attended vs. unattended, map out the process. If you find that the process relies on a human to "feel" if a document is correct, don't try to force it into an unattended flow. Start with an attended flow and automate the boring parts first.
- Governance is essential. As you scale, use Machine Groups and the Power Automate cloud portal to monitor your robots. Centralizing your logs and error notifications will save you hundreds of hours in maintenance time.
- Iterative Improvement. Automation is rarely "done." Treat your flows like software products. Gather feedback from the users, monitor performance metrics, and regularly look for ways to optimize the logic to make your robots faster and more reliable.
By mastering the differences between these two modes, you are not just building bots; you are building a resilient, scalable digital workforce that can handle the heavy lifting of your organization’s operations, freeing up your team to focus on the work that truly requires human intelligence.
Not read yet
Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.
- Leveraging the Power Automate Ecosystem
- Leveraging the Power Automate Ecosystem Quiz5q
- Cloud Flows vs Desktop Flows
- Cloud Flows vs Desktop Flows Quiz5q
- Designing Desktop and Cloud Flow Automations
- Designing Desktop and Cloud Flow Automations Quiz5q
- Trigger Types for Cloud Flows
- Trigger Types for Cloud Flows Quiz5q
- Target Application and Browser Interactions
- Target Application and Browser Interactions Quiz5q
- Methods for Running Desktop Flows
- Methods for Running Desktop Flows Quiz5q
- Concurrent Flow Execution
- Concurrent Flow Execution Quiz5q
- Attended vs Unattended Desktop Flows
- Attended vs Unattended Desktop Flows Quiz5q
- HTTP Actions in Cloud and Desktop Flows
- HTTP Actions in Cloud and Desktop Flows Quiz5q
- Work Queues for Automation
- Work Queues for Automation Quiz5q
- Designing Custom Actions
- Designing Custom Actions Quiz5q
- Cloud Flow Calling Desktop Flow
- Cloud Flow Calling Desktop Flow Quiz5q
- Child Cloud Flows and Data Passing
- Child Cloud Flows and Data Passing Quiz5q
- External API Calls in Cloud Flows
- External API Calls in Cloud Flows Quiz5q
- Trigger Conditions and Concurrency
- Trigger Conditions and Concurrency Quiz5q
- Timeout and Retry Policies
- Timeout and Retry Policies Quiz5q
- Data Objects and Operations in Cloud Flows
- Data Objects and Operations in Cloud Flows Quiz5q
- Text Parsing JSON XML CSV
- Text Parsing JSON XML CSV Quiz5q
- UI Options in Desktop Flows
- UI Options in Desktop Flows Quiz5q
- Datatables Lists and Custom Objects
- Datatables Lists and Custom Objects Quiz5q
- Subflows in Desktop Flows
- Subflows in Desktop Flows Quiz5q
- External APIs in Desktop Flows
- External APIs in Desktop Flows Quiz5q
- Timeout and Retry in Desktop Flows
- Timeout and Retry in Desktop Flows Quiz5q
- Custom Actions in Desktop Flows
- Custom Actions in Desktop Flows Quiz5q
- Flow Control and Loops
- Flow Control and Loops Quiz5q
- Expressions in Cloud Flows
- Expressions in Cloud Flows Quiz5q
- Variable Actions for Flows
- Variable Actions for Flows Quiz5q
- Secure Input and Output Data
- Secure Input and Output Data Quiz5q
- Desktop Flow Priority and Queues
- Desktop Flow Priority and Queues Quiz5q
- Exception Handling Blocks
- Exception Handling Blocks Quiz5q
- Business Exception Error Handling
- Business Exception Error Handling Quiz5q
- Work Queues in Flows
- Work Queues in Flows Quiz5q
- Building a Custom Connector
- Building a Custom Connector Quiz5q
- Custom Connector Authentication
- Custom Connector Authentication Quiz5q
- Custom Connector Policy Templates
- Custom Connector Policy Templates Quiz5q
- Code in Custom Connectors
- Code in Custom Connectors Quiz5q
- Credential Management Practices
- Credential Management Practices Quiz5q
- On-Premises Data Gateway
- On-Premises Data Gateway Quiz5q
- Dataverse Solutions Components
- Dataverse Solutions Components Quiz5q
- Machine and Machine Group Requirements
- Machine and Machine Group Requirements Quiz5q
- Machine Registration Management
- Machine Registration Management Quiz5q
- Machine Group Management
- Machine Group Management Quiz5q
- Load Balancing Desktop Flows
- Load Balancing Desktop Flows Quiz5q
- Run Queue Operations
- Run Queue Operations Quiz5q
- Analyzing Flow Run History
- Analyzing Flow Run History Quiz5q
- Power Automate Analytics Dashboard
- Power Automate Analytics Dashboard Quiz5q
- Desktop Flow Monitoring
- Desktop Flow Monitoring Quiz5q
- Automation Performance Optimization
- Automation Performance Optimization Quiz5q
- Troubleshooting Flow Failures
- Troubleshooting Flow Failures Quiz5q
- Center of Excellence RPA Analytics
- Center of Excellence RPA Analytics Quiz5q
No PL-500 practice exam yet
Your points already work on 76 Amazon, CompTIA and Microsoft exams.
See the exams