hello folks welcome back in today's video i will show you
how to set up power automate flow to automate the leave requests
and seek the manager approval so stay tuned and let's jump right into the
video after this short intro
i am on a sharepoint site there is a leave request list in sharepoint it has
a title start date and date and leave type very
simple list what i want is when someone create a new
record in this list it automatically get that person manager from the active
directory and send that manager email for the leave approval it's really
important that your active directory is up to date and
all the employees in your organization have their managers
set up you probably need to fix your ad first and make sure all the employees
have manager attribute filled in so i assume that you have
all AD structure up to date so to create a workflow i need to navigate
to power automate so from office 365 i will click on power automate icon
i can create a workflow from scratch or i can search for a template so let's see
if there is any template available so from the left menu i click on templates
i will just type leave requests i can see there are two templates available
request manager approval for leave request
this is exactly what i want so i will click on this template
it is asking for permission on various different applications
i will click on continue okay so the first thing is when an item is
created trigger so which site we know this is the training site and
the list is leave request now get my profile mean
whoever logged in that request this will get that person
profile the next step it has is get manager so whoever is the manager of
that person you're passing the email for that person
so it will get the manager of that person
and the assigned to mail is the person manager email address
that's why we need this email so we can assign it to the right person
so the start approval process please review the title
of that record from sharePoint list assigned to and the detail
and item link is named it's not looking correct so item link
should take you to that sharepoint list record so instead of
name i will select link to item and then item link description
this is we can use same as title so i will select title there
so this has as i said before if the manager is not set for the person
who raised the request it will just send an email notification
that your active directory is not up to date and manager field is not set
if everything goes fine it will wait for this approval outcome
and if the outcome is yes that person will be notified with an
email that your request has been approved
otherwise that person will be notified that your leave request
is rejected so this is all set up i will click save so we can see that
leave request is saved if i go back click ok
i can rename this workflow to leave approval request
and click on save okay now if i go back to
the list in sharepoint i will create a new
leave title because it is an annual leave i will say and will leave request
start date 25th and date is 26 so i'm looking for two days leave leave
type is an annual leave that's it click save now if i navigate
back to the workflow and refresh the page i can see the workflow is
running for the purpose of this demo i just
put myself as my manager so i'm expecting an email for and will
leave to approve so i can see this request is the title and there's a link
to and will leave requests i can click on it this will tell me the
detail the start date and date and leave type so if i'm happy with it i
can just click on approve and hit submit now as i said that i rate the
request as well so i got an email that's the reply back from
my manager that your request for annual leave
has been approved and i haven't put any comment there so
that's why it's empty and if i refresh the workflow page this should show as
completed yeah so the workflow is succeeded just to wrap up this video
today you have learned how easily you can create a leave request
approval process which root the approver to your
manager which is pre set in your id and all this can be achieved
with an out of the box template available in power automate consider
subscribing if you're new to the channel by pressing the red subscribe button
below this video give this video a thumbs up if you found
it useful if you have any queries related to this video or anything
related to power automate in general post in the comment section below
i do review my comments on the daily basis i will be able to answer
thank you