In this SharePoint workflow tutorial, I will demonstrate how to create a leave request approval workflow using SharePoint designer 2013 in SharePoint Online Office 365.
In every organization, there is a need to follow a process to track leave history for employees. So here I am using a workflow to send approval to the manager for taking a leave.
For designing this SharePoint designer workflow, I am going to includes three things here.
- SharePoint List ( Requesting for leave)
- Task list ( Create a task for approving or reject)
- Workflow History List (track all history of the workflow)
SharePoint designer 2013 leave request workflow
Below is how the leave request approval flow will work in SharePoint.
First, an employee creates a leave request in the SharePoint list. Then the request will go to her/his manager for approval. Then if the Manager Approves the leave request, then anĀ Email is triggered to all stakeholders required. Workflow closes.
Steps to create leave request workflow in SharePoint designer 2013
Step 1 : Here I have created a list called “Leave request” in my SharePoint Online site. The list looks like below:
Step 2: Open SharePoint Designer 2013 and create a list workflow for the same SharePoint Online list.
Step 3: Enter the name of the workflow and choose SharePoint 2013 workflow platform type and click on the OK button to go ahead.
Step 4: Next it will appear a empty page where you can start designing your SharePoint workflow.
Step 5: In this step, we need to edit the Stage 1 to “Required Manager Approval” and set the approval status to click on the Action menu in a tab.
Step 6: Next set the message to “Pending manager approval” in message section in the action.
Step 7: Next add a log history to track your workflow logs so that we can audit it later.
Step 8: Next set due date of the approval by using action “Add time and date“.
Step 9: Create a workflow variable Due Date and add an action in order to add 5 days from the current date to the due date.
Step 10: Create a task where we will assign a task to specific person for approval.
Step 11: Click the current item in the steps and add the manager name to approve the task in participant section.
Step 12: Next click on task title to add the request name as below screenshot.
Step 13:in description section add the details as per below image.
Step 14: Add the due date of task which we have set in previous step.
Step 15: Next go to Email option and edit the email section in task creation section.
Step 16:Next click on OK to go next step.
Step 17: Add a condition in the next step, check if outcome of the task is Approved or Rejected.
Step 18: Net Set the workflow variable and value as approved in the step.
Step 19: Next log to the history list after task got approved and set the workflow status as approved and send an email to user as your leave is approved.
Step 20: Set the condition if your leave get rejected by your manager.
Step 21: Next end the workflow and publish it .
Step 22: Now the workflow is complete, click on the save button and then click on Publish.
You can get task list in Assign task list and by default history will save in Workflow history list but we can able to change the task list name and history list.
Step 23: Here I send an request myself as a manager and I got an email for approval.
Step 24: When the manager clicks on the link, the task will open where the manager can Approve or Reject the leave request.
Step 25: Once the user will click on the Approve button, Requester will get an approved email. The same for task rejection.
Step 26: you can also find the task details and workflow history details in below image.
Now the SharePoint Leave request approval workflow is ready. Then you can deploy SharePoint designer workflow to other production sites.
You may like following SharePoint designer 2013 workflow:
- SharePoint Online Site Workflow and Initiation Form Parameters example using SharePoint designer workflow
- Delete list item after specific duration using SharePoint designer workflow
- Set People Picker field to empty or blank in SharePoint designer workflow
- How to add edit task form url inside SharePoint 2013 designer workflow email?
- How to Trigger Sharepoint 2013 Designer workflow on a list item by calling REST API using jQuery?
- How to send an email using designer workflow in SharePoint Online or SharePoint 2013?
- Calling Rest API from A SharePoint 2013 Designer Workflow
- App Step in SharePoint 2013 Designer Workflow
- Deploy SharePoint 2013 designer workflow to a different site in SharePoint 2013
- Business Process Automation through SharePoint
Hope this SharePoint designer workflow explains how to create a leave request approval workflow using SharePoint designer in SharePoint Online or SharePoint 2013/2016/2019.
Rajkiran is currently working as a SharePoint Consultant in India . Rajkiran having 7+ years of experience in Microsoft Technologies such as SharePoint 2019/2016/2013/2010, MOSS 2007,WSS 3.0, Migration, Asp.Net, C#.Net, Sql Server, Ajax, jQuery etc.He is C#Corner MVP (2 Times).