Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Filter for date

(0) ShareShare
ReportReport
Posted on by

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
 
  • Pstork1 Profile Picture
    Pstork1 64,174 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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,174

Leaderboard