In this SharePoint workflow tutorial, we will discuss a SharePoint 2013 workflow example. Specially, we will see how to create a leave request workflow using SharePoint designer 2013.
- What is a designer workflow in SharePoint?
- What is the advantage of a SharePoint designer workflow?
- How to attach a workflow to a SharePoint list?
- How to create a workflow using SharePoint designer2013?
- How to create a leave request workflow using SharePoint designer 2013
- sharepoint workflow examples
SharePoint Online tutorial contents:
- What is designer workflow in SharePoint?
- Advantage of SharePoint designer workflow over Out of box workflows
- SharePoint 2013 workflow example
- Create a leave request workflow using SharePoint designer 2013
- Create an approval workflow in sharepoint designer 2013
- Save and Publish SharePoint designer 2013 workflow
In an organization, we can use a SharePoint workflow to automate the business processes. SharePoint Designer workflow is a sequential step by step process used to automate a business process in an organization.
We can create a workflow in SharePoint Online and On-premise using the following methods.
- Using Out of box workflow
- Using SharePoint designer workflow 2013
- Using Visual Studio
- Using a 3rd party tool
Here we will discuss how to create a workflow using SharePoint designer 2013.
If you are developing workflows using the out of box workflow templates then we can do much customization. But if you are using a SharePoint designer workflow then you can customize a lot in the workflow.
As per our business requirement, we can use various workflow actions and conditions that are present in the SharePoint designer workflow to create a workflow.
If as per our business requirement there are SharePoint designer 2013 workflow conditions and actions are not available then we can design using visual studio 2017/2013. Some of the SharePoint designer 2013 workflow actions are:
- Send an Email
- assign a task
- Add a Comment
- Log to History List
Before looking at sharepoint workflow examples, let us see the advantages of SharePoint designer workflows over the SharePoint out of box workflows.
SharePoint out of box workflow is a predefined inbuilt workflow provide by Microsoft. Some time as per our business requirement the out of box workflow is not suitable. We can’t customize the out of box workflow.
There are various out of box workflow templates are available like below:
- SharePoint approval workflow
- Collect feedback workflow in SharePoint
- Collect signature workflow in SharePoint
- SharePoint publishing approval workflows
- SharePoint three-state workflow
If the business requirement does not fulfill the business requirement then you can create SharePoint designer 2013. Later in this article, we will see a sharepoint 2013 workflow example.
SharePoint designer workflow provides different actions and conditions. If the action is not available as per our requirement then also using visual studio we can develop the action.
There are various sharepoint workflow examples available over the internet, for let us start step by step one here. Now, we will see a SharePoint 2013 workflow example. Here we will create a leave request workflow using SharePoint designer 2013.
Here we will create an approval workflow in SharePoint designer 2013.
Let’s take a SharePoint designer 2013 workflow example, of a leave request approval workflow. The business logic will be like below:
Employees will apply for leave in a SharePoint list form with the leave duration and the reason for leave.
Once user submits the leave request form, an email will be triggered to the initiator as well as to the Team Lead.
Based on the Team Lead’s action, an email notification will be triggered.
If the Team lead approves the Leave Request, the initiator and the immediate manager of the Team Lead will get a notification about the Approval.
If the Team Lead Rejects the Leave Request an email notification will only go to the initiator.
Suppose the Team Lead Approves the Leave request, the immediate manager will get a mail notification about the Leave request and the Team Lead’s action.
Now the manager needs to perform Action on the Leave request and based on which another set of mails will get triggered to the concerned person.
If the manager approves the request, an email notification will go to the initiator, Team Lead, and HR team.
And if the manager rejects the Leave request, mail notification will be sent to the initiator and the team leads.
Suppose the manager approves the request the HR team will have to perform the same action of approving or rejecting the leave request.
If the HR is okay with the Leave Request, he/she can approve the same the mail will trigger the manager, team lead, and the initiator.
The Leaves of the initiator will be updated in the back-end system.
If the HR rejects the Leave Request, the Workflow will end and mail notification will be sent about the same to the manager, team lead, and the initiator.
We will achieve all the steps by using a SharePoint online workflow example.
Now, we will see step by step how to create an approval workflow in SharePoint designer 2013.
For creating a workflow using SharePoint designer workflow 2013 follow the below steps.
Step-1: First create a SharePoint Online list. For this example, I have created a SharePoint custom list as “LeaveRequestProcessWF”. This list contains the below columns.
- Title – Singleline of text
- LeaveType – Choice
- DateOfFirstDayOfLeave – DateTime
- DateOfLastDayOfLeave – DateTime
- ReasonForLeave – Multiline textbox
- ManagerName – People and Group
- LeadName – People and Group
- HRName – People and Group
We want to attach the workflow in the “LeaveRequestProcessWF” list.
Step-2: Now, we will see how to create a Workflow using SharePoint designer 2013.
If you have not installed SharePoint Designer 2013, you can download and install SharePoint Designer 2013 which is a free tool. You can follow how to download and install SharePoint designer 2013.
Open SharePoint Designer 2013.
Click on “Open Site” on SharePoint Designer 2013 start page as like below.
Step-3: Enter the SharePoint site that we want to connect. For example, here I want to open in ” https://onlysharepoint2013.sharepoint.com/sites/Raju” site. Click on Open.
For example, we want to open in “https://onlysharepoint2013.sharepoint.com/sites/Raju” site.
Step-4: After clicking on Open wait for some time. The below page will come.
step-5: From Navigation Click on Workflows like below. You can see a few workflows if you already have created any workflows.
Step-6: After click on “Workflow” in the right side corner we can see the “List Workflow” option click on the “LeaveRequestProcessWF” list which I had created in SharePoint.
Step-7: This will open the Create List Workflow dialog box.
Enter the SharePoint list workflow Name, Description, and Choose the Platform Type.
- SharePoint 2013 workflow
- SharePoint 2010 workflow
If you do not see the SharePoint 2013 workflow platform type, then make sure to Install and configure workflow manager SharePoint 2016 step by step.
Then Click on OK.
Step-8: Now we will get a page like below. Here you can add sharepoint designer 2013 workflow conditions and sharepoint designer 2013 workflow actions.
After creating the new Designer Workflow a page will come like below. The designer page contains 2 stages.
In Stage 1 the workflow will start and end at the Transaction stage.
Step-9: In the First Stage of workflow which is Stage 1, when you move the cursor under Stage 1, you can see an orange color line will be showing like the above figure. Just double-click on that line. Then a box will appear, Here now you can start typing or you can use the insert group which is present in the Ribbon.
For filling that box in Stage 1, Just click on Action from the Ribbon. After clicking on “Action”, It will show several numbers of workflow actions. Click on “Log to History List“.
We will use the Log to History List workflow actions to track some message at the beginning of the workflow.
Step-10: After add “Log to History List”, It will show the “message”. Instead of that “message”, we can write a message on the Workflow History list. This Log to History means it is the entry of the SharePoint History list.
Step-11: Click on the message we can get a box where we can write the message. Here I have written the message as “WorkflowInitiated”.
Step-12: Below the “WorkflowInitiated” message we will see an orange line while moving the cursor below the “WorkflowInitiated”. Click on the orange line then click on action.
From the Actions, Select Send an Email workflow action, that will help us to send an email notification to the User or Employee that his/her Leave Request successfully submitted.
Step-13: We can see ” these users” after adding the “Send an Email” action.
Step-14: After clicking on “these users” we will get “Define E-mail Message” box. Click on Search field which is present at the right side of the “To” field. We will get a “Select Users” page. Then we have to add the user as “Workflow Looking for a User”.
Now we will get a new page “Lookup for Person or Group” for adding Person or Group. In the “Lookup for Person or Group” page, we will see “Data source”, “Field from Source” and “Return Field”.
- Data source -> Current Item
- Field from source -> Created By
- Returned field as -> display name
Because I want to see the display name of the user. Click on OK.
After clicking on OK. We can see the “Created by” is added to “To” field.
In the Subject field which is below the “To” field, I have written that “Your leave request submitted successfully”. Then write something in the body part, so that the Employee should know about the current status of his/her Leave Request.
Here I gave, “Click here”. I want to give the “Click here” as Hyperlink. The user or Employee will know details about the leave request. To give the “Click here” portion as Hyperlink Select the portion as much as you want to give the link and then go to the “Link” option which is present at the right side of “Automatic”.
Here an “Edit Hyperlink” box will appear. It will show you the “Text to display” and “Address”. Just go to the “Address” option which I was highlighting in black.
Then a “Lookup for String” box will appear. In that box, Give the “Data Source” as “Workflow Context” and “Field from source” as “Current Item URL” and then click on “Ok”. Then the Hyperlink will be created for some portion of the body part.
Step-15: After the employee gets an email that his or her leave request is submitted successfully. To assign a task to team lead now add another action “Assign a task” which is under the “Task actions”.
Step-16: While assigning a task we will see “this user”. Click on “this user” we will get “Select Task Participants” box. This box has below the field
- Task Title
- Due Date
When we clicking on the Participant field we will get the Select User page. In The Select User page “Type a Name or Email Address”.
Here we can give the name or Email address or we can select from the”Or select from existing Users and Groups”.
I have chosen “Workflow LookUp for a User”. “Lookup for Person or Group” box. This “Lookup for Person or Group” field contains the Data Source field. In the Data Source field, I have chosen “Current Item”.
Below the “Data Source field” we will see “Field from Source” field. From the drop-down, I have chosen “Lead name”.
In “Return field as”I have chosen from the drop-down as “Display Name”. Click on Ok.
Below “Participant” we can see “Task Title”. While clicking on “…” we will get a” String Builder field”. Click on Add or Change lookup” we will get the “Lookup for String” page. This “Lookup for String” page contains “Data Source”.
- Data source: Current Item
- Field from source: LeaveType
- Return field as: As String.
Below the Task Title, we can see the Description field. In the “Description field” I have given the description as “This workflow is used for leave approval”.
In Due date field, we can give the last date of work. Click on ok.
Step-17: We can able to see then assign a task to Current Item:Created by.
Within the bracket, we can able to see Task outcome and task id.
The task outcome is stored in Variable:outcome and the task id store to variable Task ID3.
Here the Task outcome value is stored in Variable:Outcome3 and task id to Variable:Task id.
Here we have to put a condition. I have put “if any value equals value” condition.
In the if clause we can see 2 value. Click on the first value. By clicking on the first value we can see a small box while clicking on fx we will get “Define Workflow Lookup” page. In the “Define Workflow Lookup” we can able to see two fields.
Data Source: I have chosen in the Data Source field drop down as Workflows “Variables and Parameters”.
Field from Source: In the”field from source” choose from the drop down Variable:Outcome3.
Which is present on the right side of the dialog box. Store the “variable” in “value”. In the second value, we can see two option”Rejected” “Approved”. Choose any one of them.
Below the if statement we can able to see orange line click on that to add “Else Branch”
Using if else and some of the action I have designed the entire workflow like below.
Transition stage is the end of the workflow. In below of transaction stage, we can see a new box. Click on Go. Then click on End of the workflow.
Now, let us see how to save and publish the SharePoint designer 2013 workflow?
Once the workflow is created, click on the Save and Publish button from the ribbon to Save and then publish the SharePoint designer 2013 workflow to the SharePoint Online site.
To test the workflow, you can add an item to the SharePoint list, and then you will see the email will be triggered to the lead and the initiator.
The lead will receive a task to complete. If the lead approved the task, then you will see another task will be created for the manager.
If the manger rejected the task, then email will be triggered to the initiator as well as the team lead.
Finally, once every task will be complete the SharePoint designer 2013 workflow will get complete.
You may like following SharePoint designer workflow tutorials:
- How to open directly workflow task list edit form in SharePoint task list?
- SharePoint 2013 Workflow Impersonation step missing in Designer
- Difference between workflows and event receivers in SharePoint
- How to Create Workflow History List using PowerShell or using SharePoint Designer 2013
- Deploy sharepoint 2013 designer workflow into production in SharePoint online
- Errors were found when compiling the workflow. The workflow files were saved but cannot be run error in SharePoint online designer workflow
- SharePoint designer 2013 Workflow: Assign task to group using Assign a task workflow action
- Start a task process SharePoint designer 2013 workflow action
- Copy Document SharePoint Designer 2013 Workflow Action
- SharePoint designer workflow: Create Laptop Request Approval Workflow
- SharePoint Designer 2013 Workflow: Do Calculation Action Example
I hope you understand what is a SharePoint designer workflow, advantages SharePoint desiger workflows over the out of box workflows in SharePoint.
Also, we saw a sharepoint 2013 workflow example and how to create an approval workflow in sharepoint designer 2013 for SharePoint Online list. The SharePoint designer 2013 workflow example is all about how to create a leave request workflow using SharePoint designer 2013 and attached to a SharePoint Online list.
Additional search tags: sharepoint designer workflows, sharepoint designer workflow examples, create workflow in sharepoint designer 2013 step by step, sharepoint workflow examples, sharepoint 2013 workflow examples, types of workflows in sharepoint 2013, how to create a workflow in sharepoint 2013, sharepoint 2013 create approval workflow, create sharepoint workflow, how to create a workflow in sharepoint 2013, how to create workflow in sharepoint office 365
Hello Everyone!! I am Bhawana a SharePoint MVP and having about 10+ years of SharePoint experience as well as in .Net technologies. I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools. Now exploring more in SharePoint 2016 🙂 Hope here I can contribute and share my knowledge to the fullest. As I believe “There is no wealth like knowledge and no poverty like ignorance”