web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Can we call a PowerAutomate Flow synchronously on create/update of a record?

ashlega Profile Picture ashlega 34,477

It seems like a no-brainer question with a simple “no” answer; however, there was something that came up on Linkedin while discussing my other post about using CDS pre/post images with the Flow:

https://www.itaintboring.com/dynamics-crm/cds-post-images-and-cds-pre-images-in-powerautomate-flows/

What if, instead of using the service bus, we tried using “web hook” option in the Plugin Registration Tool? It does support synchronous execution, after all:

image

The url below will provide all the details on how to use that option, so I won’t be repeating the steps here:

https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/register-web-hook

Instead, I’ll jump right to the part where it did not work out the way I hoped it would with the Flows.

I did not have any problems registering a synchronous step in the pre/post operation:

image

And the Flow itself is relatively straightforward:

image

The flow will get the request,it will find record guid in the incoming json payload, and it will use that guid to update account phone #.

However, as it turned out, even though the Flow will be called synchronously, CDS “execution pipeline” won’t wait for the Flow completion. So, even though there were a few occurrences when I could see updated phone # right away while testing, most of the times I had to use “refresh” to see the change:

syncflow

This makes sense after all, since it may take a while for the Flow to finish (not even talking about possible “delay” actions in the Flow), so, it seems, it’s only the initial trigger that will be called synchronously. The rest of the flow will still run a-synchronously from the execution pipeline standpoint.

Long story short… this is definitely yet another option for passing pre/post images to the Flow, but it does not seem to help with the synchronous execution. Yet it’s probably not as scalable as the service bus. Although, unlike with the service bus approach, there are less steps involved here, so this may get the job done a little faster.


This was originally posted here.

Comments

*This post is locked for comments