How to Retrieve SharePoint List Items Using Power Automate?

Recently, I have been assigned a task to retrieve the SharePoint list items and update the list column values.

In this blog post, I will explain the following examples:

  • Power Automate Finding and Updating a Single Item in a Sharepoint List
  • Retrieve a Specific Item from a SharePoint List based on a value in another SharePoint list using Power Automate
  • Using Power Automate to Search for Multiple items in a SharePoint list

Power Automate Search and Update SharePoint List Item

To describe this example, I have taken two SharePoint lists, ‘Leave Requests‘ and ‘Leave Balance,’ which contain various columns.

Leave Requests List

Leave Balance List

Column NameType
Requestors NameTitle
From DateDate and time
To DateDate and time
Sick LeavesNumber
Annual LeavesNumber
Column NameType
Employee NamePerson or Group
Sick LeavesNumber
Annual LeavesNumber

Scenario: Whenever a user requests a leave in the Leave Requests list, it will search for the employee defaults leaves in a Leave Balance list and update the remaining leaves.

Power Automate find item in SharePoint list
Power Automate Search SharePoint list items

Now, go through the below steps:

1. Log in to Power Automate, select Automated Cloud flow, choose the When an item is created trigger, and click Create.

Power Automate Finding and updating a single item in a SharePoint List

2. Add a Get items action to retrieve all the SharePoint list items. Provide the parameters like Site Address and List Name.

Using Power Automate to Search for a single item in a list

3. Then, add a ‘Condition control‘ action to get a specific list item from a SharePoint list [Leave Balance] that matches based on a value in another list [Leave Requests].

Condition: Requestor Name = Employee Name

Title is equal to @items(‘For_each’)?[‘EmployeeName/DisplayName’]

For each loop will be added automatically.

Power Automate get single item from SharePoint list

4. After that, under the True condition branch, add an Update item action to update the SharePoint list item values.

Configure the parameters below:

  • Site Address: Your SharePoint site
  • List Name: Leave Balance
  • ID: Select dynamic content ID
  • Sick Leaves: Provide the below expression
  • Annual Leaves: Use the expression provided below.
Sick Leaves: sub(int(item()?['SickLeaves']),int(triggerBody()?['SickLeaves']))
Annual Leaves: sub(int(item()?['AnnualLeaves']),int(triggerBody()?['AnnualLeaves']))
SharePoint list item search using Power Automate

5. Now, Save and Run the flow. Then, go to the SharePoint list [Leave Requests] and raise the leave request.

Power Automate Select single SharePoint list item from Get Items

6. After the flow runs successfully, you can see that the remaining leaves will be updated in the Sick Leaves and Annual Leaves columns.

Find SharePoint list item using Power Automate Get items

This is how to retrieve the single SharePoint list item and update that value using Power Automate.

Retrieve a Specific Item from a SharePoint List based on a Value in Another List

For this example, I have created two SharePoint lists(Project List, Task List) with the data types:

Project List

Task List

Column NameType
Project TitleTitle
Project IDSingle line of text
Start DateDate and time
Due DateDate and Time
Project TasksSingle line of text
Column NameType
Project IDLook Up
Project TitleLook Up
Task TitleTitle
Start DateDate and Time
Due DateDate and Time
Power Automate search SharePoint list items based on another SharePoint list item values
How to Retrieve Items from SharePoint List in Power Automate

Scenario: Whenever a user updates the Project details in the Project List, then the Project Tasks, Start Date, and End Date present in the Project List should be updated to Task Title, Start Date, and End Date in the Task List.

Follow the steps:

1. Create an ‘Automated cloud flow with a trigger ‘When an item is created or modified‘. Provide Site Address and List Name.

Power Automate Retrieve Items from SharePoint List

2. Next, add the Get items action and provide the parameters below to fetch items from the SharePoint list.

  • Site Address: Select your SharePoint site.
  • List Name: Choose Project List.
Find SharePoint list items using Power Automate Get items

Add another Get items action to fetch the list items from the Task List.

Power Automate get items from SharePoint list items based on value in another list

3. Here, add the Condition action to check the Project Title value from a Project List matches the Project Title value in the Task List.

This condition will retrieve the specific item from a SharePoint list [Task List] based on a value in another list [Project List].

Project Title is equal to @items('For_each_1')?['ProjectID_x003a__x0020_Title/Value']
How to find a SharePoint list items in Power Automate

4. Add the Update Item action under the True branch and provide the parameters below:

  • Site Address: Select a specific SharePoint site from the drop-down.
  • List Name: Choose Task List.
  • Id: Select Id from dynamic content under the Get items Task List.

Then, click Show all to display the advanced parameters.

  • Title (Task Title): Provide Project Tasks from dynamic content.
  • Start Date: Choose Start Date under the Project list.
  • Due Date: Select Due Date under the Project list.
Power Automate find SharePoint list items and update

It will take For each loops automatically.

5. Now, it’s time to save the flow. Click on Run flow-> modify the existing SharePoint list item values.

Finding an item exists in a SharePoint list using Power Automate

Then, it will update the Task details in the Task List, as you can see from the screenshot below:

Find items from SharePoint list Power Automate

Power Automate Finding and Updating Multiple Items in a Sharepoint List

This example will show you how to find and update multiple items in a SharePoint list using Power Automate.

Scenario: I have taken one of my SharePoint lists [Task List] with a few columns like Task Title, Due Date, and Assigned To. I wanted to find out the overdue SharePoint list items and display them.

Column NameType
Task TitleTitle
Due DateDate and Time
Assigned To
Person or Group
Retrieving all items in a SharePoint list using Power Automate

Check out the steps below:

1. Open the Power Automate Home page and click + Create. Select Instant Cloud flow. Give the flow a name and select trigger Manually trigger a flow. Tap Create.

2. After that, add the Get items action to fetch the SharePoint list items that passed their due dates by adding Filter Query condition.

Configure the parameters:

  • Site Address: Choose the SharePoint site.
  • List Name: Select Task List.

Click on Show all to display all the advanced parameters.

Filter Query: DueDate le '@{utcNow()}'

Where DueDate is the internal name of a list column.

Power Automate Retrieving all items in a SharePoint list

3. Then, add the Create HTML table action to display the overdue SharePoint list items.

  • From: Select the value of the Get items’ output from dynamic content.

Click Show all to display all the advanced parameters.

  • Columns: Select Custom column from the drop-down options.
HeaderValue
Task Title
Due Date
Select value from the dynamic content under Get items and expression
Find multiple SharePoint list item in Power Automate

4. To send an email to task-assigned users, add Send an email(V2) action. Set the parameters:

  • To: Select Assigned To Email from dynamic content.
  • Subject: Provide a subject line.
  • Body: Specify the details about the Task.
How to Retrieve multiple Items from SharePoint List in Power Automate

For each loop will be taken automatically.

5. Now, the flow is ready. Click on Save and Test. Select Manually. Click on the Run flow button.

6. When the flow runs successfully, the assigned users will get notified about their task due date.

Refer to the image below:

Power Automate get multiple items from Get Items

This way, a user can find multiple items from the SharePoint list using Power Automate.

Conclusion

In this Power Automate tutorial, I showed you how to retrieve and update SharePoint list items using Power Automate with different examples. This helps find specific and multiple SharePoint list items based on one particular condition.

You may also check out:

>

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…