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.
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.
Then name it “SendEmailWhenNewEmployeeOnboarded”.
For the flow’s trigger, we need to use a common data service trigger called “When a record is created”.
Then, click the Create button.
Our flow will then go and connect to the Common Data Service.
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.
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.
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 a 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.
Search and click Slack.
Click Post message.
Then, let’s sign in.
After signing in to Slack, let’s set the Channel Name to general because we want to post the message on the general channel.
For the Message Text, let’s use a concat Expression.
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.
Then, let’s add a Dynamic content for the FirstName and LastName. Make sure to add a comma (,) and space after each of them.
The last thing that we should write is ‘. They will be reporting to ‘, then add the ReportingManager variable.
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.
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,
***** Related Forum Post Links *****
Dataset Refresh Notification Using Flows
Mailchimp Integration And Automation
QuickBooks Desktop Connectors
For more automated flow support queries to review see here….