web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / 18 months notification...
Power Automate
Suggested Answer

18 months notification flow

(2) ShareShare
ReportReport
Posted on by 8
i need a power automate flow to notify only if
 
start date plus termination date = 18 months
 
and if the condition matches 18 months,
 
it must send notification email to users that will be terminating in 18 months, but notify them 15 days before the 18 months.
 
data source its sharepoint list
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at
     
    Regarding your question - just need a clarity on datasource from which you are getting the dates data to do the comparison.
     
    In general - the logic on how to do the comparison on months duration b/w start and end dates , also based on number of days before notification need to be sent would be like below
     
    For demo purposes, i have initialized start and end dates 
     
     
    Now used the below logic in condition action.
     
     
    Expression: formatDateTime(addToTime(variables('StartDate'),18,'Month'),'yyyy-MM-dd')
     
     
    Expression: div(sub(ticks(variables('EndDate')), ticks(utcNow())), 864000000000)
     
     
    First condition checks if the start and end date has 18 months duration, second condition checks whether it is 15 days before end date.
     
    if the condition is true, you can make the flow to send notifications in yes branch.
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • MS-03040912-0 Profile Picture
    8 on at
    am currently using sharepoint list. will try and give feedback
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at
     
    Let me know if you need help !
     
    If this logic helps in achieving the solution - Mark the answer as solution.
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
     
    whenever someone asks me about dates, I ask things like
     
    1) do you mean only business days or weekends too
    2) do you also count Holidays? because in most legal things they don't count, so you have to add more than 180 as you ignore holidays and or holidays and weekends.
     
    3. You could also create a Calculated Column in SharePoint, so that you have an auto updated field that can trigger the flow to do whatever you want also.
     
    @Nived_Nambiar has a really good option and thoughts, mine are just different.
     
    aso if theirs answers you please mark theirs, if both answer you feel free to make them both but @Nived_Nambiar first
     
    Thanks!
  • MS-03040912-0 Profile Picture
    8 on at
     
    it doesnt work, after initializing variable, you need to set the variable else it fails. but then i do not want to hard code the dates as am having different dates
  • Chriddle Profile Picture
    8,672 Super User 2026 Season 1 on at
    Expression: div(sub(ticks(variables('EndDate')), ticks(utcNow())), 864000000000)
    This looks like an off-by-one error and should be 
    div(sub(ticks(variables('EndDate')), ticks(utcNow('yyyy-MM-dd'))), 864000000000)
     
    Don't forget to convert the time zone if necessary.
  • MS-03040912-0 Profile Picture
    8 on at
     
    here is what i have done so far
     
     
    i just added compose to see which dates its getting from the list and it only get these start date 2023-10-16 and termination date 2025-04-16 while i also have 2023-11-30 and 2025-05-30 but it doesn't pull it
     
    set variable for these only works when its inside the loop
     
    Returns false
     
     
     
  • MS-03040912-0 Profile Picture
    8 on at
     
    Just updated it and there is no change, still same results 
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at
    Hi @MS-03040912-0 - The reason why i have used initialize variable was because just to show how the logic should be implemented using condition action. In reality, when you are taking data from SharePoint list, there is no need to use the variable as you can directly use the dynamic content values.
     
    Also did you SharePoint List has more than 100 items - if yes please note that Get Items by default will only capture 100 items by default, if you need more - set up the pagination. 
     
     
     
     
    Also Thanks @Chriddle for correction , @MS-03040912-0 please update the condition expression accordingly as suggested by @Chriddle
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard