Automating Reminders for Approval Flows

Learn Expert

Microsoft has recently introduced Approvals to Flow.  This functionality provides users with an easy way to look at all their outstanding approval requests and action them. 

 

Approval.PNG

 

But what if you don’t know that you have pending approvals?  In this article, I provide an example how to receive time-based reminders of an outstanding approval until it has been actioned.  In my example, I created a SharePoint list for vacation request that need approvals.  The vacation requests have a requester, approver, start and finish date, and approval status.  When the approval is first created, the Approval Status is set to Pending.  (NOTE:  Due to a current limit in the Flow functionality, I am leveraging a text field for the Approval Status rather than a choice field or other structure data).  Approvals.PNG

Once a vacation request has been submitted, the flow kicks off.  Let’s have a look at how it works.

 

Reminder Overview.PNG

 

The flow is broken into three major sections

 

Flow Initiation

 

During the initiation of the flow, information is captured about the vacation request, such as the name of the requester and approver.  As well, I create a variable Approval Provided, which I use later to determine whether approval has been provided or is still pending.

 

FlowInitiation.PNG

 

The next two sections run in parallel branches.

 

Flow Approval (right branch)

 

In this section, I submit an approval to the approver mentioned in the SharePoint Vacation Request list item.  As this step is synchronous, the right branch will pause until the approval step has been completed by the approver by either approving or rejecting the vacation request.  Once an action has been performed, the original SharePoint Vacation Request list item is updated with the corresponding Approval Status.

 

Approval Branch.PNG

 

 

Reminder (left branch)

 

