cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dylan_boucher
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
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
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

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
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,050)