cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DaynaLitherland
Level: Powered On

The Basics: Starting a Microsoft Flow from a PowerApp Form

Hi All,

 

Really daft question, I'm sure, but how do I trigger a Microsoft Flow workflow from a PowerApps form?

 

The data is held in SQL, so I was thinking of creating a Microsoft Flow application separate from my PowerApps form, with a trigger of new database record. But, I don't know how I could then send the user the link / item from the PowerApps form. So I assume I need to integrate the two, but I'm very new to PowerApps, and even newer to Microsoft Flow, so not sure where to start!

 

I've seen a template for a basic approval, but I don't understand or see how this is linked to the form.

 

Any help you can offer, would be appreciated.

 

Kind Regards,

Dayna

1 ACCEPTED SOLUTION

Accepted Solutions
agneum
Level 8

Re: The Basics: Starting a Microsoft Flow from a PowerApp Form




To Insert a Row: 

From Powerapps menu in your app go to Action > Flows > Create a new Flow

From the new browser window, press + New Step > Add an Action

Search for "respond" and select "respond to PowerApps" to powerapps

Now inbetween the two actions you can sandwich the SQL call. Add an action and search for "SQL" and choose SQL Server- Insert Row

Then it's pretty straight-forward. You select the table name, and then specify the values for your columns. If the columns should be provided from Powerapps, just click "Ask in Powerapps" so that it becomes an argument. (Make sure to do it right the first time, if you add too many arguments there is no way to remove them and you will have to create a new flow!)

After you are done, name the flow in the top left corner where it says "PowerApps button" . And save your flow in the top right corner.

Now all that is left to do is connect to the app. In your PowerApp, if you have a button, associate the flow from Action > Flows menu. select it's OnSelect property and type the following: [NameOfYourFlow].Run(argument0, argument1... )

I've heard that triggers might not work correctly with Powerapps, if it doens't work properly, I suggest creating and running a stored procedure. The steps are pretty much the same, just sandwich SQL Server - Execute stored procedure

Getting data back is a bit different. I suggest you watch the following video:
www.youtube.com/watch?v=K_H5r0nzwy4




View solution in original post

2 REPLIES 2
agneum
Level 8

Re: The Basics: Starting a Microsoft Flow from a PowerApp Form




To Insert a Row: 

From Powerapps menu in your app go to Action > Flows > Create a new Flow

From the new browser window, press + New Step > Add an Action

Search for "respond" and select "respond to PowerApps" to powerapps

Now inbetween the two actions you can sandwich the SQL call. Add an action and search for "SQL" and choose SQL Server- Insert Row

Then it's pretty straight-forward. You select the table name, and then specify the values for your columns. If the columns should be provided from Powerapps, just click "Ask in Powerapps" so that it becomes an argument. (Make sure to do it right the first time, if you add too many arguments there is no way to remove them and you will have to create a new flow!)

After you are done, name the flow in the top left corner where it says "PowerApps button" . And save your flow in the top right corner.

Now all that is left to do is connect to the app. In your PowerApp, if you have a button, associate the flow from Action > Flows menu. select it's OnSelect property and type the following: [NameOfYourFlow].Run(argument0, argument1... )

I've heard that triggers might not work correctly with Powerapps, if it doens't work properly, I suggest creating and running a stored procedure. The steps are pretty much the same, just sandwich SQL Server - Execute stored procedure

Getting data back is a bit different. I suggest you watch the following video:
www.youtube.com/watch?v=K_H5r0nzwy4




View solution in original post

DaynaLitherland
Level: Powered On

Re: The Basics: Starting a Microsoft Flow from a PowerApp Form

Thanks for your help Agneum, much appreciated!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,541)