How to Call Microsoft Power Automate Flows from a Business Process Flow

Leave a comment

Did you know you can call Microsoft Power Automate Flows directly from Dynamics 365 Power Apps Business Process Flows? In this post, we will look at how to do just that. It’s a useful feature if you want your users to be guided through knowing when to run a flow in a particular business scenario.

If you prefer to watch the video on this, check out the video on my YouTube channel:

First, let’s create a new Business Process Flow. We can do this by signing into https://flow.microsoft.com and selecting the environment:

Or the old way by selecting Settings->Processes. We will open the Lead to Opportunity Sales Process as an example:

Opening it, we see Flow Step (Preview) as an option under Components:

Let’s look at Business Process Flow. We see it goes through the Stages of Qualify, Develop, Propose, Close in the Lead and Opportunity entities:

If we were to create a new Lead, we see we are guided through the same process:

And the Qualify (Lead) has 7 steps:

Which we can see on the Lead form:

Let’s add a flow step. Under components, drag the Flow Step into the Qualify stage:

Now let’s add the details of the Flow we will call. We will give the step a name, and select the flow. Let’s first click on Look Up More Records:

We get a list of Flows in our environment:

So where does this come from? Let’s log into https://flow.microsoft.com and go to the same org. Our flows are in various Solutions:

Let’s choose the flow called Button->List Records, which looks like below. It gets a list of accounts and emails them to a user:

Let’s use this as the Flows in the Business Process Flow, and click Apply:

We can Validate and Update our Business Process Flow once complete:

Now when we create a new Lead, we see in the Qualify stage there is our new Flow, with a button to Run Flow:

Enter in Qualify information and Save the Lead. We see the Run Flow button has become Active:

Clicking on it, we see the Flow pop-up appear. Click Run flow:

We see:

Clicking on the link takes us to the Flow runs page:

Where we see a Succeeded Flow:

And logging into our email we get the email results of the flow:

Nice feature, it’s still in Preview but many cool use cases for it.

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

Leave a Reply

Your email address will not be published. Required fields are marked *