Creating a scheduled email reminder using Sharepoint Designer

By peter.stilgoe









Thanks to Dink at Sharepointu.com for this solution:

You can actually achieve this through a simple workflow in SharePoint Designer using a custom list in your SharePoint site.

In your site, create a custom list called “Emails” and add in two columns:

First column called “Body” – type “Multiple lines of text” (this will contain the actually “body” of the email).

Second column called “Date” – type “Date and Time” (this will be used to hold the next date/time the email will be sent).

Additionally, enable versions on the list – choose “Create a version each time you edit an item in this list” (this will be used for tracking how many times the email is sent and serves as a “confirmation” that the workflow did run).

*Additionally, if it doesn’t already exist, create a new group in the site that you will add in all the users who need to receive the monthly email (permissions for this is not important so you can use an existing site group if it already has the users you need).

In SPD, connect to your site and create a new Workflow “File > New > Workflow” called “Email Users” and attach it to the “Emails” list:
Set it to both:
“Automatically start this workflow when a new item is created” and
“Automatically start this workflow whenever an item is changed”.

At first glance, you may be thinking that setting it this way will cause an infinate loop, and you’d be correct – this is intentional.

Click next to create the Workflow steps.

We only need one step so name it “Send Message”.

**In any of the following steps, if you do not see the specified Action listed when you click the “Actions” button, select the “More Actions” option from the bottom of the list to bring up a complete list of all the actions available where you can now find the Action specified.**

Click “Actions” and choose “Pause Until Date”.
Click “this time”, click the “fx” button, then choose “Current Item” and “Date” for the “Source” and “Field” dropdowns, then click “OK”.

Click “Actions” and choose “Send an Email”.
Click “this message”.
Click the address book icon in the “To” field then scroll through the list of site groups to find the *group that your users belong to (this will be the list of users that need to receive the email), select the group then click “Add>>” then “OK”.
Click the “fx” button in the “Subject” field and choose “Current Item” and “Title” in the “Source” and “Field” dropdowns, then click “OK”.
Click the “Add Lookup to Body” button and choose “Current Item” and “Body” for the “Source” and “Field” dropdowns, then click “OK”.
Optionally, you can now add any additional text to the body of the email message by placing your cursor before or after the “[%Emails:Body%]” lookup and type in whatever you want.
Once completed, click “OK”.

Click “Actions” and choose “Add Time to Date”.
Click on “0″ and change it to “1″.
Click on “minutes” and change it to “months”.
Click on”date”, click the “fx” button, then choose “Current Item” and “Date” from the “Source” and “Field” dropdowns, then click “OK”.
Leave the “(Output to “Variable: date)” part as is.

Click “Actions” and choose “Update List Item”.
Click “this list”.
Choose “Current Item” in the “List” dropdown.
Click “Add” and choose “Date” from the “Set this field” dropdown, then click the “fx” button.
Choose “Workflow Data” and “Variable: date” for the “Source” and “Field” dropdowns, then click “OK”.
Click “OK” again, then one more time to close the “Update List Item” screen.

Your workflow should now appear as:

Pause until Emails:Date
then email [Your Group Name Here]
then Add 1 months to Emails:Date (Output to Variable: date)
then Update item in Emails

Click the “Check Workflow” button to verify there are no errors in the Workflow (confirmation box will open – click “OK” to close it), then click the “Finish” button to build the workflow and associate (attach) it to the “Emails” list.

Back on your site, go to the “Emails” list and create a new item.
Give it the “Reminder to Submit Expense Forms” title (or whatever you require) and add to the body the message you want then to read. Choose the next “11th” as the date (obviously the current month if its before the 11th, or the following month if its currently after the 11th), then click “OK” to add the item.

What’s going to happen is that as soon as the item is added to the list, the workflow will start. If the date listed (in the item) is in the future, it will pause until that date, then when the date is reached, it will send out an email to each member of the group with the details of the item as the email (title will be email title – body will be email body). Once it has emailed the message out, the workflow will then add 1 month (not 30 days, but one calendar month) then update the “date” field in the item on the list to reflect this new date. Since we’ve now “modified” the list item, this will again fire off the workflow which has the first step of pausing until the date listed in the item – which is now one month in the future (and will always be on the 11th).

You can now also look through the version history of the item to see an etry of each time the email had been sent (indicated by a new version being listed for each time).

Share

,

About... peter.stilgoe

peter.stilgoeThis author published 482 posts in this site.
Sharepoint, InfoPath, K2, Nintex, Business Process Mapping, Business Intelligence, Automation, ECM, Document Management, Document Imaging, Internet Marketing & Online Business Consultant Email / MSN: pstilgoe@hotmail.com LinkedIn: Pete Stilgoe - Sharepoint Consultant









Share

FacebookTwitterEmailWindows LiveTechnoratiDeliciousDiggStumbleponMyspaceLikedin

2 Comments

  • At 2011.01.31 16:15, Mika said:

    Hi, I’ve followed all your steps, but somewhere along the line I have probably done something wrong as the reminders don’t go out. I figure it must be something with the workflow…need your help

    [Reply]

    • At 2011.05.27 19:39, -Lj said:

      Nice work. Thanks for the tip.

      [Reply]

      (Required)
      (Required, will not be published)