Running a Microsoft Flow from a Business Process Flow in Dynamics 365

Ronelle Raath, 29 November 2019

Microsoft Flow can be configured to easily automate tasks which use a range of different applications and services. Not only can you connect to Dynamics 365 from Flow to work with records – you can also run Flows from within Business Process Flows in Dynamics 365.

Create Flow:

In this example I created a Flow that when triggered will create a new Contact record with Last Name ‘Test’.

Create Business Process Flow:

Create a Business Process Flow as per your requirements. You can then add a ‘Flow Step’ step within your Business Process Flow. Note that adding a Flow step is in preview at the time of writing this blog.

When selected you will need to give the step a name, sequence and finally the Flow that you would like to trigger.

Note: Sequence is the order in which the steps are ordered in the stage. E.g. The first Step will be set as sequence = 1

Once happy select ‘Apply’.

Complete the Business Process Flow ‘Validate’ and ‘Activate’ it when ready.

Both Flows and Workflows are available as options from a Business Process Flow. Here are several key differences:

  • With Flow, a “Run Flow” button is available to click. This gives the user full control over when to run the Flow. The user doesn’t need to complete all required fields in the Business Process Flow stage
  • Workflows only run on stage entry or exit so the user will need to complete any required fields before the workflow can be run.
  • Workflows can also be triggered when fields in the Business Process Flow are changed
  • Even though we’re creating a Contact Entity for this scenario, the other benefit of using Flow is that you’re not limited to only the Dynamics 365 framework and can make use of hundreds of connectors available. Giving you options like easily connecting to and sending a tweet from Twitter or triggering a Prediction with the new AI Model Feature.

All easily done with a click of a button in your BPF.

Once triggered it will commence into a ‘Processing’ stage button and Flow will continue to complete action.

You will find that your New Contact has been created as per the Flow triggered from your Business Process Flow.