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)
  • 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". 
  • Pstork1 Profile Picture
    68,858 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?

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
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 185 Super User 2025 Season 2

Last 30 days Overall leaderboard