Don’t you wish that Sharepoint would give you a way to approve documents or tasks via email, and not have to login to a VPN to gain access to the corporate intranet site? Wouldn’t it be nice if there was a way to just click a link in the email to approve or reject a task on any device?
This is what a “lazy approval” is. Currently, i know of one company (as of the writing of this post) that has a lazy approval system as a Sharepoint add-in, and this one feature (packaged with many other Sharepoint improvements of course) costs $5,000. Well, I didn’t need all these other features! I just want to reply to an email and be done with it.
In order to make a lazy approval happen, there are going to be three main components to this:
- we will setup a library on the main sharepoint site to accept emails from the users
- we need an approval task in a workflow that will send the task notifications with specific formatting
- we need a workflow developed in Visual Studio 2010 that will parse through an email and approve for the user.
It doesn’t seem too hard, right? In the following posts, we will setup each of these things, i will provide sample code, screenshots and the setup of the items to make this all work.
Setup a library to accept incoming emails
This is a very easy thing to do. In sharepoint central admin, you must have incoming mail setup. In the “system settings” section of central admin, you will click on the “Configure incoming e-mail settings” link.
NOTE: This article assumes you have already setup outgoing e-mail settings properly.
In this section, enable sites to receive email, and set all applicable SMTP settings.
Once you get this setup, then we need to move on to the library that will accept incoming emails. I setup a library called “Workflow Response” at the top-level site as a document library and choose NONE as the document template. I do not show this on the left-side navigation links, since people don’t need to see these emails as they come in.
You will be brought to the mail setup page for the library. Make sure to select the option to “save original e-mail”!!!
Once you have setup the library to accept email, then test it by sending an e-mail message to the address you supplied for the library, in this case firstname.lastname@example.org.
Now we are ready to move on to the next part, setting up an approval workflow in Sharepoint Designer.