Here I have a SharePoint document library and I want when a user uploads a document to the document library, it will go for approval and once the document got approved then the document should appear in the document library. If the approval got rejected then it should not show the document in the SharePoint document library.
We will use here the default our of box approval workflow which is presented in SharePoint 2013. If you are not able to see all the default workflows when trying to add a workflow in the browser then check out an article on Not able to see all out-of-box workflows in SharePoint 2013 Online Sites.
First, create a document library using the standard document library app template. Here my document library name is “MyTestDocLib”.
Then in the next step, we will enable the content approval for the library. For this Open your library got to the library settings. In the Settings page, click on Versioning settings under General Settings.
In the Versioning Settings page, Select Yes radio button in the Content Approval section. Then in the Document Version History section select radio button “Create major and minor (draft) versions”. Then in the Draft, Item Security section select the radio button “Only users who can approve items (and the author of the item)”. Then click OK as shown in the fig below:
After this open the document library to create the document approval workflow. Then From the Ribbon click on the LIBRARY tab and then go to the Settings section on the right side, then Click on Workflow Settings -> Add a Workflow.
This will open the Add a Workflow page. Here Select the workflow template as Approval – SharePoint 2010. Then give a unique name for the Workflow. Then select your Task List, Workflow History list. Then in the Start Options, choose the options on which you want the workflow to be started.
Here select the “Start this workflow to approve publishing a major version of an item” radio button. To allow users to manually approve an item I have selected this radio button also “Allow this workflow to be manually started by an authenticated user with Edit Item permissions“. See the fig how it looks.
Then click on Next. Then on the next screen, it will allow you to assign Approvers, Due date for a task, comments for approvers, etc. So in the next screen customize something like below:
You can put the approver and also you can put some comments on the approver. Make sure you checked the checkbox “End on first rejection”, so that when the item goes rejected it will end there. Then click on Save.
Now the workflow is successfully attached to the document library. You should be able to see like below:
Now let us go to the Document library and upload a document to it. The item will be available to the creator and the person who has permissions to manage lists and libraries can see it. For other users, the item will not be available.
When a user uploads a document, an email will be triggered to the person you have configured in the workflow. When a user opens the email, S/He can open the task by clicking on the task title or from the Open this Task button from the Ribbon in the email.
Due to some constraints, I will not able to show you the email, here I am directly opening that task. When you open the task, you will be able to see a screen like below, where you can Approve, Reject, Cancel, etc.
Once you approve the document will appear for everyone who has read access to see the SharePoint 2013 document library.
You may like following SharePoint workflow tutorials:
- Approval Workflow in SharePoint Online with example
- SharePoint designer workflow examples : Steps to create a Leave Request SharePoint designer workflow in SharePoint Online
- Create a Leave request approval workflow in SharePoint using Out of box workflow
- Create a Leave request approval workflow using Microsoft Flow in SharePoint Online
- Create a Leave Request Approval Workflow using SharePoint Designer 2013
- How to hide approve reject workflow approval button from ribbon in SharePoint online using css?
- Microsoft Flow Send approval email when a new item is added in SharePoint Online Office 365
- SharePoint 2013 approval workflow template missing after migration
In this tutorial, we learned how to create a document approval workflow in SharePoint using SharePoint out of box features.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com