cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AthenaDepper Advocate I
Advocate I

Update a SQL database record from email response

I have a couple of flows that will send out emails for approvals, but I am running into a slight problem. The flow will send the email, with the response, but I need to update the corresponding SQL record with the response. Is this possible? The initiating app is a PowerApp, and the flow is set to run after the patch statement is executed.

1 ACCEPTED SOLUTION

Accepted Solutions
AthenaDepper Advocate I
Advocate I

Re: Update a SQL database record from email response

So I was trying to do this, and it wasn't working last night, but with some playing, I was able to finally get it to work. What I did was pass it the last row id number + 1, since this number is auto-assigned. My biggest issue was to do this for multiple records at once, but I was able to put this into my ForAll loop. Thank you for your help!

View solution in original post

2 REPLIES 2
Community Support
Community Support

Re: Update a SQL database record from email response

Hi @AthenaDepper,

 

How is your flow triggered?

Please try to use the action Update row to update an existing row in a table. Note, a primary key is required when using Update row action.

If your flow is triggered by a PowerApps button, you could specify the required Row id and Id from PowerApps, then update the email response to the table.

1.PNG

If you are using SQL Azure Database table, you could consider using triggers in the SQL connector, so that your flow could be triggered when an item is created, then update the corresponding item with the email response.

Please take a try with it on your side.

The following docs for your reference:

Introducing triggers in the SQL Connector

SQL Server

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AthenaDepper Advocate I
Advocate I

Re: Update a SQL database record from email response

So I was trying to do this, and it wasn't working last night, but with some playing, I was able to finally get it to work. What I did was pass it the last row id number + 1, since this number is auto-assigned. My biggest issue was to do this for multiple records at once, but I was able to put this into my ForAll loop. Thank you for your help!

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Users online (7,012)