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

Send email based on date from SP and date variable

Hi 

 

I have som issues with a flow. I want this flow to send out a email 30 days before a calculated date for a sharepoint list object but i cant get it to work. Any tips or suggestions on what im doing wrong? 

 

I have to columns in my SP List

 

[Date] (set by user)

[Calculated date] = [Date] +365

 

I want power automate to send email to all list object 60 days before the [Calculated date]

 

In power automate i have created a date variable that check todays date and ads 60 days

 

Variabel 1 = formatDateTime(addDays(utcNow(), +60), 'yyyy-MM-dd')

Variabel 2 = string(formatDateTime(item()?['Calculated date']),'yyyy-mm-dd')

 

Se the pic below

 

Mahsha83_1-1650971134866.png

 

 

Cant get this to work, any ideas or tips?

 

 

 

3 REPLIES 3
Edd-Keogh
Helper I
Helper I

Hi @Mahsha83 

 

I have a flow that sends an email 30 days before a renewal date is due it works like this

 

Document Renewal Date is equal to addDays(utcNow(),30,'yyyy-MM-dd')

 

So If I understand right yours would be:

 

Calculated date is equal to addDays(utcNow(),60,'yyyy-MM-dd')

 

Thanks,

 

Edd

Sorry error it should be 30 and not 60. But its still not working. Can it be the date formats?

Edd-Keogh
Helper I
Helper I

You have removed the + from the expression? Is it now as: 

 

Calculated date is equal to addDays(utcNow(),60,'yyyy-MM-dd')

 

And this is the point it is failing at? What is the error code?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

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 Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (4,213)