Make SharePoint Folders Show Their Real Last Modified Date (Power Automate Walkthrough)

Infostruction banner: a person holding a mug stands in a dim home office lit by server racks and monitors, with the Infostruction logo and wordmark across the centre.

Updated November 2026: Added trigger concurrency, a trigger condition and a corrected Step 2 expression after investigating HTTP 409 conflicts between overlapping runs and follow-on runs caused by folder updates. These settings were saved on November 17; the next upload batches still need to establish how well they behave. See the 409 troubleshooting notes and the limitations below.

The problem

SharePoint Online folders don’t update their Modified date when something changes deeper inside them. A folder created two years ago still says "two years ago" even if someone edited a file three levels down this morning. Users coming from Box.com, where changes roll up, notice right away.

This walkthrough builds a Power Automate flow that fixes that. Whenever a file is added or changed, the flow walks up its folder path and touches every parent folder, so each one shows when the folder update was processed and the editor from the triggering event. How quickly the dates catch up depends on the queue; batches can take several minutes.

What you’ll build, top to bottom:

  1. A SharePoint trigger that fires when a file changes in one library
  2. Four Compose steps and two variables that capture the file’s folder path and editor
  3. A Filter array that turns the path into a clean list of folder names
  4. A loop that rebuilds the path one folder at a time, looks up each folder’s ID, and stamps it with a SharePoint REST call
The finished FolderModified flow in the new Power Automate designer, from the SharePoint trigger down through the IFolders loop and the CValid condition

Before you start

You need:

  • A Power Automate license that includes the standard SharePoint connector (most Microsoft 365 plans do)
  • Edit rights on the target site and document library
  • A service or automation account to own the flow, ideally one that won’t have its sign-in changed often (see Cautions at the end)

Write down three values for your library before you begin. You’ll type them into several steps.

WhatExampleWhere it’s used
Site addresshttps://contoso.sharepoint.com/sites/ProjectsTrigger, IGFPath, HTTP request
Library display nameDocumentsTrigger (pick from list) and the HTTP request Uri
Library URL folderShared DocumentsNot typed anywhere, but it’s the first folder in every path the flow sees

The default library is shown as Documents but lives at /Shared Documents/. A custom library uses whatever name you gave it.

Naming convention used here: C = Compose, V = Variable or data step, I = loop or lookup. Name each step exactly as shown, because later expressions refer to steps by name. To rename a step in the new designer, click its title at the top of the side panel.

Part 1: Create the flow and set the trigger

  1. Go to make.powerautomate.com and choose Create → Automated cloud flow.
  2. Name it something like FolderModified - Projects Documents. One flow covers one library, so put the site and library in the name.
  3. In the trigger search, type properties only and pick When a file is created or modified (properties only) (SharePoint). Click Create.
    • Don’t pick When an item is created or modified. That one is for lists and returns different fields.
  4. Click the trigger to open its panel and fill in:
    • Site Address: pick your site from the dropdown, or choose Enter custom value and paste the URL.
    • Library Name: pick your library (for example, Documents).
    • Folder: leave blank so the whole library is watched.
Trigger settings for When a file is created or modified (properties only), with Site Address set and Library Name set to Documents

The trigger checks for changes about once a minute. It hands every later step fields like Folder path, File name with extension, Modified and Modified By Claims.

Configure the trigger’s Settings

Open the trigger’s Settings tab and set:

SettingValue
Concurrency controlOn
Degree of parallelism1
Maximum waiting runs100

This makes separate runs of this flow take turns, so they cannot write to the same parent folder simultaneously. A batch will queue, and folder dates can take minutes to catch up. 100 is the waiting-run setting I saved for this flow to give batches of dozens of files more room. See the queue limits and migration cautions before using it for large batches.

Before enabling it: the Settings panel warns that concurrency cannot simply be turned off afterward. Microsoft documents deleting and re-adding the trigger to remove it; the limits remain adjustable while it is enabled. See Microsoft’s concurrency documentation.

Under Trigger conditions, click Add and paste this complete expression, including the leading @:

@or(equals(triggerBody()?['{IsFolder}'], false), less(sub(ticks(triggerBody()?['Modified']), ticks(triggerBody()?['Created'])), 600000000))

The condition admits files and folder events whose Modified timestamp is less than 60 seconds after Created. That allows a new folder and a prompt rename while filtering out later folder changes, including this flow’s later updates. Updates within the initial window can still trigger runs. The 60-second window notes explain the tradeoffs.

