Locked lesson.
About this lesson
Create a workflow to approve a client document.
Exercise files
Download this lesson’s related exercise files.
6.02 creating-an-approval-workflow - Exercise.docx61.4 KB 6.02 creating-an-approval-workflow - Exercise solution.docx
59.9 KB
Quick reference
Creating an Approval Workflow
Create a manual workflow in SharePoint to automate the document approval process.
When to use
We create an approval workflow whenever we want to automate the process of approving a document.
Instructions
Ensure that the document that needs to be approved has been uploaded to the document library in SharePoint.
- Go to the Document Library.
- Select the document.
- From the horizontal menu, click the three dots.
- Click Automate.
- Click Power Automate.
- Select Create a flow.
A pane will open up on the right-hand side that shows the workflow templates available.
- Select the Request approval (everyone must approve) template.
- Check that all applications listed have a green tick. This means we are signed into them with a valid account.
- Click Create Flow.
- Review the flow details.
- The 28-day run history area logs each time the flow is run.
This workflow is a manual workflow. Manual workflows are triggered by the user. For example, we will trigger this workflow by selecting a document and running the workflow. Automatic workflows are triggered automatically by an action in SharePoint such as a document being uploaded to the document library.
- Go back to SharePoint.
- Click the three dots and select Automate.
- Select the workflow.
- From the Run flow pane, click Continue.
- Type in a message if required.
- Specify who needs to approve the document. Type the approver's name or email address.
- Click Run flow.
An email notification will be sent to the approver or approvers as this is one of the steps in the approval template. The approval workflow will stop and wait for the document to be approved or rejected.
- Go back to Power Automate.
- Refresh the page.
- The flow is now showing in the 28-day run history area. It will show a status of 'Running' until the workflow is complete.
- Click on the workflow name to see the steps in a diagram. Note that the workflow has stopped at the approval stage.
- Click Approve in the Outlook email.
- The workflow is now complete.
- 00:03 So following on from the last lesson, let's take a look at how we can put
- 00:07 together an approval workflow in SharePoint.
- 00:10 Now because this is a document that I want to be approved by somebody else, I need to
- 00:15 make sure that I first have that document available to me within SharePoint.
- 00:21 So I'm going to want to upload it to my document library.
- 00:24 Now if I jump into documents,
- 00:26 I'm going to use one of my existing documents as the example.
- 00:31 And let's use this one here, the Rollout Plan.
- 00:33 I need this to be approved before I can implement it.
- 00:37 So I want to create an approval workflow for this document.
- 00:42 So all I need to do here is select the document and
- 00:45 then using the horizontal menu running across the top.
- 00:49 If I go all the way along to where we have those three dots,
- 00:53 we get our contextual menu drop down and we want to go to automate.
- 00:58 And it's worth noting that workflows in SharePoint utilize the power of
- 01:02 a little application in Office 365 called Power Automate.
- 01:07 And it's also worth noting that Power Automate used to be known as
- 01:11 Microsoft Flow.
- 01:12 So you might be more familiar with that terminology.
- 01:16 So let's select Power Automate.
- 01:19 And then I can choose one of three options.
- 01:22 Now the obvious one that I want to do here is I want to create a flow.
- 01:26 So let's click it.
- 01:27 So now I have this little pane pop open on the right hand side.
- 01:31 And this is going to show me all of my different workflow templates, and
- 01:35 there are a lot of them.
- 01:36 If I click the show more link underneath,
- 01:38 you can see all of the different templates that I have available.
- 01:42 So there are workflow templates for lots and lots of different things,
- 01:46 not just approving documents or signing off on holiday.
- 01:50 I can set up a workflow so that all of my email attachments that I receive
- 01:54 are automatically saved to my SharePoint document library.
- 01:59 Or maybe I want to automatically post a message to Microsoft Teams.
- 02:03 So it's definitely worth having a scroll through some of these different templates
- 02:07 and try to automate any repetitive tasks.
- 02:10 So if I take a look through this list, let's see if we can find a template that's
- 02:14 going to do what I need to do, which is approve a document.
- 02:16 And if I scroll all the way down, you can see right at the bottom, we have
- 02:21 a template here that says request approval everyone must approve for a selected file.
- 02:27 And this is exactly what I want,
- 02:29 particularly if I'm sending to multiple people, multiple managers and
- 02:33 I need them all to approve it for that document is essentially finally approved.
- 02:39 So let's select this template.
- 02:41 So I can see here what it's going to do and I can also see underneath
- 02:45 what applications SharePoint needs access to in order to create this approval.
- 02:49 And right at the bottom here, it's telling me that this flow will connect to
- 02:54 Office 365 Outlook, to the approvals area in teams, and also to SharePoint.
- 03:00 And the thing that's really important here is to make sure that you can see
- 03:05 a green tick next to all of these items.
- 03:07 Because this tells you that you are signed in,
- 03:10 you have a valid account for each of these applications.
- 03:14 If you're not signed in to all of the different applications that SharePoint
- 03:18 needs access to to complete this flow, then the flow isn't going to work.
- 03:23 So make sure that you have a green tick and if you don't,
- 03:26 you will be asked to sign into that application.
- 03:30 Now mine all looks good, so I'm just going to say Create Flow.
- 03:33 And here we go.
- 03:34 Here are the details of my flow.
- 03:36 I can see that it's an approval flow.
- 03:38 I get a description and it's saying that the owner is me.
- 03:42 I can see my connections.
- 03:44 And most importantly right to the bottom here, it says 28 day run history.
- 03:49 Now currently, this is empty, because I haven't run this workflow yet.
- 03:54 But as you start to run it, and you can run workflows over and over again for
- 03:58 different documents, you'll see a history log down here.
- 04:02 Now this is what we call a manual workflow, an instant workflow, i.e.,
- 04:07 it's not an automatic workflow.
- 04:09 Now we're going to look at those in the next lesson but
- 04:12 the difference is that a manual workflow, I have to trigger that workflow.
- 04:17 So I need to go into my document library, select my document, and then run the flow.
- 04:21 Automatic flows are a little bit different,
- 04:24 they are automatically triggered by something that happens in SharePoint.
- 04:28 So now that we have this flow here,
- 04:30 let's send our document through this approval workflow.
- 04:33 I'm going to go back to SharePoint, Rollout Plan is still selected.
- 04:38 Let's go to our three dots down to automate and
- 04:41 take a look at what we have now.
- 04:43 Because we've created that flow I can see it there in the list request approval.
- 04:49 So all I need to do is click to select.
- 04:52 A pane opens up on the right hand side, I need to make sure again that I'm logged in
- 04:56 to all of the relevant applications and then click Continue at the bottom.
- 05:01 Now this is where I can add in some additional options, so
- 05:04 I can type in a message, I can then specify who the approvers are.
- 05:08 So who is this going to go to?
- 05:10 And you want to type in their name or their email addresses in there.
- 05:15 Now once again, because I am all on my own, I'm going to be the approver as well,
- 05:19 so I'm just going to select myself.
- 05:21 I could choose to send approval reminders if the approvers are being a little
- 05:25 bit slow in actioning this request but I'm not going to.
- 05:29 I'm just going to say run flow, and away it goes.
- 05:33 Now because I am the approver I would expect to get a message very shortly in my
- 05:37 Outlook letting me know that there is a document waiting there for me to approve.
- 05:42 I can see that I've got a message in Microsoft Teams in the approvals area of
- 05:47 Teams letting me know that approval is waiting and there is my Outlook email.
- 05:51 So let's jump across to Outlook, and I can see right at the top here,
- 05:56 please approve Rollout Plan.
- 05:58 So as the approver I have a link to the document so I can give it a read,
- 06:02 see if it's correct, and then I can choose to approve or reject.
- 06:07 Now before we decide if we want to approve or reject this document,
- 06:10 let's just minimize down Outlook and let's take a look at this flow.
- 06:14 So I'm going to go back to my Power Automate tab, I'm going to refresh this
- 06:19 page because you should see it has a little bit of a difference.
- 06:24 Because I've now run this flow in the 28-day run history, it's showing me
- 06:28 when it was run, the duration, and what the status is, which says running.
- 06:34 And the reason why this flow is still running is because it's waiting for
- 06:38 the approver to approve.
- 06:39 Remember, I'm the approver and I haven't selected approve or reject as yet.
- 06:44 And if you want to see this process and
- 06:47 see what stage of the approval you're up to in the form of a chart,
- 06:51 all you need to do is click on the workflow in the history area.
- 06:56 And it's going to show you all the steps that this workflow goes through.
- 07:00 And if there's a green tick next to the step,
- 07:03 it means it's been completed successfully.
- 07:06 So what we should find here is as we go down, you see it branches off.
- 07:10 We can see set respond to approval link.
- 07:13 That was the last task which was completed successfully.
- 07:16 And now it's waiting for approval.
- 07:19 So let's go back to Outlook, and I'm going to say approve.
- 07:24 I could choose to type in some approval comments, I'm not going to at this stage,
- 07:28 I'm going to submit my response.
- 07:30 And you should see that this workflow will now complete.
- 07:34 And there we go.
- 07:35 Everything is now green, and the workflow has run successfully.
- 07:39 And now if I go back to the details page,
- 07:41 you can see that the status has changed from running to succeeded.
Lesson notes are only available for subscribers.