Reminder emails a day before for a Calendar Event

Today 11/19/2010 Friday, one of the Users requested that if they can get alerts or notifications for the upcoming calendar events and that they would like to get the notifications the day before the event.

To accomplish the above:

Add a custom field to the calendar called “Alert – 1 day”.  Make it a calculated field with the calculation [StartTime]-1.  Make sure it is a date type.  I also specified date and time so the alert goes out exactly one day before, to the minute.
Then also add a custom field to the calendar called “Reminder Recipients”.  Make it a people picker control and choose to show Email addresses and probably allow multiple selections too.

Next, open your site in SharePoint designer and create a workflow (New > Workflow) for the calendar. Set the workflow to automatically start when the event is created/changed.  I also created a workflow variable called “Recipients” of type string.   Then my workflow went like this:

If Alert – 1 day is greater than Today
Pause until Calendar:Alert – 1 day
then Set Variable: Recipients to Calendar:Reminder Recipients
then Email Variable: Recipients

Please see the screenshots below

Variable: Recipients to Calendar:Reminder Recipients
then Email Variable: Recipients

Please see the screenshots below

Calendar List-Custom Fileds

Custom Fileds

Calculated Column for the Alert-1 Custom Field

Calculated Column for the Alert-1 Custom Field

Workflow Designer in SPD

Workflow Designer in SPD

Basically, when creating a new event, the person specifies who they want the reminder to go to.  Then once the event is created, the workflow is automatically started.  The workflow assumes the event is in the future (The IF statement).  Then workflow just pauses until it reaches the date of the “Alert – 1 day” field that should contain the date of exactly 1 day before the event.  As soon as that date is reached, the workflow starts up again, gets the recipients that were specified and sends them an email.  In the workflow creation, you can customize the content of the email and even include calendar lookup values in the email.

Basically, when creating a new event, the person specifies who they want the reminder to go to.  Then once the event is created, the workflow is automatically started.  The workflow assumes the event is in the future (The IF statement).  Then workflow just pauses until it reaches the date of the “Alert – 1 day” field that should contain the date of exactly 1 day before the event.  As soon as that date is reached, the workflow starts up again, gets the recipients that were specified and sends them an email.  In the workflow creation, you can customize the content of the email and even include calendar lookup values in the email.

Note:

UPDATE: To get it to notify 1 hour prior, create the alert column the same way as the Alert – 1 day, except change 1 to 1/24 (1 hour):

=[Start Time]-1/24

Filed Under: SharePoint 2010SharePoint AdministrationSharePoint DesignerSharePoint GeneralWorkflows

Tags:

About the Author:

RSSComments (7)

Leave a Reply | Trackback URL

  1. betty365 says:

    hello I was luck to find your website in digg
    your subject is marvelous
    I learn a lot in your Topics really thank your very much
    btw the theme of you blog is really fabulous
    where can find it

  2. Nagaraju says:

    Great post man thank u so much keep posting

  3. oblakovshatanax says:

    I used this workflow in SP 2010 Designer and I can’t figure out how to do calendar lookup values (both: Reminder Recipients and Alert – 1 day) in this workflow?

  4. yoyo says:

    Hi,

    what about if I want to be notified by email 10 mins before the task?
    I cant really figure it out

    please advise

    cheers

  5. This is a great tip especially to those fresh to the blogosphere.

    Short but very accurate info… Appreciate your sharing this one.
    A must read post!

  6. rpuffd says:

    Trying to get this to work in SP2010. For some strange reason, the e-mail address has a # sign as the first char and of course the mail bounces. Not sure where that char is coming from. Everything else is working fine, just cant figure out where that char is coming from. Example: #user@domain.com

    Thanks.

  7. rpuffd says:

    OK, got it figured. First, got rid of the variable, saw no need for that. My workflow looks like this

    If CurrentItem:1_Day_Alert is greater Than Today
    Pause until CurrentItem:1_Day_Alert
    Then Email CurrentItem:Alert_Recipients

    1_Day_Alert is my custom date column containing =[StartTime]-1, and Alert_Recipients is my People/Groups column of type “Work E-Mail”. The trick was setting the e-mail to type E_Mail Address versus the defaultt of String in the Workflow.

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.

  • Sponsor Ads