Power Automate trigger Settings with concurrency enabled, degree of parallelism 1, maximum waiting runs 100, and the folder timestamp condition.
Settings saved on November 17, 2026. These are the trigger settings, separate from the IFolders loop settings.
Compare the saved trigger configuration in Code view
Power Automate trigger Code view showing the trigger condition, concurrency runs set to 1, maximumWaitingRuns set to 100, and Split on.
Code view of the saved trigger configuration. The site and library identifiers have been obscured.

The screenshot shows runs: 1 and maximumWaitingRuns: 100 under runtimeConfiguration, with the condition under conditions. Keep your own site, library and connection values.

This is separate from IFolders loop concurrency in Step 10. Both use 1: the trigger controls separate runs; the loop controls the order in which one run builds VPath.

Part 2: Capture the path and the editor

Add each step below the previous one with the + button → Add an action. To type an expression, click in the field, then the fx icon, paste the expression, and click Add. To insert a trigger field, use the lightning-bolt icon instead.

Step 2: CFileName (Compose)

Search Compose (Data Operation). Rename it CFileName. In Inputs, insert File name with extension, type a hyphen, then add this expression:

equals(triggerOutputs()?['body/{IsFolder}'],false)

This step is only for reading run history (for example, Report.docx-true). Nothing later depends on it, so it’s optional. The earlier expression omitted the braces around {IsFolder} and returned false even for files, producing a misleading label. Correcting it does not change the folder-update logic.

CFileName Compose expression using body/{IsFolder} with braces and comparing the value with false.
The corrected expression includes the braces in {IsFolder}.

Step 3: CFolderPath (Compose)

Add another Compose, rename it CFolderPath, and insert the trigger field Folder path. Its expression is:

triggerOutputs()?['body/{Path}']

For a file in Projects › 2026 › Client A, this returns Shared Documents/Projects/2026/Client A/.

CFolderPath Compose step holding the trigger's Folder path token

Step 4: VArrFolderPath (Initialize variable)

Search Initialize variable (Variables). Rename it VArrFolderPath.

  • Name: VArrFolderPath
  • Type: Array
  • Value (expression): split(outputs('CFolderPath'),'/')

This splits the path into a list: ["Shared Documents","Projects","2026","Client A",""]. Note the empty item at the end from the trailing slash.

VArrFolderPath Initialize variable step: type Array, value a split() expression

Step 5: VPath (Initialize variable)

Add another Initialize variable, rename it VPath.

  • Name: VPath
  • Type: String
  • Value: leave empty

The loop will build the path back up in this variable, one folder at a time. Variables must be initialized at the top level of a flow, never inside a loop or condition.

VPath Initialize variable step: type String, value left empty

Step 6: CUser (Compose)

Add a Compose, rename it CUser. In Inputs, type the brackets and quotes by hand and insert the trigger field Modified By Claims between the quotes:

[
  {
    "Key": "<Modified By Claims>"
  }
]

The claims value looks like i:0#.f|membership|jane@contoso.com. This is the person-field format SharePoint expects in the update call.

CUser Compose step: a JSON array whose Key is the Modified By Claims token

Step 7: CModified (Compose)

Add a Compose, rename it CModified, expression:

formatDateTime(triggerOutputs()?['body/Modified'],'g')

This is also for run history only; SharePoint stamps the folder with the current time on its own. Queueing can widen the gap between the file change and that folder update. See what the folder timestamp means.

CModified Compose step with a formatDateTime() expression

Step 8: CProperties (Compose)

Add a Compose, rename it CProperties. Type this, inserting the expression string(outputs('CUser')) where shown:

[
  {
    "FieldName": "Editor",
    "FieldValue": "<string(outputs('CUser'))>"
  }
]

Editor is the internal name of the Modified By column. This is the list of fields the HTTP request will write to each folder.

CProperties Compose step: FieldName Editor, FieldValue a string() expression

Step 9: VFilterFolderPath (Filter array)

Search Filter array (Data Operation). Rename it VFilterFolderPath.

  • From: insert the variable VArrFolderPath
  • Filter Query: left box = expression empty(item()), operator is equal to, right box = false
    • Or click Edit in advanced mode and paste @equals(empty(item()), false); both give the same result

This drops the empty item, leaving ["Shared Documents","Projects","2026","Client A"].

