Lazy Approval with SharePoint – approve task via email part 1

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:

  1. we will setup a library on the main sharepoint site to accept emails from the users
  2. we need an approval task in a workflow that will send the task notifications with specific formatting
  3. 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.

central administration - system settings

In this section, enable sites to receive email, and set all applicable SMTP settings.

system settings pageYour IT department or mail administrator should be able to help you get this setup properly.

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.

Next, go to library settings and click the “Incoming e-mail settings”.incoming e-mail settings

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 sharepointsite@server.domain.local.

Now we are ready to move on to the next part, setting up an approval workflow in Sharepoint Designer.

____________________________________________

Part 2: http://realworldsharepoint.wordpress.com/2012/06/28/lazy-approval-with-sharepoint-approve-task-via-email-part-2/

Part 3:  http://realworldsharepoint.wordpress.com/2012/06/28/lazy-approval-with-sharepoint-approve-task-via-email-part-3/

About these ads

8 thoughts on “Lazy Approval with SharePoint – approve task via email part 1

  1. Wendy Peeters May 22, 2013 at 12:32 pm Reply

    Hi George,
    Does this solution also works for SharePoint online 2013 with Office 365?

    • george hardy 4 May 22, 2013 at 2:16 pm Reply

      I see no reason why this wouldn’t work on sp2013 online. you have access to central admin, which is where you would manage solutions. however, I use the powershell to install the solution file, and I don’t know how you would do this with an online sp implementation, so that is something you would have to research. also, when I get some time, I will be updating this article to use an event receiver, which is a much better choice for this kind of functionality (thanks to previous commenter I now know this).

      good luck!

  2. Chris August 27, 2013 at 6:07 pm Reply

    Does this work for users who are outside the domain? In your example the email address to be used is sharepointsite@[server-name].[domain] in my setup the servername.domain is not accessible to the outside world. I created an email account sharepoint@domain.com and would like to use this account. Is this possible?

    • george hardy 4 August 27, 2013 at 8:44 pm Reply

      it depends how you setup the email receiver in central admin. short answer, yes. in central admin, on web application configuration, you will set outgoing mail settings to be your public domain (sharepoint@mycompany.com). I believe by default it sets up the email as an internal address (like sharepoint@mydomain.local). if you change it, then the email can be received from the outside, and therefore, process from any recipient you have setup for the workflow approval tasks.

    • george hardy 4 August 27, 2013 at 8:52 pm Reply

      depends how you setup the outgoing email in the web application configuration. yes, this does work from the outside, as many of my users use an iphone that isn’t on the domain. make sure the task recipient is valid and that your outgoing mail settings are configured for a public email address (like sharepoint@yourcompany.com vs. sharepoint@mydomain.local)

  3. Kim October 23, 2014 at 5:28 pm Reply

    Will this work if my Exchange is Online?

    • george hardy 4 October 23, 2014 at 6:27 pm Reply

      i’m not sure about office 365 integration. you have to have sharepoint integrated with exchange somehow, or task notifications won’t ever be sent for workflows or library alerts. as long as you can get the workflow library in SP to receive emails, you should be good.

      geo

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: