cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CatPagulayan
Helper IV
Helper IV

Delay until 2pm every Thursday

Hello,

I am not sure how to put the delay functionality in this scenario:

1. When a file is created in a folder

2. Send an email

3. At 2pm every Thursday (this is the delay functionality I am looking for)

4. The files from item 1 should be moved to another folder

 

Appreciate the help.

thanks!

4 REPLIES 4
eric-cheng
Solution Sage
Solution Sage

Hi @CatPagulayan ,

 

You could split the flow into two flows?  First flow would be triggered on file create and send the email.  Second flow is a scheduled flow that moves all files from that folder?  This would also save havng multiple flows in a running state whilst waiting for Thursday.

 

Alternatively,  if you want a single flow, you can use dayOfWeek() here to get the current day (e.g. 1 for Monday) and then addDays() to get to Thursday.  You can then pass the date and time into a Delay Until action.  

thank you for the replies @eric-cheng . My issue with making 2 flows is the trigger for the 2nd one. It has to get the file from the first flow. 

Is there a way to do a delay at 2pm instead (no longer taking into consideration the Thursday). So:

1. When a file is created in a folder

2. Send an email

3. At 2pm the same day, the files from item 1 should be moved to another folder

 

hope you can advise the delay formula in the above scenario.

thanks!

eric-cheng
Solution Sage
Solution Sage

Hi @CatPagulayan ,

 

Yeah, try the following.

 

I got the Created Date of a list item and then used the below expression to get 2PM of the same day.  You will need to add some smarts to skip to the next day or ignore if the file is created after 2pm but this should get your started.

 

addHours(formatdatetime(outputs('Get_item')?['body/Created'],'yyyy-MM-dd'),14)

 

Screenshot_20210801-212048_Chrome.jpg

Screenshot_20210801-211706_Chrome.jpg

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

hi Eric,

thanks for this but how do you write the expression if we are dealing with a file and not a list?

My flow is as below. This part in bold, I am not sure what to put: addHours(formatdatetime(outputs('Get_item')?['body/Created'],'yyyy-MM-dd'),14). Thanks in advance!

CatPagulayan_0-1627997029800.png

 

 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (2,810)