Power Automate Find Item in SharePoint List

In this Power Automate tutorial, we will see how to search the SharePoint list and retrieve items using Power Automate.

Scenario:

Let’s say in an organization, a task is assigned to the team, and the due date of that task has passed, while the task is still in progress. So, in this case, it is important to send an email notification to the team, informing them about the delay in completing the task.

Implement:

We will create a SharePoint Task list, with information about the Task. So we will create a Scheduled cloud flow that will run every day, search the overdue task that is still in Progress, and notify to whom a task is assigned automatically.

Now, let’s see how we can create a flow that will search the list and retrieve the task, the due date has passed and is still in progress.

Power Automate find item in SharePoint list

Here, we will see how we can search the Sharepoint list using Microsoft Flow with the above scenario.

Before we start creating our flow, we need to create the SharePoint list, i.e., Project task list. I have already created the SharePoint list. This list contains the following columns:

Column nameData type
TitleSingle line of text
DescriptionMultiple line of text
Due DateDate and time
Assigned toPerson
Start dateDate and Time
Completion dateDate and Time
StatusChoice
Project task list in SharePoint
power automate find item in sharepoint list

Let’s create the Scheduled flow that will search the SharePoint list using Power Automate.

See also  Power Automate Parse Email Body [Excel & SharePoint List]

Step 1: Log in to Power Automate, and then click on the +Create icon on the Left Navigation. Select Schedule cloud flow.

power automate search sharepoint list

Then, provide the Flow name, select Starting date and time, and select Repeat 1 Day. Then click on Create.

power automate search

Now you can see the Scheduled cloud flow trigger action is added to the flow.

How to search SharePoint list using MS Power automate

Step 2: To search and get the items(task), whose due date is passed and still in progress. For this, click on +New step-> select Get items action. Then provide the below information:

  • Site address: Select or Provide the Site address.
  • List name: Select the List from the dropdown
  • Filter query: Provide the below query
(Duedate le '@{utcNow()}') and (Status eq 'In progress')
How to search SharePoint list using Power Automate

Step 3: Now, click on +New step, and select compose action. Then provide the below information:

  • Input: Select the Due date from the dynamic content. This will automatically add Apply to each action.
search SharePoint list using Power Automate

Step 4: Next, click on the Add an action -> select compose action, to get how many days delayed. Then provide the below information:

  • Input: Provide the below expression:
div(sub(ticks(formatDateTime(utcNow(),'yyyy-MM-dd')),ticks(formatDateTime(outputs('Compose_-Due_date'),'yyyy-MM-dd'))),864000000000)
 search SharePoint list using Ms flow

Step 5: Next, we will check whether the due date is over today, or it is overdue, based on that we will send an email

So, click on Add an action -> select Condition action. Provide the below information:

  • Choose a value: Select the Outputs (how many days delayed), from the dynamic content
  • Operator: Select ‘is equal to’ operator from the dropdown.
  • Choose a value: Provide a 0 value

If the condition is true, in the If yes part, click on Add an action and select Send an email (V2) action, to notify the due date of the task is over today. Then provide the below information:

  • To: Provide the email to whom the task is assigned
  • Subject: Provide the subject of an email. Or you can refer to the screenshot below.
  • Body: Provide the body of an email.
See also  Stacked Column Chart in Power BI

If the condition is true, in the If No part, click on Add an action and select Send an email (V2) action, to notify the due date of the task is overdue. Then provide the below information:

  • To: Provide the email to whom the task is assigned
  • Subject: Provide the subject of an email. Or you can refer to the screenshot below.
  • Body: Provide the body of an email.
search SharePoint list using Ms Power Automate

Now our flow is ready to run, so save the flow and test it manually

Step 6: To run the flow, click on the Test icon-> select Manually -> click on Test -> configure the action with connectors, then click on Run flow -> Then click on Done.

You can see your flow ran successfully

 search SharePoint list using Power automate

You can see the task assigned to whom will get an email, based on the delay date. If the due date is over today or overdue, they get notified accordingly.

search SharePoint list using Microsoft Power automate

This is how to search the SharePoint list in Power Automate.

Conclusion

In this Power Automate tutorial, we saw how to search the SharePoint list using Power Automate.

You may also like:

>