VFilterFolderPath Filter array step: from VArrFolderPath where empty(item()) is equal to false

Part 3: Walk up the folders and stamp each one

Step 10: IFolders (Apply to each)

Search Apply to each (Control). Rename it IFolders.

  • Select an output from previous steps: insert Body from VFilterFolderPath
  • Open the Settings tab, turn Concurrency control on, and set Degree of parallelism to 1

The loop appends to a variable on every pass; if passes run in parallel, the path is built out of order and the wrong folders get looked up. This setting keeps iterations within one run in order. The separate trigger concurrency setting keeps different runs of this flow from overlapping.

IFolders Apply to each step using Body from VFilterFolderPath
IFolders Settings tab with Concurrency control on and degree of parallelism set to 1

The next three steps go inside the loop: use the + inside the IFolders box.

Step 10.1: Append to VPath (Append to string variable)

Search Append to string variable (Variables).

  • Name: VPath
  • Value: insert Current item from IFolders, then type a forward slash /

The expression behind it is @{items('IFolders')}/. Over the passes, VPath grows like this:

PassVPath
1Shared Documents/
2Shared Documents/Projects/
3Shared Documents/Projects/2026/
4Shared Documents/Projects/2026/Client A/
Append to VPath step: the loop's current item followed by a forward slash

The designer labels the loop’s current item as Body here; that’s expected.

Step 10.2: IGFPath (Get folder metadata using path)

Search Get folder metadata using path (SharePoint). Rename it IGFPath.

  • Site Address: your site
  • Folder Path: insert the variable VPath (don’t use the folder picker)

This returns the folder’s ItemId, its ID in the library, which the update call needs.

IGFPath Get folder metadata using path step with Folder Path set to the VPath variable

Step 10.3: CValid (Condition)

Search Condition (Control). Rename it CValid.

  • Left box: insert ItemId from IGFPath
  • Operator: is greater than
  • Right box: 0

On pass 1, the path is the library itself, which has no item and returns ItemId 0. The condition skips it. Leave the False branch empty.

CValid Condition step: ItemId is greater than 0

Step 10.3.1: Send an HTTP request to SharePoint (inside True)

Inside the True branch, search Send an HTTP request to SharePoint.

  • Site Address: your site
  • Method: POST
  • Uri: type the text below, inserting ItemId from IGFPath between the parentheses
_api/web/lists/getbytitle('Documents')/items(<ItemId>)/validateUpdateListItem

Replace Documents with your library’s display name (the name you picked in the trigger, not the URL folder).

  • Body: type the text below, inserting Outputs from CProperties after "formValues":
{
"formValues": <Outputs of CProperties>,
"bNewDocumentUpdate": false
}

validateUpdateListItem writes the Modified By field. Because it’s a normal update, SharePoint also sets Modified to now, which is the point of the whole flow. bNewDocumentUpdate: false tells it this is an edit, not a new upload.

Send an HTTP request to SharePoint step: POST to validateUpdateListItem with the CProperties output as formValues in the body

Part 4: Save, test and troubleshoot

  1. Click Save. The flow turns on as soon as it saves.
  2. In the library, create a test path such as Test › Level 1 › Level 2 and upload a file into Level 2.
  3. Open My flows → your flow → Run history and allow for polling and any queued work. Check the trigger items and confirm that the file changes were processed. Newly created folders can also produce runs during the condition’s 60-second window.
  4. Once the file’s run completes, check Test, Level 1 and Level 2. Each should show a recent Modified time and the triggering editor under Modified By. Use the batch checks below to assess the November changes.
Run history for the FolderModified flow: seven succeeded runs, each taking two to five seconds
Run history from the original 2022 test: each run finished in two to five seconds.
A top-level Test folder in the library showing a Modified time of About an hour ago, from a change inside it
The top-level Test folder picking up a change made inside it (also from the 2022 test).
What you seeWhyFix
HTTP 409 Conflict: "The file … has been modified by (unknown)"In the three inspected failures, parallel runs were writing the same parent folder; folder-triggered follow-on runs added more workApply the Part 1 trigger settings and read the 409 investigation. Check subsequent batches; the result is not yet established
Run fails right after you create an empty top-level folderThe earlier explanation was not retested on November 17; the inspected library-root iterations skipped cleanlyInspect the failed action and its response. Do not assume the failure is expected. See the unverified empty-folder case
"This operation contains a token that does not exist" in the designerThe trigger’s fields hadn’t loaded when the step was added or pastedOpen the dynamic content picker once on any field, or remove and re-insert the token
"Invalid connection" on a SharePoint stepStep was copied or pasted from another flowOpen the step, click Change connection, and pick your SharePoint connection
HTTP request returns 404 or "List does not exist"Wrong name in getbytitle('...')Use the library’s display name, not Shared Documents
HTTP request returns 429 or runs back upToo many changes, connector throttling or a finite waiting queue; queued runs alone are not failuresAllow ordinary batches time to drain, inspect actual 429s, and turn the flow off during bulk moves or migrations. See queue limits
Folder path built wrong (e.g. 2026/Shared Documents/)Loop running in parallelSet IFolders concurrency to 1

