Trigger a desktop flow from a cloud flow
Prerequisites
To trigger desktop flows through Power Automate, you have to use machines or machine groups. Machines are physical or virtual devices that are used to automate desktop processes. Machine groups allow you to organize multiple machines together to help distribute your automation workload.
As an alternative to the machines, you can use the on-premises data gateway. The gateway is an enterprise-grade secure connection between Power Automate and your device.
A work or school account.
Important
You must use the same work or school account to set up the gateway, to sign into Power Automate, and to log into your Windows device.
Go to flow.microsoft.com and sign in with your credentials. In Power Automate, select My flows. Select + New flow, and from the drop-down select Instant cloud flow.
Alternatively, you can select Automated cloud flow to create a flow that is triggered by a specific event, like the creation of a new file in an OneDrive for Business account.
Enter a name for the cloud flow, otherwise one will be automatically generated. Select Manually trigger a flow and then select Create.
Select + New Step.
In the Choose an action prompt search field, enter power automate desktop. Under Actions, select Run a flow built with Power Automate desktop.
In the action parameters, set Run mode to Attended - Runs when you're signed in, and in the desktop flow drop-down select Create a new desktop flow.
Enter a name for the desktop flow and select Launch app.
A message from the browser may appear, asking whether to allow flow.microsoft.com to open an application. Allow this action to continue to Power Automate for desktop.
The Power Automate Console creates a desktop flow with the selected name and opens the flow designer to edit the new flow.
Optionally, create Input/output variables to pass data back and forth from the Power Automate web portal to your desktop flow. In the Variables pane, select + to add an input or output variable.
To create an input or output variable, the Edit variable dialog box will require filling in the fields as follows:
- Variable type—input or output
- Variable name—the name of the variable in flow designer
- Default value—the value which the variable holds if none is assigned
- Data type—the type of the variable (integer, string, datetime, and so on.)
- External name—the name used outside flow designer. This name appears in Power Automate.
- Description—a description of the variable. This mandatory field appears in Power Automate
- Mark as sensitive-enable this option to set the variable as sensitive and hide its content in the flow designer and the Power Automate logs.
Create an Input variable to pass data from Power Automate web portal to your desktop flow. The variable can be used anywhere in the desktop flow.
To pass data from your desktop flow to Power Automate web portal, create an Output variable.
Back in Power Automate, any input variables appear as fields in the UI action.
Note
If an input variable contains sensitive data, you may want to obfuscate or omit it from the logs. To find more information regarding sensitive text inputs, refer to Manage sensitive input like passwords.
Output variables from desktop flows can be used in other Power Automate actions.
Feedback
Submit and view feedback for