cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mhabig1
Helper I
Helper I

Upcoming Due Date

I've create a SharePoint document library and I'm trying to create a flow that would send an email based on the due date (which is a calculated column). This email would be sent three days prior to the due date. But its not working. I'm not clear on what I should have the condition set at.

 

Annotation 2019-12-16 143835.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @mhabig1 ,

 

Please refer to screenshot below to create the flow:

1.png

The expression for the first value in the Condition as below:

formatDateTime(addDays(items('Apply_to_each')?['DueDate'],-3),'yyyy-MM-dd')

The expression for the second value in the Condition as below:

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

 

Best regards,

Alice       

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
RobElliott
Super User
Super User

HI, the most likely reason that it's not working is that the dates are not in exactly the same format. I put each of the dates into a Compose control and format the date. Then compare the output of the AdvanceReminder date with today's date:

1-Flow.png

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks. 

v-alzhan-msft
Community Support
Community Support

Hi @mhabig1 ,

 

Please refer to screenshot below to create the flow:

1.png

The expression for the first value in the Condition as below:

formatDateTime(addDays(items('Apply_to_each')?['DueDate'],-3),'yyyy-MM-dd')

The expression for the second value in the Condition as below:

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

 

Best regards,

Alice       

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

mhabig1
Helper I
Helper I

@RobElliott thank you for responding! I created a new column in my sharepoint library called NextReview and went with everything you done, but its still putting off an error.

 

Unable to process template language expressions in action 'Compose_AdvanceReminder' inputs at line '1' and column '2831': 'The template language function 'addDays' expects its first parameter to be a string that contains the time. The provided value is of type 'Null'. 

 

Thanks!

Are you sure that there isn't a null value for one of the items in the Nextreview column?

Rob
Los Gallardos

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Users online (3,238)