HTTP 409 Conflict: "The file … has been modified by (unknown)"

On November 17, 2026, a document library where a tool writes batches of JSON files produced roughly 50 failed runs in a few minutes, followed by another failure later that morning. I opened three of them. All three failed at Send an HTTP request to SharePoint, where validateUpdateListItem returned 409 Conflict. Each failure was in IFolders iteration 2, the first real folder beneath the library root.

The trigger had no concurrency limit, so file changes started parallel runs that all tried to update shared parent folders. Updating those folders also started more runs. One captured trigger output showed {IsFolder}: true, confirming that a folder change could send the flow through its ancestors again. That combination explains the conflicts in the sampled runs; I did not open every failure in the burst.

Use the trigger settings in Part 1 to serialize this flow’s runs and filter later folder updates. Other flows and users can still write to those folders, and very new folders can still pass the condition. These changes are designed to reduce the competing writes; they do not establish that all 409s are gone.

A 409 is outside the status codes covered by the documented retry behavior, which covers 408, 429 and 5xx responses. In the three inspected runs, the conflict failed the HTTP action, the loop and the run.

SharePoint HTTP action output showing statusCode 409 and a file-modified conflict message.
Before the changes: the HTTP action returned 409 Conflict.
See the failed-run burst, the failed loop and the folder-triggered follow-on run
Power Automate run history showing a burst of failed runs before the November 2026 trigger changes.
Before the changes: part of the burst of failed runs. Three failures were inspected, not every run shown.
A failed IFolders iteration with CValid true and Conflict on the Send an HTTP request to SharePoint action.
Before the changes: the SharePoint HTTP action failed with Conflict while updating a parent folder.
Power Automate trigger output from a follow-on run showing the {IsFolder} property set to true.
Before the changes: a folder update started another run. A successful status on this run does not show that the new settings passed a batch test.

Status of this update: the settings were saved on November 17, 2026. I am watching the next batches before calling the change proven. The screenshots above show the earlier failure pattern and the saved configuration; none shows a clean batch after these changes.

Reusing it on other libraries, and cautions

Each library needs its own copy of the flow. The quickest way is My flows → … → Save As, then change these four places:

  1. Trigger: Site Address and Library Name
  2. IGFPath: Site Address
  3. HTTP request: Site Address
  4. HTTP request: the library name inside getbytitle('...')

Cautions from running this on 35+ sites:

  • Turn it off before migrations or large bulk copies. Trigger concurrency queues this flow’s runs, so ordinary batches need time to drain. A sustained import can still exceed limits or produce 429 throttling. See the queue and Split on limits.
  • Copies by any account still create work. The trigger condition filters later folder updates regardless of who made them. It still admits file changes and folder events inside the initial 60-second window, including some updates by the flow itself.
  • Pick a stable owner account. Keep the SharePoint connections working and check them after sign-in or authentication-policy changes. A failed connection needs repair.
  • Investigate failure emails. Connection problems, permission errors, conflicts and field-validation failures remain legitimate reasons for a run to fail. Use the failed action’s response to identify the cause. Also review inactivity or suspension notices; whether an inactive flow is suspended depends on its license.

Notes, gotchas and known issues

Why both concurrency settings are 1

The two settings protect different parts of the flow. Inside IFolders, every iteration appends to the same VPath string. Running those iterations in order is necessary to build a usable path. At the trigger, degree 1 makes separate runs of this flow wait their turn, which removes their overlap when several changed files share a parent folder.

Trigger concurrency applies to this flow alone. A second copy watching the same library, another automation or a person editing folder properties can still write while a run is working. If 409s continue, check who else is updating the affected folder and inspect the failing action’s output before changing retry settings.

