Retrieve SharePoint List Items by Created Date Range Using REST API in Power Automate

While working on an IT Help Desk product, we needed to get all items from a SharePoint list using Power Automate. The list has more than 10,000 items, and retrieving all of them takes around 38 seconds. To improve the speed, we decided to get only the items created between specific dates.

In this tutorial, I will show how to retrieve SharePoint list items by created date range using the REST API in Power Automate.

Retrieve SharePoint List Items by Created Date Range

For this example, I have a SharePoint list called Tickets where more than 10,000 items are present.

Power Automate flow retrieving SharePoint list items by created date range using REST API

Now follow the steps below to get items by created date range using the REST API in Power Automate:

  1. Go to Power Automate and click Create -> Instant Cloud Flow. Select Manually trigger a flow as the trigger. Click + Add an input and add the following inputs:
    • StartDate (Type: Date)
    • EndDate (Type: Date)
Power Automate HTTP action for SharePoint REST API date filter query
  1. Then add a Send an HTTP request to SharePoint action from sharePoint Connector with the below parameter:
_api/web/lists/GetByTitle('List Display Name')/items?&$filter=Created ge datetime'@{formatDateTime(triggerBody()?['date'], 'yyyy-MM-ddT00:00:00Z')}' and Created lt datetime'@{formatDateTime(triggerBody()?['date_1'], 'yyyy-MM-ddT00:00:00Z')}'

Note: Replace ‘List Display Name’ with your SharePoint list name (for example, ‘Tickets’).

  1. Headers:
    • Accept: application/json;odata=verbose
SharePoint list with items filtered by created date range via Power Automate

This action will retrieve only the list items created between the specified Start Date and End Date.

Run the Flow and Check the Output

  1. Click “Save” in the top-right corner of the Flow Designer. Click Test -> Manually -> Run flow.
  2. Enter a StartDate and EndDate when prompted, then click Run flow again.
SharePoint REST API GET request filtering list items by created date
  1. Click the Send an HTTP request to SharePoint action. Under Outputs, expand Body to see the JSON data with all list items created within our selected date range.
Retrieve SharePoint List Items by Created Date Range Using REST API in Power Automate

This way, you can quickly retrieve only the data you need, even when the list contains thousands of records.

You may also like the following tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

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