Hi MG-30041246-0,
The path-based exclusion is the right pattern. If your library has more than a few hundred files, you can also push both filters down to SharePoint using the Filter Query field on Get files (properties only), which is more efficient than pulling everything and filtering in the flow.
Option A — Filter at source with OData (recommended for larger libraries)
- Add Get files (properties only) (SharePoint connector). Point it at the document library.
- In Filter Query, combine the modified-date filter with a folder-path exclusion:
Modified lt '@{addDays(utcNow(),-90)}' and not(substringof('/Zarchive/', FileRef))
FileRef is the server-relative path of the item — this is what lets you exclude an entire folder rather than matching on file names.
- SharePoint's OData supports
substringof for string contains; contains() is not supported here, which is a common gotcha.
- The threshold view limit (default 5,000) still applies — make sure
Modified and FileRef are indexed columns on the library, otherwise the call fails on large libraries.
- Apply to each → send the reminder email. No extra Condition needed.
Indexing columns reference: Manage large lists and libraries.
OData filter syntax for the SharePoint connector: SharePoint connector reference.
Option B — In-flow Condition pattern with a small refinement
If you stay with the in-flow Condition approach, two small tweaks help reliability:
Why prefer Option A
Microsoft's guidance for the SharePoint connector is to filter at the source whenever possible — pulling all items and then filtering in Apply to each hits connector throttling limits faster and consumes more API calls per run. See Limits and configuration in Power Automate for the per-connection throttling thresholds, and Working with large lists and libraries for the 5,000-item threshold behavior.
One more thing worth checking: if the Zarchive folder is created by moving files there (not by archiving in place), make sure the flow's trigger or schedule runs after the move is complete — otherwise a file that's about to be archived can still hit the reminder window.
Found this helpful? Please mark ✅ "Does this answer your question?" so others searching for the same issue can find it quickly. A 👍 on "Was this reply helpful?" or a ♥ Like is also much appreciated!
Raghav Mishra — LinkedIn | PowerAI Labs