Build a cloud flow that's triggered in Outlook

Completed

Now that you have a desktop flow, you're ready to create a solution in Power Automate. Solutions are groups 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, both become portable, making it effortless to move them and all their components from one environment to another, in other words, from development 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, create your flow from the solution from the beginning to avoid needing to rebuild your flow.

Watch the following demo video of the steps that you complete in this unit.

Create a solution

  1. Go to Power Automate to get started, select  Solutions on the left navigation menu, and then select New solution.

    Screenshot of the New solution button on the Solutions window.

  2. Set the display name for your solution. In this case, the display name is Invoice processing solution, but you can make it whatever you want.

    Note

    Notice the Name field fills in automatically as you typed the Display Name field. Solutions are built on Microsoft Dataverse, and the Name field can't use spaces. This allows for easier calling inside of other apps and solution-aware flows.

  3. Set the publisher as CDS Default Publisher and then select Create.

    Screenshot of the solution details on the New solution screen.

This screen is where you create and edit flows that are specific to this solution.

Create cloud flow in solution

  1. To create a new solution-aware flow, select + New > Automation > Cloud flow > Automated.

    Screenshot of Cloud flow selected in the new menu.

  2. Name the flow, Use Outlook email trigger Desktop flow, or you can choose whatever name you want.

  3. Search in the Choose your flow's trigger field to find and select When a new email arrives (V3) and then select Create.

    Screenshot of the flow named and the action of When a new email arrives (V3) selected.

    Note

    Always use the latest version of the action that you're seeking, which will ensure that you have access to new features that have been released.

  4. The flow opens in the New Designer. Select the trigger and the properties panel opens from the left hand side.

  5. Select Show All next to the advanced parameters to display all parameters.

    Screenshot of the Show advanced options feature.

  6. Ensure that Include Attachments and Only with Attachments fields have Yes selected.

  7. In the Subject Filter field, enter new invoice.

Set up Run a flow built with Power Automate for Desktop Action

  1. Select the + icon underneath the trigger and then Add an action.

  2. Search for and select the Run a flow built with Power Automate for desktop action.

Create a connection

If you didn't already set up a connection to your machine, you need to create one. If you already have a connection, you can skip this section and go to the Enter Inputs section.

  1. Enter a Connection Name. For this example, the connection is named DesktopFlowConnection.

  2. For the Connect field, select Connect with sign in - Attended.

  3. For the Machine or Machine Group, select your machine. If you don't see your machine, select the refresh button next to Search. If your machine still doesn't come up, check the Power Automate Machine runtime app and make sure your computer is connected to the same environment.

  4. Select Sign in and a pop up appears for you to sign in with your credentials.

    [!div class="mx-imgBorder"]

    Screenshot showing the settings for the connect with sign in - Attended option

Enter inputs

Once a connection is created, you're redirected to the Run a flow built with Power Automate for desktop action to enter inputs.

  1. For the Desktop Flow field, select Invoicing.

  2. For the Run Mode, select Attended (runs when you're signed in).

    Once you choose your desktop flow, the input variables that you defined in your desktop flow are requested. For now, we can put some placeholders in these fields, though you can use information from the email or attachments. You can also use the output variables that are provided by the desktop flow in later actions.

  3. For the Account enter WingTip Toys.

  4. For the Amount, enter 200.00.

  5. For the Contact, enter b.friday@wingtiptoys.com.

  6. For the Date, enter today's date.

    Screenshot of placeholders entered for Amount, Contact email, and Account name fields.

Now that you set up your desktop connection and created a cloud flow to trigger the desktop flow and provide inputs, you can test that everything is functioning properly.