Skip to main content

Notifications

Power Automate - General Discussion
Answered

FLOW TO SEND EMAIL WHEN DATE APPROACHES

(0) ShareShare
ReportReport
Posted on by 2

I need to pull information from a sharepoint library that contains a calculated column(Date only) for "Next Review Date".  I'm trying to compare that to today's date and if equal, send a reminder email.  

 

The issue is I cannot get the comparison to work.  I'm using 

 

 

@equals(items('Apply_to_each')?['Next Review Date'], utcNow())

 

 

I've played with the date formats on my "Next Review Date" column and the utcNow() field and NOTHING is working?  Any help is greatly appreciated.

Categories:
  • acharge37 Profile Picture
    acharge37 10 on at
    Re: FLOW TO SEND EMAIL WHEN DATE APPROACHES

    Hello all

     

    Hope you can help please. 

     

    I've created a similar Flow and need some help, I need Sharepoint to Send an email to alert -60 days before Next Review Date.

     

    The email comes through with the correct details, but it just comes back with all documents in that field rather than 60 days before.

     

    Can this also be set global over all sites or per folder? 

     

    String being used when on advanced: @not(equals(items('Apply_to_each')?['Next_x0020_Review_x0020_Date'], formatDateTime(adddays(utcnow(), -3), 'yyyy-MM-dd')))

    Over Due Date 1.pngOver Due Date 3.pngDue Date 4.png

  • Re: FLOW TO SEND EMAIL WHEN DATE APPROACHES

    Hello, @mosturl!

     

    Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @v-yuazh-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!


    Thank you for being an active member of the Flow Community!

     

    -Gabriel
    Flow Community Manager

  • Verified answer
    v-yuazh-msft Profile Picture
    v-yuazh-msft on at
    Re: FLOW TO SEND EMAIL WHEN DATE APPROACHES

    Hi @mosturl,

     

    I have made a test on my side and have created a sharepoint list with a alculated column(Date only) "Next Review Date" as below:

    Capture.PNG

     

    I have created a flow as below:

    Capture.PNG   

     

    The expression in the Condition as below:

    @equals(formatDateTime(items('Apply_to_each')?['Next_x0020_Review_x0020_Date'], 'yyyy/MM/dd'), formatDateTime(utcNow(), 'yyyy/MM/dd'))

     

    The flow would run successfully as below:

    Capture.PNG

     

     

     

    Bset regards,

    Alice

     

  • MarkStokes Profile Picture
    MarkStokes 561 on at
    Re: FLOW TO SEND EMAIL WHEN DATE APPROACHES

    Another suggestion is to not pull all the items out of the SharePoint list, but put the filter onto the Get Items call and pass it a ReviewDate eq '2018-08-21' OData filter (Filter Query option)

  • MarkStokes Profile Picture
    MarkStokes 561 on at
    Re: FLOW TO SEND EMAIL WHEN DATE APPROACHES
    The equals will be doing a string compare on the two dates and they are unlikely to match.

    What I do here is create two compose actions and put one date in each. Then run the Flow. You’ll see what the string value of each date is and where they don’t match.

    Then you might get yourself into re-composing the string values of the dates to formats that match.

    Or you could try looking at the DateDiff function.

    - Mark

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard