Forum Discussion

gavinpaz's avatar
gavinpaz
Copper Contributor
Jan 31, 2023
Solved

Power Automate flow that is triggered by the difference between today and an employees start date.

Hi everyone! I am trying to make a flow in power automate that when 30,60, and 90 days have passed since an employees start date it will send someone an email. The start date is a column in a sharepo...
  • SvenSieverding's avatar
    Jan 31, 2023

    Hi gavinpaz ,

     

    you should create a scheduled flow that runs every day

     

    1) If your StartDate column does not have a time value:

    Then create a variable with the name "In30Days" of type String and use this expression

     

    convertToUtc(startOfDay(addDays(convertTimeZone(utcNow(),'UTC','W. Europe Standard Time'),30)),'W. Europe Standard Time')

     

    Create a "Get Items" from SharePoint Query and query for all the list items with the following filter query

     

    StartDate eq datetime'@{variables('In30Days')}' 

     

     
    2) If your StartDate column has a time value:
    Create two variables, one for the date in 30 days and one for the date in 29 days and filter for this

     

    StartDate le datetime'@{variables('In30Days')}' and StartDate gt datetime'@{variables('In29Days')}' ​


    Best Regards,
    Sven

     

     

Resources