I’ve seen many people creating flows in Microsoft Flow where there was a need for reminders to be sent. All sorts of complicated loops are developed and it doesn’t really do the job.
Is there an easier way? Yes!
I’m going to start with the following setup.
The first action is the first approval and the second action is my reminder. I’m sure you will have noticed that this results in the second attempt to wait until the first attempt has been responded to. This is not what we want!
For the first approval action I’m going to set a Duration:
When you click on the little information icon you will find the following help: Specify duration in ISO 8601 format.
The example given is PT1D so I first thought that PT1M would work for Minutes. Assuming that the D stands for Days, but when you try that is doesn’t work.
The string PS1D is not a valid TimeSpan value. So the next attempt using 00:05 for 5 minutes duration. But still this doesn’t work:
This now calls for serious action: So I went to the ISO site but still no luck. A value like 2018-02-16 should be accepted but isn’t.
Then I found the a post helping me a lot better.
So the syntax is : PT then a number and then H, M or S
Why PT1M didn’t work is a big question for me. If you have the answer then please comment below. I guess 60s is the same as 1M so it’s not really a problem for me now.
And now my flow runs:
and after 60 seconds my second approval action kicks in:
And now I’m seeing multiple requests in my Approvals overview:
Hmm, this is nice but it would be better if the timed out approval was cleaned up. I’ve not come across an Approval cleanup yet. Hopefully that will be added to Flow soon.