hello folks welcome back in today's video i will show you
how to set up a workflow approval process with multiple reminders
using power automate so stay tuned and let's go to the demo after this short intro
one way to set up reminder emails in power automate workflows is to create
a parallel process next to the approval process
then we add some delay and at the end of the delay period
check if workflow approval process is not completed
then send a reminder email but there are a couple of drawbacks of using this
process first the workflow will wait for the
delay period even when the approval is complete so the workflow process
will run for longer than required secondly
the reminder email will only contain the message like you have not
action on the last approval email the email itself cannot contain the approval
adaptive card to action this can leave approver person in a
place where they must search for the original approval email
and perform action on it alternatively we can use
do until control and set the approval action to expire
for example seven days expiry on the approval process
once expired we can restart the same approval process for
n number of times let's see in action how we can achieve this
process via power automate workflows i'm in office 365
from the left-hand menu you can see the power automate
application icon if you don't see it here click on the three ellipses
and then go to all apps and then if i scroll down
i will see the power automate application icon listed here so if i
click on it this will take me to the microsoft power automation home
page if i click on create from the left menu
and i want it to be created in automated flow so when an item is created for
example in microsoft list then it should initiate this approval
process so click on automated flow i'm just calling this flow approval with
reminders and the trigger will be when an item is
created in a sharepoint list or microsoft list in my case i'll
click on create now the first step is i need to connect
this to a list i have a contact list here which is
sitting on this campaign management site so if i just copy the link from
here and if i go here and enter a custom
value select the site and then i can select a
contact list here that's the list i want to run the
workflow when a new contact added goes for an approval okay and the next
step is i want to initialize two variables
here one variable will be a boolean type which we can use
in the do until loop to check either the person have action on the approval
process or not and the second variable i'm going to create is going to
be an integer to just check how many times we need to
run this reminder email and we can increment the
integer by value of one every time a new reminder
email gets sent so i will initialize those variable click on next step
i will select initialize variable so the first variable let me just
rename it so just renaming the header then i will call it action type boolean
and the default value of this one is i will set it to go to expression and
then type false select false and say okay so it's not
been actioned yet so the approval process not been action
yet so i'm just keeping it false and the next variable i'm going to
initialize another variable this will be an integer variable
let me just rename the header i will just call it reminder counter
and then i'll make this as integer and the value of this one will start from
zero okay now the next step i need to do is i need to create
a do until condition here if i click on next step
and i need to select do until control now i need to say that if the action
value is equal to true until unless the action
value is equal to true just keep looping through this so i've
select the action variable but you can see this is grayed
out for some reason i need to go to advanced mode click here and then go to
basic mode and then this value is available to select so i
will say equal to choose a value if i go to expression i
will select true here and select ok now what i'm
saying is that if the action is equal to true which
means that unless the approval process is completed
by that person repeat this loop whatever actions are in
this loop repeat them the next thing we need to do
is we need to start an approval process so if i
click on next step here so i will select start
and wait for an approval so the approval type i will just keep it
first to respond just keep it simple and the title
i'll just call it contact approval assigned to for this demo purpose i will
just assign this to myself and the link to item i will just put
link to item i will select that and the description i will just select the title
of that contact or maybe i will select the first
name space last name for example okay so that
approval process is started one mistake i did is that
i've started this approve process outside of do until loop
i should be selecting this one but never mind you can just drag this one
and drop inside the do until loop so until this condition is true repeat
this step and now next thing we need to do is we
need to set this counter because we have started
once the already approval process so we can
set the counter to one but before that we need
to set the timeout value for this approval process so let's say
for example if someone did not respond to this in let's say seven days
we want to send another reminder so you go to these three ellipses and
click on settings and then in the duration if i click on
this icon here it's saying specify duration in iso
8601 format by default you can see the example is p1d which means that
it will time out after one day so for this testing
purpose rather than doing p7d which will be seven days i will say pt2m
which means that it's going to be two minutes and then every two minutes
it will send another uh reminder email so i will click on that done so we have
done this step next step is we need to increase
this reminder counter variable by one so
if i click on add an action inside this two until loop
we can increment variables so if i click on increment variable because it's the
integer variable we can increment the value
from the drop down or select reminder counter we increment the value by
1. in the increment variable i want to make sure this action
config rule are set properly so it should run after
the successful of approval or also if the approval has timed out so if i
select them both and click on done next thing is i want
to add a condition so the condition control i will select
and i need to check two values first value is approval outcome is not
equal to null so either is approve or reject but not
no in that case that we know that if it's null
then the approval haven't replied to the first email
hence we sending the reminder and we also need to check another condition
which is add row and instead of and i will check all conditions
either one of them is true we can go into this section and second condition
is if the reminder counter is equal to for example if you want to send one
email and then two reminders we can set this
equal to three because after sending the first email we are setting the
variable incrementing it by one and then it will be further two reminders
and then after that it will come into this condition so here we
need to set the variable action variable to
true so we can come out of this do until loop so the set variable action
is equal to expression and i will type true select true
so we'll setting the value true so we can come out of this do until loop
in either condition if outcome is not null which means that
the approval have replied to the first email or the reminder email
or the reminder actually exceed the number of values
of three which means that we only sending first email and two
reminders and we wishing to come out you can enhance this workflow by adding
uh other scenarios like if the approval outcome is approved then
do this if reject then do this and if is um if
after three tries person does not approve it
then send email to the person that will try to reach you three times for this
contact approval but we haven't received any reply so we
are just terminating this workflow so for testing purpose this is
enough i think i'll click on save now i will go back to contact list and create
a new contact i just created a new dummy contact here
i will click on save this should initiate the workflow
process now we can see the workflow has started it's running and i have received
the first email contact approval email i've set two
minutes timer for the approval process so i'm expecting another
reminder email after two minutes so i want action on this first email i will
actually action on the reminder email i will pause this video
for now and i will resume it after i receive the reminder email
now i've received another email this is exactly after two minutes of the first
email so this time i can go and approve this
workflow process before i do that i will show you on
the workflow history that is in the do until loop
and it's just looping through it until unless someone approve it
or it send the max number of reminders so i will click on submit so i'm
approving this time if i go back to the workflow now you can
see that the workflow is completed so it came in first time
send approval increment the variable by one and then
the approval ran out and it checked the condition so
the condition did not met so it did not set the action variable to true and then
if i go to next do until section it send the
reminder email so it initiates the same process again and it increment the value
by one so the value is two now but this time
i have replied to this reminder email and approved this process hence it set
the action variable to true and the workflow come out of the do until loop
so just to wrap up this video today you have learned
how to set up a workflow approval process on Microsoft lists
with multiple reminders using power automate
thank you very much for watching this video consider subscribing if you're new
to the channel by pressing the red subscribe button below this video
and click the notification bell icon so you don't miss any of my future videos
as i upload new videos every week give this video a thumbs up if you found
it useful if you have any questions regarding this topic or any other query
related to office 365 post in the comment section below i
review my comments on the daily basis i will be happy to answer. Thank you