web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
 
I have the same question (0)
  • Pstork1 Profile Picture
    68,271 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?
  • 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". 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

Last 30 days Overall leaderboard