What the 60-second condition allows and skips

The condition compares Modified with Created in the trigger payload. It does not compare either timestamp with the time a queued run starts. Microsoft defines a tick as 100 nanoseconds, so 600000000 ticks is 60 seconds. Because the expression uses less(), an exact 60-second difference is excluded.

Trigger item or eventWhat the condition does
A file, with {IsFolder}: falseAllows it regardless of the file’s age.
A newly created folder, or a rename less than 60 seconds after creationAllows it. This accommodates the New folder, then rename pattern.
A folder update by this flow while its Modified timestamp is still within that initial windowAlso allows it. Some folder-triggered follow-on runs remain possible.
A folder event whose Modified timestamp is at least 60 seconds after CreatedSkips it, including later flow updates, older-folder renames and edits to that folder’s metadata.

A file’s own run already walks every ancestor folder, so those later folder-triggered runs repeat work the file run handles. The filter reduces that repeated work. The tradeoff is that renaming an older folder or changing its own metadata no longer bumps its parents through this trigger. Use this condition only if that behavior fits the library.

The queue buys time, but it has limits

The saved configuration shown above contains maximumWaitingRuns: 100. Treat that as the setting recorded for this flow, not a verified universal default or platform maximum. Microsoft’s Power Automate limits page currently describes waiting runs as 10 plus the degree of parallelism. That differs from the explicit value shown here, so check your own designer and current limits rather than assuming every environment behaves identically.

Microsoft also warns that triggers may fail to become runs if the waiting limit remains full, and enabling concurrency reduces the Split on limit to 100 items. The trigger shown here uses Split on. Neither number makes this flow suitable for migrations. Normal batches may take minutes to drain; large imports still need the flow switched off and a separate plan to check folder dates afterward.

What the folder’s Modified date actually means

CModified formats the file’s timestamp for run history, but its output is never sent in the HTTP request. CProperties submits Editor, and the normal SharePoint update stamps the folder’s Modified time when that update is processed. With a queue, the folder time can be minutes later than the file change that caused it.

That makes the date useful as an activity signal. It does not calculate the latest timestamp across all descendants or preserve the triggering file’s exact modification time. The Modified By value comes from the editor recorded in the triggering event. Writing Modified explicitly through formValues would be a separate behavior change that I have not tested, so this walkthrough keeps the existing update body.

Empty top-level folders: the old explanation is unverified

An earlier version of this post described failures after creating an empty top-level folder as expected and told readers to ignore them. I did not test that scenario on November 17. In the runs I inspected, the library-root iteration evaluated CValid as false and skipped the HTTP call cleanly.

That observation does not establish what happens when a brand-new empty top-level folder is created. Keep it as a separate test case. If it fails, open the failed action and read its response rather than attributing the failure to emptiness. The three sampled 409s happened on a real parent folder, after the library root had been skipped.

The HTTP action and field validation are separate checks

Check the returned field results as well as the action status. validateUpdateListItem returns field-validation information; HasException indicates a validation error and ErrorMessage provides the detail.

My current copy also collects field errors with VErrors, VFieldErrors, CFieldErrors and Append to VErrors, then checks CAnyErrors and uses Terminate with field errors, code FolderFieldUpdateFailed. That additional handling explains the extra actions visible in the failed-loop screenshot. The step-by-step build above does not include those actions; documenting their complete configuration is separate work.

A run terminated for field errors needs investigation, just as a connection or permission failure does. The trigger changes do not repair those problems or turn every failed run into a harmless notification.

What still needs checking after the change

The next useful check is a small batch in an existing folder tree, with the folders already more than a minute old. Watch the runs take turns, confirm that every intended parent updates, and inspect any failed action. Compare the trigger items as well as the run count: creating folders and editing file properties can add events, so a matching file count alone is not proof that the flow behaved correctly.

Then test a newly created folder, a prompt rename, and an empty top-level folder separately. Those cases exercise the 60-second exception and the old empty-folder claim. A rename or metadata edit on an older folder should be filtered by the condition. I have not added an after screenshot because a clean batch under these settings has not yet been captured.

Have a better way to do this? Let me know in the comments.

Share your thoughts, leave a comment

Your email address will not be published. Required fields are marked *

You may also like these

INFOSTRUCTION

You're about to become an infostruction VIP!

By subscribing, you’ll receive a monthly round-up of the latest news. There’ll be no spam, I promise :)