Quick and Dirty Document Expiry Solution for SharePoint 2010

26 Oct


This article describes how to create a no code document expiry solution.


In this article, we tackle 2 main issues related to document expiry:

a. Notify users when a document is about to expire, e.g. send out a notification to the creator of the document 2 weeks prior to document expiration

b. On the expiry date of the document, send a notification email to the creator of the
document that informs the user their document has expired. The email should
have a link to the disposal workflow on it that allows the user to either
retain the document or delete the document.

For example:
Consider a Lease Document that is scheduled to expire on 15th December, 2011.
On 1st December, 2011, the creator of the document should receive a notification
email informing him \ her that the Lease Document is due to expire in 2 weeks.
On the 15th of December, the creator of the Lease Document should receive
another email informing him \ her that the document is expired. The latter
email should have a link to a disposal workflow that gives the creator of the
document the option to either retain or delete the document.


We solve the above issues using a combination of SharePoint Designer, Disposal Workflows and Tasks Lists.

Please note that in order to follow this solution, you need to add Expiry Date to the Default Document Content Type. I usually default the Expiry Date to [Today]+730 Days.

A. Notify users when a document is about to expire

1. Create a reusable workflow in SharePoint Designer 2010 called Document Expiry
Notification. The base content type for the reusable workflow should be the Default Document Content Type e.g. IKS Document

– The workflow should be created on the Root of the site

2. Configure the workflow as follows:

2.1 Add the Action: Add Time to Date

– Add (-14) days to the Current Item: Expiry Date, save the output to a new variable, Disposal Notification

2.2 Add the Action: Pause Until Date

– Pause until Variable: Disposal Notification

The configuration of the workflow should be as follows:

2.3 Add the Action: Send an Email

The configuration of the Email should be as follows (Feel free to modify the format of the email):

2.4 Check for errors. If not errors exist, publish the Workflow

3. Add the Workflow to Site Content Types

– Navigate to your Site Content Types (Site Actions -> Site Settings -> Content Types)

– Select the Default Document Content Type e.g. IKS Document

– Select Workflow Settings, and add the Document Expiry Notification Workflow

The Workflow Configuration Settings should be as follows:

– Add the workflow to all the Custom Document Content Types

B. Create a Disposal Workflow that assigns a task to the Creator of the Document

1. Create a Disposal Workflows Task List

1.1 Create a Task List and name it: Disposal Workflows Task List

1.2 Create an alert on the List targeted to all the Contributors of the appropriate Document
Library. Configure it to send alerts to the contributors every time a new item is added to the Task List.

C. Creating and Deploying the Notifcation WSP File

Please note that you could save the workflow as a template, solution file, in a .WSP format. This is helpful if you want to deploy the nofication workflow in various sites. To save the workflow as a .WSP file, navigate to the workflow in SharePoint Designer, and on the ribbon click on the “Save as Template” button.

This will save the workflow as a .WSP file. To add the WSP file, copy the file to the desktop of either your Web Front End or Application Server. Once it’s been copied rename it to “notification_workflow.wsp”.

Run the following PowerShell Command to add the WSP file:

Add-SPSolution -literalpath “C:\Users\Administrator\Desktop\Notification_Workflow.wsp”

*** Modify the path as required

You could deploy the WSP file from PowerShell or Central Administration. To deploy via Central Administration, navigate to Site Settings > Manage Farm Solutions and deploy the solution from there.

To deploy the solution from PowerShell type the following:

Install-SPSolution –Identity Notification_Workflow.wsp –WebApplication http://sp2010 -GACDeployment

*** Modify the Web Application URL

2. Create a Disposal Workflow

2.1 Navigate to the appropriate Document Library

2.2 Create a Disposal Approval Workflow

– Note that Disposal Approval Workflows are a Site Collection Feature that has to be
activated at the Site Collection Level

2.3 The Configuration of the Disposal Approval Workflow should be as follows:

The Disposal Approval Workflow will be kicked off by a retention policy. Therefore, ensure
that the Start on New Item Creation / Change are unchecked

3. Create a Retention Policy

3.1 Navigate to the Document Library Settings

3.2 Select the Information Management Policy Settings Option

3.3 Select the Content Type you want to Configure

– Please note that you will have to configure the retention for each Content Type separately

3.4 Select the Default Document Content Type e.g. IKS Document

3.5 Enable Retention by checking of the Enable Retention checkbox

– Add a policy that starts the Disposal Workflow after [Expiry Date + 0 days]

The configuration of the retention policy should be as follows:

3.6 Repeat steps 3.4-5 for all the desired content types e.g. Policies, Contracts, and Procedures etc.

Note that Disposal Workflows cannot be assigned to individuals or groups. Therefore, once you set up the disposal workflow and retention policy, there is an additional step necessary to actually receive emails from the workflow process.

I set up a simple alert on the task list that holds the tasks generated by the Disposal Workflow. Set is up to send an email to myself whenever a detail is changed.

*** Various customization options are available, we could set up a SPD workflow to compare the title of the Task to the title of the Document and send out an email to the person who created the Document.

3.7 Once a Document Expires, the Contributors receive the following email:

When users click on the: View Disposal Approval: Benefits Document. The following screen comes up.

The contributors can open the task directly from the email, in which case they open the Disposal
Workflow Directly and choose whether to Delete or Retain the Document. They can
also open the expired document from directly from the email and modify the
settings from the Document Information Panel (DIP)


Posted by on October 26, 2011 in Uncategorized


Tags: , , , , ,

