cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

FLOW TO SEND EMAIL WHEN DATE APPROACHES

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

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

 

View solution in original post

5 REPLIES 5
Skilled Sharer
Skilled Sharer

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

Skilled Sharer
Skilled Sharer

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)

Community Support
Community Support

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

 

View solution in original post

Administrator
Administrator

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

- Gabriel
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager
Power Platform Communities

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

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (26,279)