web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
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
 
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,849 Most Valuable Professional on at
    Is your filter condition in a Filter Array? Or are you trying to use that as a filter when you get the pages?
  • KS-21121323-0 Profile Picture
    2 on at
    Thanks, the filter condition is in an filter array, between a block "get pages for specific section" and a block "apply to each". 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 178 Super User 2025 Season 2

#2
harshdeol Profile Picture

harshdeol 167 Moderator

#3
David_MA Profile Picture

David_MA 162 Super User 2025 Season 2

Last 30 days Overall leaderboard