cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tdwils1
Frequent Visitor

Send Email 30 minutes before a time (USING SHAREPOINT LIST ITEM - DATE/TIME)

Hi all,

 

I have someone who wants the following flow.  They input an interview date/time (using a date/time field in SharePoint - NOT Outlook).  The flow would ideally run every 5 minutes to check to see if it was the date of the interview, and 30 minutes before the scheduled interview time, send an email.

 

Ex.  If an interview is 6/28 at 10:00am, the flow is continually checking and then sends an email 9:30am.  Does this make sense?  How can I best accomplish this?  I have a recurrence, Get items with a odata filter for "InterviewDate" field eq

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

 

I'm just not really sure how to pull out the "time" part of this.  The date seems easy enough but I don't know how to adjust my expression to account for time.

 

Any help is appreciated!

3 REPLIES 3
MarconettiMarco
Super User
Super User

Hello @tdwils1 ,

you should be able to use the following expression: 

 

addHours('<timestamp>', <hours>, '<format>'?)

 

You can refer to the following article:

 

https://softchief.com/2021/09/13/use-of-date-time-expressions-guide-for-power-automate-complete-tuto...

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

BR,

Marco

@MarconettiMarcoI have another question.  How can I combine different expressions?  I imagine i need to have today's date minus x amount of minutes, i need it to also format to be the same as what's in sharepoint (mm/dd/yyyy hh:mm tt), but on top of that it's displaying in UTC...

 

how can do all of this and convert the time to my timezone?  Currently, it's returning a time around 4pm and it's 10am here.

Hello @tdwils1 ,

please use the following expression in a "Compose" action:

 

formatDateTime(addHours(<your start date column>,-30),'M/dd/yyyy hh:mm tt')

 

then use the following action:

MarconettiMarco_0-1656434123581.png

in the Base Time insert the Compose outputs , in the Source Time zone put UTC, in the destination time zone your time zone, and in the Format string the format you want.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

BR,

Marco

 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (2,154)