An Azure service that automates the access and use of data across clouds without writing code.
Use a scheduled Logic App with SharePoint Get files (properties only), enable nested items, filter by the file’s Modified timestamp, and write each matching file to Azure Blob Storage; a true “last accessed” filter is not exposed as standard SharePoint file metadata.
Logic App workflow
- Create the trigger
- Azure portal → Logic App → Designer.
- Add Recurrence.
- Choose the required interval, such as once daily.
- Enumerate the SharePoint folder recursively
- Add SharePoint → Get files (properties only).
- Set:
- Site Address: SharePoint site.
- Library Name: document library.
- Limit Entries to Folder: source folder.
- Include Nested Items: Yes.
Get files (properties only)returns library metadata and can filter results. By default it searches folders recursively; Limit Entries to Folder and Include Nested Items constrain the operation to the selected folder and its subfolders.^1^ - Apply the date filter SharePoint and Microsoft Graph expose
lastModifiedDateTime, but the documenteddriveItemproperties do not include a general-purpose last-accessed timestamp.^2^ Therefore, use one of these supported interpretations:- Files modified since the last run: filter on SharePoint’s
Modifiedcolumn. - Files modified before an archive cutoff: use
Modified lt .... - Files viewed/accessed: this cannot be implemented from the normal file metadata returned by the SharePoint connector. It would require a separate activity/analytics design, and the available documentation does not establish a Logic Apps connector filter for that value.
For a rolling cutoff, calculate the timestamp with a Compose action and use the resulting UTC value in the filter. SharePoint supports server-side OData comparisons such asModified ge datetime'2026-10-01T00:00:00Z'gt,ge,lt, andle.^1^ - Files modified since the last run: filter on SharePoint’s
- Copy every matching file
- Add Apply to each using the
valueoutput from Get files (properties only). - Inside the loop:
- Add SharePoint → Get file content.
- Set File Identifier to the current item’s identifier.
- Add Azure Blob Storage → Create blob or Create blob (V2).
- Set:
- Folder path: destination container/folder.
- Blob name: use the SharePoint file’s relative path, not only its filename, if the subfolder hierarchy must be retained.
- Blob content: output from Get file content.
- Add Apply to each using the
Prevent duplicate full copies
Store a watermark—the previous successful run time—in a blob, table, or other durable location:
- Read the previous watermark at the beginning.
- Filter for files where
Modifiedis at least that timestamp. - Copy the files.
- Only after the entire run succeeds, update the watermark to the current run’s start time.
Using the run’s start time, rather than its completion time, avoids missing files modified while the workflow is executing. Decide whether an existing destination blob should be overwritten, versioned, or written under a date-based prefix.
Scale and security considerations
- Get files returns 100 items with default settings. Its documented configurable limit is up to the SharePoint list-view threshold of 5,000; enable pagination where applicable and test large libraries carefully.^1^
- For substantially larger libraries, consider partitioning runs by folder/date. Microsoft Fabric Data Factory also has a SharePoint Online File connector with a UTC last-modified range filter, but that connector is currently documented as Preview.^4^
- For Blob authentication, prefer a Logic App managed identity where supported. Enable the identity, grant it access to the storage destination, and create the Blob connection with Logic Apps Managed Identity.^5^
- Blob connector behavior and file-size limits vary between managed and built-in connectors. The managed connector documents 50-MB actions, with chunking support for applicable operations up to 1,024 MB.^6^
- This workflow copies current file content; it is not a complete SharePoint backup unless versions, permissions, retention information, deletions, and restore behavior are handled separately.
References
- In-depth analysis into Get items and Get files SharePoint actions for flows in Power Automate
- driveItem resource type
- Microsoft SharePoint Connector in Power Automate
- Configure SharePoint Online File in a copy activity (Preview)
- Authenticate workflow connections to protected Azure resources by using managed identities in Azure Logic Apps
- Connect to Azure Blob Storage from workflows in Azure Logic Apps