Issue
By default, SharePoint Online document libraries don’t float up the ‘Last Modified’ time when you make changes within a folder hierarchy. This will bring hate mail from your users, especially if they’ve moved from Box.com, where it works this way for helping to identify and sort by recent changes deep in the structure. Many old online articles try to cover this, but the solution has been evasive until I spent the better half of a day trying to figure it out in PowerApp. *flips Cray hat backward*
Solution
Screenshots of the PowerApp are below. The one major limitation of this solution is that if you put an empty folder within a folder structure, it doesn’t trigger the update but instead shows a failed run, which isn’t actually a problem. Only files within folders will successfully start and run the job. That applies to folder -> folder -> folder -> folder -> folder -> file or as deep as you need to go, and it works very quickly, usually within a minute.
1. Create a new automated app named ‘FolderModified.‘
{ "inputs": "@{triggerOutputs()?['body/{FilenameWithExtension}']}-@{equals(triggerOutputs()?['body/IsFolder'],false)}", "metadata": { "operationMetadataId": "c697bc2a-8bcd-44ad-80bf-87f29e9b4455" }
{ "inputs": "@triggerOutputs()?['body/{Path}']", "metadata": { "operationMetadataId": "ebace1b1-1fa1-4f76-8e97-4344ffe8c11b" }}{ "inputs": { "variables": [ { "name": "VArrFolderPath", "type": "array", "value": "@split(outputs('CFolderPath'),'/')" } ] }, "metadata": { "operationMetadataId": "c4aa6183-5a4c-4451-b045-97a8c020a83f" }}{ "inputs": { "variables": [ { "name": "VPath", "type": "string" } ] }, "metadata": { "operationMetadataId": "9f50d26d-5624-4ef0-b02a-b98a41957d54" }}{ "inputs": [ { "Key": "@{triggerOutputs()?['body/Editor/Claims']}" } ], "metadata": { "operationMetadataId": "e80df3fb-feec-4ea5-a683-ad7a5d9b5c65" }}{ "inputs": "@formatDateTime(triggerOutputs()?['body/Modified'],'g')", "metadata": { "operationMetadataId": "beb03772-baf0-4615-bc04-7fd5650f46f9" }}{ "inputs": [ { "FieldName": "Editor", "FieldValue": "@{string(outputs('CUser'))}" } ], "metadata": { "operationMetadataId": "178a3d12-1338-456d-ab40-c9d1f4214bea" }}'
{ "inputs": { "from": "@variables('VArrFolderPath')", "where": "@equals(empty(item()), false)" }, "metadata": { "operationMetadataId": "4a001a83-8073-4ff1-9e81-5e3a7073b027" }}{ "inputs": { "host": { "connectionName": "shared_sharepointonline_1", "operationId": "HttpRequest", "apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline" }, "parameters": { "dataset": "https://yoursite.sharepoint.com/sites/SITE", "parameters/method": "POST", "parameters/uri": "_api/web/lists/getbytitle('Documents')/items(@{outputs('IGFPath')?['body/ItemId']})/validateUpdateListItem", "parameters/body": "{\n\"formValues\": @{outputs('CProperties')},\n\"bNewDocumentUpdate\": false\n}" }, "authentication": "@parameters('$authentication')" }, "metadata": { "operationMetadataId": "5c59f1f4-cd00-4bd9-aa59-bde4deaa317d" }}getbytitle('Documents') refers to the name of the Document Library. '/Shared Documents/ (Default) = Documents', or your 'Custom Name' for it.***- Top-level Folder will show activity within, not just when it was created:
- Objects within or within the sub-folders shown in the Last Modified above:
- Short runtimes:

















