Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Filter for date

(0) ShareShare
ReportReport
Posted on by 2

I have a Power Automate flow that sends me an email with a list of pages from my OneNote notebook that were created within the last seven days. Here's what I'm doing:

  1. Loop through sections in the notebook.
  2. Use "Get Pages for a Section" for each section.
  3. Filter the pages to only include those created in the last seven days.

However, the filter always returns an empty array, even though the inputs contain pages with recent createdTime values. For example, one of the pages in the input is:

{
"id": "...",
"self": "...",
"createdTime": "2024-12-21T10:49:52.458Z",
"title": "Test page",
"createdByAppId": "",
"links": { ... }
}

Here’s how I’ve set up the filter:

  • From Field:

    body('Get_pages_for_a_specific_section')?['value']
  • Filter Condition:

    @greaterOrEquals(item()?['createdTime'], variables('CutoffDate'))
  • Cutoff Date:
    This is defined as a string variable using:

    formatDateTime(addDays(utcNow(), -7), 'yyyy-MM-ddTHH:mm:ssZ')

The Problem:

  • The filter always returns an empty array.
  • I confirmed that the inputs to the filter include all the pages, and at least one page (Test page) has a recent createdTime (2024-12-21T10:49:52.458Z), so it should match
 
Any hints appreciated!

Many thanks,
Katharina
 
  • KS-21121323-0 Profile Picture
    2 on at
    Filter for date
    Thanks, the filter condition is in an filter array, between a block "get pages for specific section" and a block "apply to each". 
  • Pstork1 Profile Picture
    67,047 Most Valuable Professional on at
    Filter for date
    Is your filter condition in a Filter Array? Or are you trying to use that as a filter when you get the pages?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1