Are you trying to conditionally update SharePoint list items using Power Automate flow? Then check out this Power Automate article, here I will help you to learn how to conditionally update SharePoint list items using Power Automate with an Example.
Recently I got a requirement where I need to Conditionally Update SharePoint list items using Power Automate.
Like, If the Task Priority is high then the status will be updated as completed else the status column will be updated as In progress. Let’s see how we can achieve this.
Conditionally Update SharePoint list items using Power Automate
Here we will see how to conditionally update SharePoint list items using Power Automate flow.
Here I have created a SharePoint list called TaskList shown below consisting of four different columns called TaskName(text data type), Assigned To(Person data type), and TaskPriority and Status columns are off (choice data type).
Then we will create a flow to add the condition based on the requirement. If the Task Priority is high then the status will be updated as completed else the status column will be updated as In progress.
To achieve this follow the below steps:
To create a Power Automate Flow, Initially, Sign in to your Microsoft Office 365 account. After signing in to the Microsoft Office 365 account, go to “App Launcher” and then click on “Power Automate“.
Go to My Flows (from the left navigation) -> Expand + New flow -> Select Automated Cloud flow as displayed below:
- In the Build an automated cloud flow popup window, enter the Flow Name and search and select the template name as “When an item is created“ as highlighted below:
- Once the trigger template has been selected click on the Create button.
To configure the trigger, we have to enter two required fields called Site Address and List Name here I have entered my SharePoint site address and the SharePoint list Name.
- Now, Once the Trigger is ready we will implement the action flow logic by selecting plus sign (+New Step).
- From the list of actions, search and select the Condition as shown below:
- Now we will add the condition, If the Task Priority is High then the status will be updated as completed else the status column will be updated as In progress.
- Add dynamic content and select TaskPriority Value is equal to High as shown below:
Once the condition is added we will implement the if-else logic, If Yes then select add an action -> Search Update and choose the Update item option under Actions as highlighted below:
Here the Update item section consists of different fields mentioned below:
- SiteAddress: Choose the SharePoint Site
- List Name: Select the specific list (TaskList)
- ID, Title: Add ID and Title to the field by choosing a dynamic content value.
- Status Value: Enter the status value as Completed.
- In the same way, select the Else condition select Add an action -> Search Update, and choose the Update item option under Actions.
- And update only the Status Value field as In Progress. Once the trigger and action have been added flow looks like the below:
- Finally, Save the flow. Click the flow checker as well to see if there are any problems.
- If so, fix it. If not, move on to testing the flow. Select Test-> Manually-> Save & Test.
- Create a new item in the SharePoint list with Status Priority High. And Save the SharePoint list item.
- Once the item has been saved the flow will run automatically, When the flow is successfully completed, we can see a message such as “Your flow ran successfully” at the top of the flow as highlighted below:
- if we will expand the Condition action, then in the Yes Condition we can see the extracted Updated value.
Now Refresh the SharePoint list to see the Updated Status column value for the newly added list item as highlighted below it displays the expected result value.
This is how to conditionally update SharePoint list items using Power Automate.
In this Power Automate article, We have discussed how to conditionally update SharePoint list items using Power Automate with an Example.
You may also like the following Power Automate tutorials:
- Create PDF from Microsoft Forms via Power Automate
- Power Automate IF with Examples
- Power Automate Add Days to Date
- Power Automate Create SharePoint List
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.