Introduction: In this blog, we will understand how we can add MS Flow in a Business Process flow.
We will understand “When a flow step is executed” trigger of CDS(Current Environment)
Use Case: In my example, I am adding MS Flow in the Propose stage of “Lead to Opportunity Sales Process” Business Process Flow.
I am taking the file as an input parameter and sending an email to the customer with that file as an attachment.
Steps to be followed:
- Create Flow inside a Solution in Power Automate. (this is very important)
- Select Common Data Service(Current Environment) as a connector
- Select “When a flow step is executed” as a trigger
- You can “+Add an input” based on your requirement. I am taking file as an input parameter. (It is not mandatory to have an input parameter)
- This triggers gives many Output parameters by which you can identify the active stage of BPF, entity name , guid of the record and many more details.
- Add further actions based on your requirements.
Adding MS Flow in Business Process Flow:
- Select and edit the BPF in which you want to add the MS Flow
- Drag and drop the Flow Step(preview) component in the BPF stage
- Select the Flow which you want to add and click on Apply
- Update the Business Process Flow
Running the Flow
- Click on Run Flow button
- Click on Import to Add the file and Click on Run Flow
- Click on Done
Your flow will run and you can see the result.