Delay by time, a date or a day of the week

Welcome to my guide on mastering time delays in Power Automate. In the realm of automation, timing is everything, and being able to strategically delay actions can significantly enhance the efficiency and effectiveness of your workflows. Whether you’re orchestrating tasks, sending notifications, or triggering events, the ability to pause execution for a specific duration, until a particular date, or until a designated day of the week can be invaluable. In this guide, we’ll walk you through step-by-step instructions on how to seamlessly implement three distinct time delay techniques: delaying by minutes, delaying until a static date, and delaying until a specific day of the week. Let’s dive in and empower your workflows with precision timing capabilities.

1 – Delay by minutes

The sub title for this first section is “Delay by minutes”, but this brief how to will show you how to delay a flow for any such time. First off, we will create a new flow. In this example we will create an instant flow.

Next, for this example we will start with a simple “Manually trigger a flow” so we can show the delay working in a real time test.

Next we will search for the action of “Delay”.

The Delay action will give us two parameters to use. This is where we can add a numeric value for the time delay, as well a unit. In this example we will create a 1 minute delay.

It is as simple as that to create the delay. Save your newly created flow and do a quick manual test to make sure that it is working as expected.

The test will give you a nice green tick once its run. You can see below that the delay action took 1 minute to perform which is exactly what we wanted to see.

Delaying until a static date

Instead of selecting the “Delay” action, you can pick “Delay Until”. This will allow you to add a exact date. This is a useful ability to have, for example if you want to set reminders for tasks to be done in 3 months time, financial year reminders, and many other functions!

delaying until a specific day of the week

OK so this is my favourite use for a delay and has helped me build some very useful processes and flows in the past. It is the ability to delay until a day of the week. In the example below we will be delaying a flow until it is a Friday.

To do this, we will be using the “Delay Until” action again, however instead of adding a static date we want to go into the function (fx) options.

We want to add in the following function: addDays(utcNow(), sub(4, dayOfWeek(utcNow()))

The expression is used to calculate a date that is four days before the current day of the week. To break it down:

  • utcNow(): This function returns the current UTC (Coordinated Universal Time) date and time
  • dayOfWeek(utcNow()): This function extracts the day of the week from the current UTC date and time. The day of the week is represented as an integer, where Sunday is 0 and Saturday is 6.
  • sub(4, dayOfWeek(utcNow())): This part of the expression subtracts the day of the week (obtained in step 2) from 4. This effectively gives you the number of days to subtract from the current date to get to the previous occurrence of the same day of the week.
  • addDays(utcNow(), sub(4, dayOfWeek(utcNow()))): Finally, this function adds the number of days calculated in step 3 to the current UTC date and time. This results in a date that is four days before the current day of the week.

Test the flow to make sure its calcuating corrects as per below.

We have a video on Youtube showing this full process. Check it out!

By Stroud

Leave a Reply

Your email address will not be published. Required fields are marked *