, ,

This post will address a request from reader Moses.  Here is the request:

“Hi Rebecca can you give dummies step by step guide on how to add a workflow please? Basically i am trying to send an email notification to the author of a policy document 30 days before the policy expiry date. I already have these fields in the list as mandatory fields..“Expiry date” and “Author” (which is username from Active Directory)I will really appreciate if you can help me on this… with a step by step approach on what i do on Sharepoint Designer 2010 and how i active this work flow to work? I have looked at various website, but they go into more complex workflows.. i just want something simple as that explained in a very very basic way as i am very new to Sharepoint and Designer.

Kindest Regards


Based on the request above, here are the requirements for the workflow:
  1. Create email notification to send to Author of Document
  2. Send email 30 days before Expiration Date
  3. Author and Expiration date are columns in SharePoint
  4. Use SharePoint Designer 2010

Here are the steps.  I am actually in SPD 2013, but will create a SPD 2010 workflow.  So the screen shots may appear a little bit different – but should function the same.

1) In SP 2010 document library, create a new Calculated Column to determine what the date will be 30 days prior to Expiration Date.  I am calling this column “30 Days Prior”.
  1. Navigate to SharePoint Document Library
  2. Library Settings > Create Column > Calculated Column
  3. Name the Column > In Formula put this text    =[Expiration Date]-30    
  4. Make sure the formula is =[Select Your Column Name for Expiry Date] – 30
  5. Select Date Only type > Save

Calculated Column

2)  Upload a new document to the SP Library and check to make sure the “30 Days Prior” Calculated Column is functioning correctly.

30 Days Prior


3) Open SharePoint Designer
  1. Click Open Site
  2. In the dialog box add the url of your site (without the document library portion), just to the root – something like this: https://yoursharepointportal/sites/sitename/ in the Site Name field and then click Open
  3. Once the page opens, click on Workflows on the left side navigation
  4. On the top menu bar select List Workflow (this is how you will associate the worflow to the correct list or library)
  5. Select the correct library name > a dialog will open, Name the Workflow
  6. Then the Text Designer opens with the area to create the Workflow Logic – it will open with Step 1 already in place
  7. I called my Workflow  – “30 Days Notice”
  8. You can rename the Steps by clicking on them (optional)


4) Create the Workflow Logic

  1. Where is says “Start typing or use the Insert Group on the Ribbon” is where I begin adding the logic.
  2. Select from top menu Conditions > select “If any value equals value”
  3. Click the first hyperlink “value”, then the fx button, a dialog opens
  4. Next in the dialog, change the Data Source from “Current Item” to “Workflow Context”
  5. Then change the Field From Source to “Association: Start on item Creation”
  6. Then select the second blue hyperlink “value” to “Yes”

Add Condition    Workflow Context

This tells the workflow to run if the Start Option check box “Start workflow automatically when an item is created” is checked.  This is found by click on the name of the workflow. Make sure to Save when asked. Then check the box “Start workflow automatically when an item is created”.  To get back to the workflow logic, click Edit Workflow link on the left box under Customization.

Edit WF

5) Continue building the workflow logic
  1. Point the cursor in the next space where it says “Start typing or use….”
  2. Type the word “Wait” then hit Enter
  3. You get a list of Actions to select from > select “Wait for Field Change in Current Item” (this allows you to select from your SP columns already created)
  4. Then click the first hyperlink “field” and a list of your columns in the document library should appear > Select the Calculated Column I created called “30 Days Prior”
  5. Now click the second hyperlink “value” and the first box with the “…” to open the date dialog >the Date dialog defaults to Current Date selected, hit OK
  6. Now the statement should read: “Wait for 30 Days Prior to equal Today”
  7. Point your cursor in the next space available where it says “Start typing or use….”
  8. Type the word “Email” and hit enter > the statement will now say “Email these users”
  9. Click the hyperlink “these users” > Define Email Message Dialog will open

   wait for change Email dialog

6) Create Email message
  1. On the To: line of the Email message, click the Address Book icon on the right
  2. Select “Workflow Lookup for a User” > Add > Another dialog box opens
  3. In the Lookup for Person or Group dialog > Leave it on “Current Item” for the Data Source ; Select “Author” for the Field from Source ; and “Display Name” for the Return field as > OK >OK
  4. Now create the email subject by clicking the box with “…”  You can add text here, as well as fields from your SP library, such as the title of the docuement
  5. Now create the email body.  To add a field in the body of the text, click the button on the bottom “Add or Change Lookup” – for this example I added the “Title”.
  6. Then I added the Expiration Date in the body.
  7. To add the document item URL > click on the Link icon > Type the name in the Text to Display field> click the “…” box for the Address > in the String Builder dialog, click the Add or Change Look-up button on the bottom
  8. In the Lookup for String dialog box use “Workflow Context” for the Data Source; select “Current Item URL” for the Field from Source box
  9. Save and Publish the workflow

To line Current Item URL  Lookup for Person or Group Add date field

7) Test the workflow
  1. To test the workflow, change the the Action “Wait for 30 Days Prior to equal {and change the date from “Today” to a specific date and time (like 5 minutes from now).}
  2. Make sure that your Start Options on the Workflow main page is set to “Start workflow automatically when items is created.
  3. Save and Publish again.
  4. Once you confirm it works, edit the workflow back to equal “Today” in the Wait for 30 Days Prior to equal line.
  5. Save and Publish again.