SharePoint Designer workflow: Send email when major versions of a document are checked-in

Learn how to create a SharePoint Designer workflow that sends out emails whenever a major version of a document is published.

ADVERTISEMENTS

Scenario

You want to be able to send an email to one or more users whenever a document is checkedĀ into a document library and a major version (e.g. version 1.0, 2.0, 3.0, etc.) is assigned to the document.

Solution

  1. In SharePoint, ensure that versioning (major and minor versions) is enabled on the document library where the documents are stored.
  2. In SharePoint Designer, open the site where the document library resides.
  3. On the File menu, choose New, and then Workflow.
  4. On the Define your new workflow screen of the workflow Designer, type a Name for the workflow, for example SendEmailOnMajorVersionCheckIn, select the document library you want the workflow to run on from the list, deselect the Allow this workflow to be manually started from an item check box, select the Automatically start this workflow whenever an item is changed check box, and click Next.

    Creating a SharePoint Designer workflow and associating it with a document library.

    Figure 1. Creating a SharePoint Designer workflow and associating it with a document library.

  5. On the Step 1 screen of the Workflow Designer, click Conditions, and select Compare <document_library_name> field (here: Compare SPDWorkflow field, where SPDWorkflow is the name of the document library where the documents are stored) from the context menu that appears. The condition

    If field equals value

    is added to the Conditions for Step 1.

  6. Click field and select Version from the drop-down list box that appears.
  7. Click equals and select matches regular expression from the drop-down list box that appears.
  8. Click value and type

    \d.0

  9. On the Step 1 screen of the Workflow Designer, click Actions, and select Send an Email from the context menu that appears. The action

    Email this message

    is added to the Actions for Step 1.

  10. Click this message.
  11. On the Define E-mail Message dialog box, enter one or more valid email addresses, enter a Subject, and then click Add Lookup to Body.
  12. On the Define Workflow Lookup dialog box, select Version from the Field drop-down list box, and click OK. The latter will display the version of the document that was checked in.
  13. On the Define E-mail Message dialog box, click OK.

    The completed SharePoint Designer workflow step.

    Figure 2. The completed SharePoint Designer workflow step.

  14. On the Step 1 screen of the Workflow Designer, click Finish.

Now whenever you check out a document from the document library, modify the document, and increase its version to a major version when you check the document back in, an email is sent to the user(s) you specified in your SharePoint Designer workflow.

Related Articles

ADVERTISEMENTS