Categories
Skip Navigation Links

Recent Articles

How to Call Power Automate from Power apps

In this article, we will see how you can call a Power Automate - flow from Power Apps Canvas App. Also, we will see how we can pass parameters from the canvas app to Power Automate and return data from flow to power apps.

Prerequisite:

You need to create a Power Automate flow in which the trigger action should be Power Apps. trigger action powerapps

Call Flow from Canvas App

  1. Open/Edit your canvas app.
  2. Create a screen and place a button over there. This is just for example purposes, modify according to your requirement.
  3. powerapps buttom place
  4. As shown in the screenshot, click on the button (Start Flow here) >> from the top menu select Action, and then click on Power Automate.
  5. select powerautomate frompowerapps
  6. All the available flows will be listed. Select the flow or create a new flow if you don’t have it already.
  7. Run the power app and test. You can see your workflow is successfully run.

Trigger Flow with parameters

We may face requirements when we have to send parameters along with starting the flow.

When we are creating flow, we can easily Ask for parameters.

  1. Open/Edit your flow
  2. Tap on the field and you can choose the action – Ask in PowerApps
  3. ask in powerapps
  4. You can see the variable name is picked based on the Action (SubjectName). We cannot change the name of the variable unless you do some tricks.
  5. pick variable name
  6. Now, go to your PowerApps, edit it.
  7. Now when you select the flow, it will ask you to provide the parameter.
  8. floaw parameters in app
  9. Specify the parameters' name and you are good to go.

Return data from Power Automate to PowerApps

In this section, we will see how you can send data back from Flow to Power Apps.

  1. Open/Edit your flow.
  2. Add an action - Respond to a PowerApp or flow
  3. Respond to a PowerApp or flow
  4. As shown in the screenshot, the first textbox contains the Key and the second textbox contains the value/data (Which will be sent back to Powerapps)
  5. Now go to your app. On the button, where you invoke the flow, write like mentioned in the below screenshot. Here, we are using the Set command so that it will run the flow and the flow output will be stored in a variable (Here - GetFlowData).
  6. start flow syntax
  7. Now, you can use this variable in your app. You can see we have set the label text using the variable.
  8. start flow

We value your Feedback:

Page URL:

Name:

 

Email:

 
 

Suggestion:

 

© 2021 Code SharePoint