Best Practice: On Modified Power Automate

I want to be able to fire Power Automate flows when a particular field value is set. Right now, if a form is marked completed, in a modified flow, I check if the field is set to completed, send the email, then I set a flag field as the email is sent to prevent sending the email again in the future.

The problem with this is, by virtue of setting the flag field value, I cause the modified flow to fire for a second time.

I am wondering if there is a way to fire a flow from within the form, in the beforeSave event, so that the flow isn't fired two times?

Or, is there a better way to do this?

Hi @smithme

You can use the trigger 'When an HTTP request is received' in Power Automate, and firing that using a REST AJAX call from the spBeforeSave handler. This works great if you have the premium licensing, alternatively you can do exactly the same thing, but with a Logic App in Azure.

If you want to pursue that, let me know by reply and I'll post an example on here.

Kind regards
Andy

1 Like

Hi @abolam.

I would like to see an example of how this can be done please!

Thanks,
Stormanh