The left branch is responsible for sending out email reminders to the approver.  The trigger is time based and continues until the Approval Provided variable is set to true (which happens in the Flow Approval branch).  To make things easier for the approver, I am including a link to the Flow Approvals page (https://flow.microsoft.com/manage/environment/<your tenant ID>/approvals/received) directly in the email message.
 Reminder Branch.PNG

 

Caveats

 

There are a couple of caveats with this approach.  The first one is that you cannot target a specific approval for your user.  If the user has several approvals outstanding, you will need to be creating in your messaging to ensure that they address the correct one.  For example, in my email message above, I have included the approval type (Vacation Request), who requested it, and start and end dates.  These can be matched to the Approval information.

 

The second caveat is that unless you put a limit on the reminders, they will continue until the approval has been actioned.  This can possibly a point of annoyance if someone is away for some time and comes back to find a long list of approvals in their mailbox.

 

29 Replies

Very nice article, @Haniel Croitoru and an excellent solution!

 

I am considering using something similar for Project Change Requests; do you know if Approvals can be assigned to External Users?

 

Thanks!

Hi @Jim Duncan,

 

Thanks for the feedback.  I looked into your specific scenario and what I found was that it's not possible for the reason that each approval is associated with a specific tenant ID. 

 

When you are creating an approval, the approval link in the email points to your tenant's Flow Approval page (e.g. https://flow.microsoft.com/manage/environments/Default-your_tenant_id/approvals/received) .  When an external user clicks this link in the email, they would get a 404 error as that page does not exist on their tenant.   

 

One work-around would be to provide a regular email with more details to them and possibly manage the approval through another mechanism, such as SharePoint.  A similar approval process could be introduced for that case.

 

Hope this information is helpful for you.

Hello @Haniel Croitoru@Jim Duncan

I tried the workflow u described.

It is as i wanted to implement in my project.

But what i want is that user will not get a single mail about reminder when the approval is done.

In this case, user gets atleast one mail even if the approval is given in mentioned amount of time.

How can i achieve that??

Any help is appreciated 

This was almost identical to what I was needing so i set my flow up to be the same. the only difference is that my Do Until is on the right side instead of left and I put the set variable to true after my Condition statement after starting the approval.  The flow works fine except the reminders never stop coming.  It's like it doesn't see the variable is set to true for some reason. I've tried butting the set variable above the Condition, in the condition and after it.  I found that the Do Until variable is equal to should be just "true" and not "bool('true')" and that made it work just fine. Thank you! 

 

Joe

I did create exactly the same flow and it works perfectly except for one thing. The do until flow runs for one last time after I approve the request and the approval variable is set to true. Technically the do until loop should not run when we approve the request and the approval variable is set to true, but somehow the loop runs one last time and send me a reminder email and closes the flow. Can someone help me understand if i am missing something here . 

I would guess your interval is rather short for testing purposes? Your interval has to be longer than your timeout.
Just curious if you solved this ? Thanks for any update.

My apologies for such a quick first reply... I now know what you mean now and fortunately I think I've found the solution. The logic in this flow is missing an important step. You see, since the Do Until is running in parallel with the Start Approval, it Must complete at least one delay loop as there is nothing telling it otherwise. Once the Do Until is started it doesn't know the condition of the Set Variable until it is done sending the email. Sooooo... there needs to be a Condition between the Delay and sending the Email. Of course you need a column in your list to compare. I have a column called Approved and it is set to Pending when item is first created. Then set to Yes if Approved and No if Rejected. My Condition says to check this column and if it is still set to Pending, THEN send the Email.  I've attached what it looks like and I really hope it works. Let me know what you find!  - Joe

Hi, I am sorry for the late reply. Had some busy time at office and couldnt come back here and give you an update. 

 

I tried your first advise and yes it did work but the Do Until loop just could run once and sent only one reminder and completed the flow. I was not able to use this to send multiple reminder for the same request.

 

On the other side, As you suggested in your latest reply, I added a condition just after the delay. I had no issue testing however only one reminder email was sent out after 10 min delay and completed the DO Until flow. There was no second reminder sent out. I am not sure is I am doing anything wrong here.

 

Is there a way we can make this do until loop run and keep sending the reminder until I approve the request. 

 

Thank you in advance.

Varun Kumar 

Unfortunately this didn't work either. It simply chooses to continue running the first pass of the DoUntil regardless of the status.  I even got MS on the phone and they couldn't not resolve. But not to fear, the next best solution was to simply remove the DoUntil in the first Flow and create a separate Recurrence Flow that checks the list every two days for items still in "Pending" status and then send out a reminder on those.  See my image attached.  This has been working just fine for me now.  I just don't think the DoUntil is 100% up to par yet. 

Hi Joe, 

 

That flow worked beautifully. Thank you very much for the help. 

 

Thank you

Varun Kumar

Great post !

Sorry to jump in long after everyone else. I am working on building a flow for Document review, part of wich is to send out reminders.

I am using the Do until with the condition checking to see if a "review status" field in the list has been updated. I then have a delay 24 hours, thinking it will only send one email every 24 hours. I have it set to 1 hour for testing but only recieved 1 reminder email.
Can someone explain to me how the timing works on the Do until?

Hi Tim! 

 

In short, the DoUntil has the "Change Limits" button under it which controls how long it runs: 

Count = seconds and a max of 5000

Timeout = in ISO format and max of 30 days

 

The Defaults are 60 seconds and 1 hour (PT1H). So that explains why you only received 1 email. It stopped by the default after 1 hr. 

 

The flow will stop based on whichever limit it reaches first.   Adding a Delay action is a good idea to extend how long the flow waits for the dountil to resolve but you also have to extend the limits so that your delay doesn't fall outside those limits. 

 

Here is a link to the technical limits of the DoUntil: 
https://docs.microsoft.com/en-us/flow/limits-and-config

 

And here is another post you might find useful as it is similar: 
 https://powerusers.microsoft.com/t5/I-Found-A-Bug/Do-Until-only-works-for-1-hour/td-p/59849

 

Cheers! 

Joe

Here is a screen shot of my do until. basically i want it to send the email then a reminder a day later if the SharePoint item "Review Status" does not equal Assigned. I tried to use the contains 1st reviewer where the list item would either be 1st reviewer completed or 1st reviewer declined, didnt work. 

 

If i am understanding this correctly, I should get an email every 10 min until the list item is changed from assigned. that would continue for 7 days with P7D as the timeout.  Is the count (60 seconds) how often it checks the list item then? 

 

2018-06-07_12-10-46.png

ok, this is saying that it will send the email every 10 min but for only 7 days or 60 tries (whichever comes first).   Since there are 6  10min's in an hour, you will get 6 per hour... this will happen for 10 hours until 60 attempts have occurred (assuming it only takes a second to send the email, but yes, if it took 2 seconds to send each one, you'd get 30; depends on server, etc.) 

Hello @Abhimanyu Dasarwar, Did you get this to work? I am stuck with similar problem. Any help is much appreciated.

@Haniel Croitoru, Nice article ! Is there a way we can track who has approved when there are multiple approvers and ALL must approve in order for the request to move to Approved state. I want to send reminder to only those who haven't approve yet.

I ended up changing my Flow to a time out and send again like what Jon demonstrates in this video. https://www.youtube.com/watch?v=U4iuVi1Vtgg&t=1s 

Basically my first approval times out in 3 days, then the second one runs after the time out. I couldnt get it to send out the first email until after the delay was met so a day later. 

 

For the tracking who has approved, I used the Update Item to write the response to a column in the share point list. 

2018-07-13_10-39-53.png2018-07-13_10-41-52.png2018-07-13_10-42-16.png

Whats up friends! I have been getting a lot of requests lately to show how to do Approval timeout, escalation and retry. So i decided to put together this video! To build this with me you will need to head over to www.flow.microsoft.com and get registered and signed in. To read a blog post about ...