Conditionally Update SharePoint list items using Power Automate

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.

Conditionally Update SharePoint list item using Power Automate
Conditionally Update SharePoint list items using Power Automate

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“.

Sign in to Power Automate
Sign in to Power Automate

Go to My Flows (from the left navigation) -> Expand + New flow -> Select Automated Cloud flow as displayed below:

Power Automated cloud flow
Power Automated cloud flow
  • 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.
Conditionally Update SharePoint list item using Power Automate example
Conditionally Update SharePoint list item using Power Automate example

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.

Example of Conditionally Update SharePoint list item using Power Automate
Example of Conditionally Update SharePoint list item using Power Automate
  • 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:
Conditionally Update SharePoint list item using the Power Automate
Conditionally Update SharePoint list items using the Power Automate
  • 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:
Power Automate Conditionally Update SharePoint list item
Power Automate Conditionally Update SharePoint list item

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:

Power Automate Conditionally Update SharePoint list item example
Power Automate Conditionally Update SharePoint list item example

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.
Example of Power Automate Conditionally Update SharePoint list item
Example of Power Automate Conditionally Update SharePoint list item
  • 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:
Update SharePoint list item Conditionally using Power Automate
Update SharePoint list items Conditionally using Power Automate
  • 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.
Test Power Automate
Test Power Automate
  • Create a new item in the SharePoint list with Status Priority High. And Save the SharePoint list item.
Update SharePoint list item Conditionally using Power Automate example
Update SharePoint list items Conditionally using Power Automate example
  • 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.
Example of Update SharePoint list item Conditionally using Power Automate
Example of Update SharePoint list item Conditionally using Power Automate

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.

to update sharepoint list based on a condition using power automate
to update the SharePoint list based on a condition using power automate

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:

>