Next Gen Data Learning – Amplify Your Skills

Blog Home

Blog

Business Process Flow Integration In Power Automate

by | Power Automate

In this tutorial, we’ll discuss how we can integrate a Business Process flow to another flow in Power Automate. One example is when we want to send a Slack message with some of the recorded information whenever a record is saved on our business process flow. 

Business Process Flow

For this tutorial, we’ll use an Automated Flow because we’re going to create a flow based on an automated event or a trigger. The trigger will be based on when a record gets updated on the table from our business process flow. 

Creating An Automated Flow For Business Process Flow Integration

First, let’s click the Automated Flow.

Business Process Flow

Then name it “SendEmailWhenNewEmployeeOnboarded”. 

Business Process Flow

For the flow’s trigger, we need to use a common data service trigger called “When a record is created”. 

Business Process Flow

Then, click the Create button.

Business Process Flow

Our flow will then go and connect to the Common Data Service.

Business Process Flow

Again, the trigger that we’re using is the Common Data Service connector, and the action is When a new record is created. We should then choose the Environment, Entity, and Scope. After that, we can now create an automated flow wherein whenever we create or update a record within the employee table, it will send a slack message. 

Business Process Flow

We need to select the environment first. We are currently in the Env1 environment where we created our Common Data Service and its Entity. So, we can just choose the Current option. 

Business Process Flow

Select the NewEmployees entity for the Entity Name

The Scope is for limiting the access of the records in the Organization.

We won’t discuss this field thoroughly in this tutorial. But for this example, we can set this field if we want our flow to be triggered once the record is only created by a Business Unit, Organization, Parent-child business unit, or User. For this example, we want to trigger the flow from anyone who creates a record within our entity. So, let’s choose the Organization option.

Posting A Slack Message When A New Record Is Created

First, click New step

Business Process Flow

Search and click Slack

Business Process Flow

Click Post message.

Business Process Flow

Then, let’s sign in. 

Business Process Flow

After signing in to Slack, let’s set the Channel Name to general because we want to post the message on the general channel. 

Business Process Flow

For the Message Text, let’s use a concat Expression.

Business Process Flow

Let’s type ‘Hi everyone! We have a new employee: ‘. Make sure to include space after the word “employee” and add a comma (,) after the closing parenthesis. 

Business Process Flow

Then, let’s add Dynamic content for the FirstName and LastName. Make sure to add a comma (,) and space after each of them. 

Business Process Flow

The last thing that we should write is ‘. They will be reporting to ‘, then add the ReportingManager variable. 

Business Process Flow

After that, click the OK button. 

Lastly, save the flow.

Now we have created an automated flow that can be triggered based on an entry from a Common Data Service. We’ll make that entry using the business process flow that I’ve created beforehand.

Testing The Automated And Business Process Flow

Let’s now test if our automated flow will work whenever we create a new entry from our business process flow. First, click My flows.

Then, click Business process flows.

Run OnboardingANewEmployee by clicking the play button. 

Then, click the first step.

Let’s add the employee ID, first name, last name, phone number, and date of birth. 

After that, go to the next step. 

Let’s choose the Tester position. 

Then go to the next step and add a sample product that they will test. For this example, let’s use Music.

For the last step, let’s set the reporting manager and starting pay.

Lastly, finalize this by clicking the Save & Close button. 

Let’s go back to My flows.

Click on our flow. We need to wait for a few minutes to see if our automated flow will be triggered and if a Slack message will be posted on our general channel. 

After a few minutes, we can then see the new record on our automated flow. 

We can also see that it posted a Slack message. 

Moreover, we can see the message on the general channel.

***** Related Links *****
Microsoft Flow String Functions: Concat And Replace
Power Automate Dynamic Content Overview
Automated Flow In Microsoft Power Automate

Conclusion

As a recap, we’ve learned how to integrate our business process flow with an automated flow using the Common Data Service as the connector and a trigger.

First, we had a business process flow that fills in an entity in our Common Data Service. Then, it triggers the automated flow that we created which sends out a Slack message that contains the record. This is a very simple process that can be useful especially for automating simple or even complex business processes.

All the best,

Henry

Related Posts