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

Flow - Schedule email on Sunday after a trigger occurs

I have a use case where I am waiting for a file to be modified. Once it is modified, I need to wait until Sunday and move the file.

 

Workflow:

  • File is modified (triggers workflow) - sometimes occurs on Tuesday or Wednesday
  • Wait until Sunday
  • Move the modified file to a new folder

 

The main issue I am having is that I can't set it to a specific day of the week. The reccuring trigger will not work because I need the workflow to know what file I want to move. Any advise would be greatly appreciated

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Flow - Schedule email on Sunday after a trigger occurs

Hi @dylan_boucher ,

 

I did a test on my side, you could try the following method to determine the date of moving file.

  1. Use the dayofWeek() function to determine if today is Sunday. If it is equal to 0, it means that today is Sunday, so you can move the file directly today.
  2. If it is not equal to 0, then you need to add extra days until Sunday to move the file.
  3. Use the mod() function to get the remainder of 7 and dayOfWeek(utcNow()). This value is the difference between the current date and Sunday.
  4. Configure the addDays() function to add the remainder to the date you got today, which is the date of the Sunday. Configure this date in Delay Until action until the day you are able to execute the Move file action.

Image reference:

16.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Flow - Schedule email on Sunday after a trigger occurs

Hi @dylan_boucher ,

 

I did a test on my side, you could try the following method to determine the date of moving file.

  1. Use the dayofWeek() function to determine if today is Sunday. If it is equal to 0, it means that today is Sunday, so you can move the file directly today.
  2. If it is not equal to 0, then you need to add extra days until Sunday to move the file.
  3. Use the mod() function to get the remainder of 7 and dayOfWeek(utcNow()). This value is the difference between the current date and Sunday.
  4. Configure the addDays() function to add the remainder to the date you got today, which is the date of the Sunday. Configure this date in Delay Until action until the day you are able to execute the Move file action.

Image reference:

16.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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

Highlighted
Community Support
Community Support

Re: Flow - Schedule email on Sunday after a trigger occurs

Hi @dylan_boucher ,

 

Sorry, there may be a problem with the method I provided. I don't know if you have tested it.

Please use sub() function to replace mod() function, and nothing else needs to be changed.

I am so sorry for my mistake again.

 

Best Regards,

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

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (3,836)