cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dylan_boucher
Level: Power Up

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

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

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

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,025)