Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Triggering flow when a new item is created within an expiration window

(0) ShareShare
ReportReport
Posted on by 5

I've created a flow that triggers an email notification to specific users when an item in a SharePoint list is 90 away from expiration. Email is sent every week until the new expiration date is updated. 

 

My issue is when a new item is created in the list with a date within the 90 day expiration window, the flow is not triggered and no email is send. 

 

How can I get the flow to trigger when the item is within the expiration window?

 

This is the expression:

 
formatDateTime(addDays(utcNow(),90),'yyyy-MM-dd')
 
 
 

2020-02-19_9-07-18.png

  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at
    Re: Triggering flow when a new item is created within an expiration window

    Hi @Mwhite 

     

    The reason email action not executing because you might not be getting any results after applying a filter in the "Get Items" action.
    I believe you are checking if Expiration Date is equals to formatDateTime(addDays(utcNow(),90),'yyyy-MM-dd')
    Key Point to notice:
    when we use the utcNow time zone, it gives you return date in UTC time zone, not in your local time zone, so for an example, if I use utcNOW() now at 11:00 PM, I will get 2/20/2020, though my current date is 2/19/2020 (CST), because CST 6 hours behind UTC. So the best practice is to use
    convertFromUtc() expression to get the correct date.
    You should use expression like this(change Center Standard Time to your specific time zone:
    convertFromUtc(addDays(utcNow(),90),'Central Standard Time','yyyy-MM-dd')

     

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

  • Mwhite Profile Picture
    5 on at
    Re: Triggering flow when a new item is created within an expiration window

    @DeepakS 

    I used the "When an item is created or modified" flow and put the rest of components in the flow and run it by entering a test item into the list but I did not receive any email (the email step did not run).  

     

    Is this the correct start?

    Do I use the "Get Item" function for the second step?

     

    2020-02-19_20-48-10.png

  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at
    Re: Triggering flow when a new item is created within an expiration window

    Hi @Mwhite 

     

    As your flow is recurring so it will not trigger on a new item creation. What you need is a flow that triggers when a new item created and do a similar task what your recurring flow is doing.

     

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow