Use Power Automate pane

Create new flows or add and edit existing flows using the Power Automate pane within Power Apps Studio. The Power Automate pane is enabled by default.

Important

Arguments that pass from Power Apps to Power Automate are visible as network traffic and can be intercepted. Most traffic is likely harmless data that are irrelevant outside the application, for example arguments like "yes" or "Redmond".

Evaluate the parameters passed to Power Automate and consider the consequences (if any) if they're changed by an exernal actor. To mitigate risks, validate the parameter values passed.

For example, if you send sensitive data to a person in your organization through email, for example someuser@contoso.com, validate the address in Power Automate. You can check the incoming arguments to confirm the organization, @contoso.com, and only allow the flow to proceed if the right organization is present.

Create a new flow

  1. Open a new or an existing app in Power Apps Studio.

  2. On the app authoring menu, select Power Automate.

    A screenshot highlighting the Power Automate option in the left pane.

  3. In the Power Automate pane, select Create new flow.

    A screenshot showing the Create your flow screen having several options from which to choose a flow template.

This action opens the Create your flow modal dialog within Power Apps Studio. You can choose to create the flow from the available templates, or create a flow from scratch.

Start with a template

Power Automate provides several flow templates that you can choose from by default. This section explains how to create a flow using such available templates from within Power Apps Studio.

  1. From the list of available templates, select a template of your choice. For this example, we use Click a button in Power Apps to send an email.

    A screenshot showing Click a button in Power Apps to send an email template.

  2. The next step shows the connections required to create a flow based on the selected template. More information: Connectors overview

    A screenshot showing connections required by the flow.

  3. (Optional) You can use Edit in advanced mode to update the connection, and customize the flow template. When done, select Save to save the flow. Skip the next step since your flow creation process is now complete.

  4. Select Next > Create to create the flow.

    The flow now appears in the list of flows inside the Power Automate pane, under the In your app section.

    A screenshot showing the flow added to your app.

    Tip

    For more information about creating cloud flows from templates, see Create a cloud flow from a template.

Create from blank

Instead of using the available templates, you can create a flow from scratch, and customize the steps as per your requirement.

  1. Select Create from blank.

  2. Add and customize the flow with steps and actions, as shown in the following example.

    A screenshot showing example workflow.

  3. When done, select Save from upper right corner of the screen.

    Tip

    For more information about customizing and configuring cloud flows, see the How to articles starting from Add multiple actions and advanced options to a cloud flow.

Add an existing flow

You might have access to the existing flows in the environment where you're creating your app. To add and use these flows in your app, select Add a flow, and then choose the flow from the Add a flow from this environment section.

A screenshot showing the option to add existing flows from the current environment.

Tip

You can hover over the flow to see more details before adding to your app.

You must meet the following requirements to be able to add an existing flow to a canvas app:

  • Have access to the flow
  • Have access to see the flows that are part of the same solution
  • Have a Power Apps trigger for your flows.

After being added, the flow will appear under the In your app section inside the Power Automate pane.

Reference a flow

To reference the added flow, update the formula bar for the control or component within Power Apps Studio with the flow details. For example, to reference a flow named "PowerAppsbutton" that triggers an email without accepting any input parameters, use the following formula on the button's OnSelect property:

PowerAppsbutton.Run()

A screenshot showing a flow added to the OnSelect property of the button with a formula.

This behavior is different from how the reference to a flow works within Power Apps Studio if the Power Automate pane is disabled.

When you add a flow with the Power Automate pane disabled, you must choose a behavior property of the control or the component that you want to associate with the flow. Adding a flow, in this case, clears any formula already associated with the chosen property (when the flow reference is added). Any existing formula gets removed, and you must carefully make a copy of the existing formula before adding the flow in order to preserve it. You can then paste your copied formula back after the flow reference is added.

For example, on a button's OnSelect property, adding the flow removes your existing formula, and you have to carefully make a copy of the existing formula before adding the flow. The following example shows the process with the Power Automate pane disabled. In this case, the formula added for the button property is removed to reference the added flow.

A screenshot showing flow added to OnSelect property of the button that replaces existing formula for the button property.

Whereas with the Power Automate pane enabled, any existing formula is preserved automatically (isn't removed). You can add the flow reference in the formula for a behavior property as per your requirement.

The following example shows the process with the Power Automate pane enabled. When the flow is added, the existing formula for the button's OnSelect property is preserved, and the flow reference isn't added automatically.

A screenshot showing flow added to OnSelect property of the button that doesn't get replaced after the flow addition.

Now you can reference the flow through the regular process of updating the formula for the control or component—as explained earlier.

Edit an existing flow

You can now edit flows added to your app without leaving Power Apps Studio.

  1. Under the In your app section of the Power Automate pane, select ... (ellipsis) to the right of a flow.

  2. Select Edit.

    A screenshot showing the option to edit an existing flow.

    The flow opens inside the editor.

    A screenshot showing the flow open in editor for customization.

  3. Make your changes, and then select Save.

    Important

    To avoid losing unsaved changes, ensure you select Save before closing the editor.

Refresh a flow

If any changes are made to the flow in Power Automate (instead of using Power Apps Studio) while you're editing the app, refresh your flow to get the latest changes.

To refresh the flow and pull the latest changes, select ... (ellipsis) to the right of your flow, and then select Refresh.

A screenshot showing the option to refresh the flow and pull in the latest changes.

A loading spinner appears, and the flow is refreshed.

Remove a flow

To remove a flow from your app, select ... (ellipsis) to the right of your flow, and then select Remove from app.

A screenshot showing the option to remove the flow from the app.

This action only removes the flow from the app, while the flow remains intact in the environment. You can add the flow again to the same app, or use it in other apps.

Classic Power Automate experience

The Power Automate pane is now enabled by default. To use the classic Power Automate experience to create a flow, switch back to the old experience manually.

Important

It’s recommended that you use the Power Automate pane to create a flow. The classic Power Automate experience should only be used for troubleshooting. The classic experience will be retired soon and won't be available.

  1. Open a new or an existing app in Power Apps Studio.

  2. Select Settings at the top.

  3. Select Upcoming features.

  4. Under the Retired tab, select Enable Classic Power Automate pane to set the toggle to On.

See also