Build a cloud flow that's triggered in Outlook
Once you have a desktop flow (such as the Contoso invoicing flow we developed earlier in this learning path), you're ready to create a solution in Power Automate that incorporates a cloud flow with it. Solutions are containers of apps and flows that are packaged together and enable seamless application lifecycle management (ALM). For example, when you host your flow in a solution, it becomes portable, making it effortless to move them and all their components from one environment to another, such as from development to testing to production. Flows that are built inside solutions are called solution-aware flows. You can't move a non-solution-aware flow into a solution, so if you think that you need a solution, start with one from the beginning to avoid needing to rebuild your flow.
If you didn't create the Contoso invoicing flow, you can go to the unit Build your first Power Automate for desktop flow to complete it.
Once you have your Contoso invoicing flow, watch the following demo video of the steps that you complete in the remainder of this unit.
Go to Power Automate to get started, select Solutions on the left navigation menu, and then select New solution.
Set the display name for your solution. In this case, the display name is Invoice processing solution, but you can choose whatever fits your needs. Notice that the name fills in automatically as you set the display name. Solutions are built on Microsoft Dataverse, and the names can't use spaces, which allows for easier calling inside of other apps and solution-aware flows. Choose a publisher and then select Create.
The Solutions screen populates with your new solution. Select the name (in this case Invoice processing solution) to open it.
This screen is where you create and edit flows that are specific to this solution. To create a new solution-aware flow, select Cloud flows > Automation > Cloud flow > Automated.
Name your flow. The following flow is named Use Outlook email trigger Desktop flow, but you can choose whatever name you want. Search the actions to find and select When a new email arrives (V3) and then select Create.
Always use the latest version of the action that you're seeking, which ensures that you have access to new features that are released.
You might need to wait a moment for Outlook to sign in. The Folder option should display and be automatically populated with Inbox. Select Show advanced options and then ensure that Include Attachments and Only with Attachments have Yes selected. In the Subject Filter field, enter new invoice.
Select New step and then search for and select the Run a flow built with Power Automate for desktop action.
In the Desktop flows flow step, input the following:
Connect: Connect with username and password
Machine or machine group: select the machine from the dropdown that you're connecting the flow to
The next two fields request your credentials to sign in to your computer. If you're uncertain about what to put in the Domain and username field, you can open a command prompt window by opening the Start menu, entering CMD in the search box, and then pressing the Enter key. When the command prompt opens, enter Set user and then press the Enter key.
Several lines of code appear. Separate the user domain and the username with a backslash (\), as shown in the following screenshot. Select Create.
Domain and username: [enter the machine specific domain and username]
Password: [enter the machine-specific sign-in password]
After you connect to your desktop, you can complete this step. Use the dropdown menu to select the name of your desktop flow (in this case, Invoicing), and then in the Run Mode dropdown menu, select Attended - Runs when you're signed in.
When you choose your desktop flow, the input variables that you defined in your flow are requested. The following screenshot shows that the invoice flow is requesting an Amount, a Contact email, and an Account name to feed into the Contoso Invoicing app. Put some placeholders in these fields for now, though you can use information from the email or attachments later. You can also use the output variables that are provided by the desktop flow in later actions. Save your flow.
You set up your desktop connection and created a cloud flow to trigger your desktop flow and provide inputs. Now you can test that everything is functioning properly.