Showing results for 
Search instead for 
Did you mean: 

Update Business Process Flow stages using Power Automate

Recently, I have come across a requirement to update business process stage automatically on update of status field.

The status field is updated by external users via PowerApps Portal.

We can achieve this many ways . Writing custom code can be an option . But I thought of using Power Automate. ( Microsoft Flow is renamed to Power Automate ).

Quick note on Business Process Flow:

The method of retrieving and updating BPF fields within the record is deprecated. Read more on









The supported way is is to reference fields in the BPF entity that would have been created when your BPF was created. 


Alright, lets understand the logic before configuring flow.

Here is my logic . Status value and their corresponding stage.













Trigger :

The trigger is when the status is updated.














Initialize variable to store Stage Ids and Status values:



Retrieve Business Process Flow instance record :

List Record action is used to retrieve BPF instance record associated with work order record.

Filter query is for the purpose of returning BPF instance record associated to work order.
















Compose actions to retrieve BPF instance Id and Process Id:







Here are the expressions to retrieve BPF instance id and Process Id from the above List Record action.

BPF instance record id : first(body(‘Get_Work_Order_BPF_record’)?[‘value’]).businessprocessflowinstanceid

Process Id : first(body(‘Get_Work_Order_BPF_record’)?[‘value’])._processid_value


Get BPF Stages Ids dynamically :
















We need to pass BPF instance record in the filter query.


Store BPF Stage Ids in Variables :

Apply for Each action is used to loop through the result got from above list record action and Switch Control is used to store stage ids in variables based on stage name.

















Update BPF Stage based on Status value :

Here again, Switch Control is used to update stage according to status value.

And Update record action is used to update BPF instance record with stage id.




















Traversed path :

The Traversed Path is a field as mentioned earlier that represents the life cycle of the business process flow as it contains the stage IDs the Business Process Flow as gone through. The Traversed Path field value needs to be updated to include the stage ID of the current active stage it will be moved to. This is the Review stage.To include the stage ID in the Traversed Path field the concat function is used in an expression.

For example, if BPF is moving from first stage to second stage , the expression should like below

concat(firststageid, ‘,’ ,secondstageid)


Conclusion :

If we follow the above steps , the total flow should like this.


Thank you for reading . Hope it helps.

Blog link :

About the Author
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • Blog site: MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, Techcommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Founder of SKILLFUL SARDINE, a company focused on productivity and the Power Platform. You can find me on LinkedIn: and twitter I also write at, so if you want some Power Automate, SharePoint or Power Apps content I'm your guy 🙂
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 15 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #M365 #Power Platform| Microsoft MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – Youtube channel -