Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Email row item if item was created a 3 or more days ago

(0) ShareShare
ReportReport
Posted on by 48

I am having trouble figuring out how to accomplish this. I have a flow set up to recure everyday. I want to send an email for each item that has been opened for longer than 3 days on my list. I would do this by looking at the created time column. I have a separate flow that removes an item from the list when it is closed. 

Here is the structure of my flow:

epicsmokey_0-1700148016052.png

Here is my get items parameters. It is connected to my list but I will not show the link for that. (the -1 is for testing, would change to -3 when working.)

epicsmokey_1-1700148067970.png

 

Here is what my list created column looks like:

epicsmokey_2-1700148122800.png

This is the apply to each:

epicsmokey_3-1700148153268.png

 

No emails are being sent because the apply to each is empty. Something isn't returning correctly in the get items i'm guessing.

 

I also don't know how to make it so that it filters dates greater than or equal to 3 days old, rather than just equal to.

 

Thanks

 

 

 

  • epicsmokey Profile Picture
    48 on at
    Re: Email row item if item was created a 3 or more days ago

    Works perfectly so far! I will note for people that might see this in the future: The compose in the get items action is the 3rd compose create that contains the addDays function. 

    This is how I rounded out the flow to send the email for each:

    epicsmokey_0-1700158248165.png

     

  • Verified answer
    creativeopinion Profile Picture
    10,450 Super User 2025 Season 1 on at
    Re: Email row item if item was created a 3 or more days ago

    @epicsmokey The reason your Get Items action isn't returning any items is because you are checking to see if the Created column is equal to a specific date. However, the Created column stores a date/time.

     

    Your filter query needs to include a time. I'm using the Classic builder in my screenshots below. You'll have to switch to the Classic Designer to follow along. Click on the three dots in the top right corner of the screen and select Switch to Classic Designer.

    creativeopinion_8-1700150128300.png

     

    Tip: Always rename your actions to keep your flow organized!

     

    Manual Trigger with Date Input

    While you build your flow I would recommend using a Manual Trigger with a date input. This way you can try your flow out and select a specific date to mimic for testing. 

     

    Once your flow is tested and ready to go you can replace the Base time with the current date and time ( aka utcNow() ).

     

     

    creativeopinion_5-1700149709887.png

     

    Create a Dynamic Timestamp

    Please note: The Scope action is optional. Not required, but I use them in my flows to keep things organized.

    Not sure when you plan to run this flow but it's always best to ensure that the time zone matches which is why I use the Convert time zone action.

    creativeopinion_6-1700149916549.png

     

     

    For the Base Time field you need to insert the Date input dynamic content (if you are using it). If not, you can insert an expression for the current date/time. The utcNow() function will return the current date and time.

    utcNow()

    For the source time zone, select (UTC) Coordinated Universal Time. Select the appropriate destination time zone to match your time zone. In the Format String field, select Round-trip.

     

    The next few actions we'll use to compose your dynamic date. This is the date we'll use to check against the created date column in your SP list.

     

    In the first Compose action, insert the number of days to add or remove from today. In your case, enter -3. 

    creativeopinion_7-1700150056131.png

     

    Add a Compose action to store today's date. You'll need to insert an expression. Insert the formatDateTime() function. 

     

    creativeopinion_9-1700150224299.png

    Place your cursor in between the brackets and insert the dynamic content output from the Convert Time Zone action.

    creativeopinion_10-1700150293041.png

    Add a comma and single quotes with the date format. In this case:

    creativeopinion_11-1700150321964.png

     

    creativeopinion_12-1700150360438.png

    Compose Dates 3 Days from Today

    The next compose action will store the expression that will create the date that is 3 days from today.

    creativeopinion_13-1700150483427.png

     

    'To do this you need to start with the addDays() function. Make sure you have the Expression tab selected.

    creativeopinion_14-1700150503591.png

     

    There are three parts to this function. You'll be using dynamic content for the first two: original date and days to add/remove.

    addDays([orginal date],[days to add/remove],[dateformat])

    Switch to the Dynamic content tab. Make sure your cursor is in between the parentheses. Locate the Converted time dynamic content and select it to insert it into the expression.

    creativeopinion_15-1700150544060.png

     

    Add a comma after the dynamic content and insert the outputs from the Compose action. Although you can manually enter the number of days to add/remove here—I've chosen to use a Compose action so I can easily switch the number of days without needing to edit the expression. Do whatever works for you.

    creativeopinion_16-1700150575497.png

     

    Press the down arrow key to go to the end of the expression. Press the left arrow key once. Your cursor should be placed right before the closing bracket.

    creativeopinion_19-1700150722924.png

    Add the following after the expression label. 

    T23:59:00Z

    creativeopinion_27-1700151195274.png

     

    Filter Items

    Add a Filter Query. The operator you should be using is le (less than or equals to) or you can use lt (less than)—use whichever operator suits your needs.

    creativeopinion_32-1700151357096.png

     

    Check Item Count

    Whenever I use a Filter Query in a Get Items action, I always like to return the count of items returned in a Compose action. This is helpful when building a flow and can also be used to troubleshoot your flow.

    Insert a Compose action. Add an Expression. Use the length() function.

    creativeopinion_28-1700151283411.png

    Select the Dynamic content tab and insert the value dynamic content from the Get Items action into the length() function. 

     

    creativeopinion_30-1700151319086.png

    Run a test.

    creativeopinion_31-1700151339344.png

     

    Add a Condition

    I would also recommend adding a Condition to your flow to only perform actions if items have been returned.

    creativeopinion_33-1700151513867.png

     

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok

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