22 responses to “Quick and Dirty Document Expiry Solution for SharePoint 2010

  1. Steve Sprauer

    August 14, 2012 at 6:48 pm

    My custom date field does not display in the drop down box in step 3.5. What have I done wrong?

    • Brian Mokaya

      August 16, 2012 at 10:21 pm

      Is your custom date field included in a custom document content type? The scope of the content type has to be at least site wide

  2. Christina Friborg

    August 23, 2012 at 1:07 pm

    What if the Expiry Date on the document is changed. How do you delete the current workflow and create a new one that pauses until the new Expiry Date arrives?

    • Brian Mokaya

      August 23, 2012 at 1:13 pm

      You do not need to delete the current workflow, the workflow is set to run when the document is modified. When you modify the date, a new workflow is started with the new date

  3. Christina Friborg

    August 23, 2012 at 1:34 pm

    I have created a similar workflow that is set to run when an item is created (and the Expiration date is set the first time) and when the item is changed.
    But if I change the Expiration Date the first workflow is still running and a new one – with the new date – is not created.

    • Brian Mokaya

      August 23, 2012 at 5:47 pm

      Not sure what could be wrong, is the workflow set to run both when an item is created and modified?

  4. Adrian

    September 7, 2012 at 4:21 pm

    Thank you for a great article. I nearly have it working apart from one section. At the top level site I’ve created the workflow and associated it with the content type. (3). Now when I go to a subsite library using that content type, I can’t see the workflow. If I go to SharePoint designer it is available as a reusable workflow. What have I done wrong please?

    • Brian Mokaya

      October 5, 2012 at 3:43 pm

      Hi Adrian,

      Sorry for the late reply.

      Have you tried removing the content type and re-adding it, or creating a new document library from scratch and adding it?


    • Brian Mokaya

      October 5, 2012 at 4:10 pm

      Hi Adrian,

      Sorry for the earlier reply. I’ve dug into this issue in more detail.

      An alternative that you could look into is from SharePoint Designer, you could save the workflow as a template (Menu option available in the ribbon). Once you save the workflow as a template, it will be saved in the Site Assets library.

      From there, download the .wsp file and save it on your WFE or App Server. Once there run the following powershell command to deploy the solution:

      add-spsolution -literalpath “<>\Notification_Workflow.wsp”

      From there you could activate the solution from Central Administration > Site Settings > Farm Solutions

      Once deployed, navigate to the Site Settings > Manage Site Features area for the subsite you want to deploy the solution in and activate to site feature. Once activated, it will be available for selection in the document library,


  5. conrad

    September 24, 2012 at 1:15 pm

    The body in your email doesn’t give the title of the file (i.e. [%Current Item:Title%] or the expiration date but it results in the same writing you have put in the email. Is there any other syntax I should use?

    • Brian Mokaya

      October 5, 2012 at 3:41 pm

      Hi Conrad,

      The body of the email on the blog does give the title and the expiration date. The title is also given in the Subject line.

      If you want to include a certain document property in the email / subject field, you would have to click on “Add or Change Lookup” when editing the email message, and select the property under the “Current Item” Data Source


  6. conrad

    September 24, 2012 at 1:20 pm

    Brian, is there a way I can cylce the email notification, i.e. running every week until the date is beyond the limit? TX

    • Brian Mokaya

      October 5, 2012 at 3:39 pm

      Hi Conrad,

      Sorry for the late reply, SharePoint Designer makes it hard to create a cycle between two dates. I will try and create this and get back to you, though we may need to dive into VS to write this

  7. Fanie du Toit

    October 3, 2012 at 1:09 pm

    The Document Expiry Notification only seems to run for Word document and not for any other types of documents such as Excel, PDF, txt, etc. Should I be creating content types all these types??

    • Brian Mokaya

      October 5, 2012 at 3:29 pm

      Hi Fanie,

      Sorry for the late reply. The Document Expiry Noification works for all types of documents as long as they are under the umbrella of the same content type. Please re-test and let me know what happens,


  8. Chris Chan

    October 5, 2012 at 5:50 am

    I cannot find the content types in site setting. A similiar “site content type” has no ” Default Document Content Type” for select

    • Brian Mokaya

      October 5, 2012 at 2:10 pm

      Hi Chris,

      Sorry for the late reply. Do you have your content types in a content type hub? Content types should be available under Site Settings > Site Content Types (Under the Galleries Category),


  9. Chris Chan

    October 9, 2012 at 5:36 am

    I not have content type hub and I can reach the site content types but ” Default Document Content Type” is not found at there

    • Brian Mokaya

      October 18, 2012 at 2:22 am

      Sorry for the late reply Chris,

      The default document content type is the base document content type that comes out of the box with SharePoint. It has 2 columns, Name and Title. You should see it under the Document content types

  10. Chris Chan

    October 17, 2012 at 1:50 am


  11. muneyi

    June 24, 2013 at 9:47 pm

    Brian I followed your steps however i cant get the last two images where I see the workflow message and a user can click to eventually choose to delete or save item. Which parts in your steps enable that. If you try to follow your steps is there a missing step . I am not getting the email connection and workflow right even after following your instructions how can I contact you ?

    • Brian Mokaya

      June 25, 2013 at 2:29 pm

      Hi Muneyi,

      Sorry for the late reply. We need 1 workflow for notification of expiry and the other to dispose of the document. The two forms at the end are driven by adding an alert to the task list. Disposal workflows do not send out emails but they do however create a task in the specified task list. I added an alert on the task list to send me an email whenever there is a new item. As a result of that, I get an email sent to me. You can contact me at if you need further clarification,



Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: