How to Update SharePoint List Items Based On Condition Using Power Automate?

While working on the Expense Claim Application, I encountered a scenario where I needed to update SharePoint list items based on specific conditions. This is a common requirement when dealing with flows, especially when we want to automate specific actions, like updating the status of a claim or modifying other fields based on particular criteria.

In this Power Automate article, I will explain how to update SharePoint list items based on their conditions using Power Automate.

Update SharePoint List Items Based On Condition Using Power Automate

Let’s see how to update SharePoint list items based on various conditions in Power Automate. Such as:

Example – 1: [Update SharePoint Status Field Based On Approval Response]

I have a SharePoint list called Expense Claims, where employees submit their expense claims. Based on the approver’s response, I will update the Status field to Approved.

power automate update sharepoint list item based on condition

Now follow the below steps:

1. Create an automated cloud flow. Give the flow name and select the trigger When an item is created. Also, provide the Site Address and List Name.

update list item power automate based on condition

2. Add the “Start and wait for an approval” action and provide the below parameters:

  • Approval type: Select an approval type as “Approve/Reject – First to respond” from the drop-down.
  • Title: Enter the title field value from the Dynamic content.
  • Assigned to: Assign the email of the person who will approve/reject the request.
  • Details: Enter the details about the requested from the Dynamic content.
power automate to update sharepoint list based on Condition

3. Now, add the Condition action to check whether the Expense Claims request is approved or rejected. In the Condition action, set the condition to check if the Outcome (from the Start and wait for an approval action) is equal to Approve.

Update SharePoint List Items Based on Condition using Power Automate

4. Next, add the update item action under the True condition and provide the below parameters:

  • Site Address: Select a specific SharePoint site from drop-down.
  • List Name: Choose a particular list.
  • Id: Select Id from dynamic content under When an item is created.

Then, click Show all to display the advanced parameters.

  • Approval Status Value: Select an Approved from the drop-down.
  • Approval Comments: Select Responses comments from dynamic content under Start and wait for approval.

It will automatically add a for each loop.

Update SharePoint List Items Based on Condition in Power Automate

5. Then add the update item action under the false condition and provide the below parameters:

  • Site Address: Select a specific SharePoint site from drop-down.
  • List Name: Choose a particular list.
  • Id: Select Id from dynamic content under When an item is created.

Then, click Show all to display the advanced parameters.

  • Approval Status Value: Select an Approved from the drop-down.
  • Approval Comments: Select Responses comments from dynamic content under Start and wait for an approval.

It will automatically add a for each loop.

How to Update SharePoint List Items based on Condition using Power Automate

Now, it’s time to save the flow. Click on Test -> Select Manually. Add an item to the SharePoint list, but do not add approval status and comment.

update sharepoint list item based on Condition power automate

Then, the approver needs to approve the request with comments.

Update SharePoint list items Conditionally using Power Automate

After the approver approves the request, go to the SharePoint list, and you’ll see the SharePoint item update based on condition.

In this case, the condition is approved.

How to Update SharePoint List Items based on Condition in Power Automate

Example – 2: [Update Status Field Based On Date and Yes/no Columns]

I have a SharePoint list called Task Tracker, which helps your team manage their daily tasks. I want to update the Status field based on my due date. It will also check whether the task is completed. If yes, then the Task Status field will update to Completed.

Power Automate Conditionally Update SharePoint list item

Now follow the below steps:

1. Navigate to the Power Automate Home page, click + Create, and select the Scheduled Cloud Flow. Then provide the following information:

  • Starting: Provide on which date you want to run your flow.
  • at: Provide the time you want to run the flow, in my case, at 9:00 AM.
  • Repeat every: We want to run the flow daily.
Power Automate Conditionally Update SharePoint list items

2. Then add the Get items action to retrieve the item in the SharePoint list and provide the below parameters:

  • Site address: Select a specific site address from the drop-down.
  • List Name: Select a specific list from the drop-down.
Update SharePoint List Items based on Condition

3. Now, add the Condition action to check whether the task’s Due Date is today and whether the employee has marked it as done.

In the Condition action, set the condition to:

  • Check if the Completed? field is equal to true, and
  • Check if formatDateTime(item()?[‘DueDate’],’dd/MM/yyyy’) is equal to formatDateTime(utcNow(),’dd/MM/yyyy’).
update sharepoint list item using power automate

4. Add the update item action under the True condition and provide the below parameters:

  • Site Address: Select a specific SharePoint site from drop-down.
  • List Name: Choose a particular list.
  • Id: Select Id from dynamic content under When an item is created.

Then, click Show all to display the advanced parameters.

  • Task Status Value: Select a Completed from the drop-down.
How to Update SharePoint List Items based on Condition Power Automate

Now, save the flow and run it manually. After the flow runs successfully, you will see the Task Status update to Completed in your SharePoint list or wherever the task status is tracked.

How to Update SharePoint List Item based on Condition using Power Automate

Conclusion

In this tutorial, I’ve covered how to update SharePoint list items based on specific conditions using Power Automate. I explained two scenarios: the first, automating the approval process in an Expense Claims list by updating the Status field to “Approved” or “Rejected” based on the approver’s response, and the second, automating the task status update in a Task Tracker list to “Completed” when the task is marked as done, and its due date is today.

You may also like:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…