Email a calendar/appointment link using SharePoint workflow

I am working on Employee Training template for a month now. We have customized a lot to suit our requirement. As we moved ahead few people in my team came up with a suggestion to email an appointment link using SharePoint Designer workflow. This was very crucial as people generally do registration but forget to export a calendar event in their outlook.

Open  Employee Training site in SharePoint Designer and navigate to workflows. There are 3 workflows -

  • Attendee Registration
  • Attendee Unregistration
  • Instructor Reminder

These workflows already has a part with the “Send an email” action.  For you, if you’re looking at the same Employee Training template I’m looking at, you’ll want to open the “Attendee Registration” workflow, and then look at the first step of the workflow, where it says “Store This is a confirmation… in Variable: ConfirmationBody. Open ConfirmationBody by clicking it.

In the Confirmation Body, you need to show a link that will open an Outlook appointment.  Go into any event item in any SharePoint calendar.  In the toolbar at the top of that item, you’ll see an “Export Event” button.  You’ll notice that when you click it, an Outlook meeting box pops up.  This is the link that you want, so right-click on “Export Event”, and copy the link. For example

http://myserver/sites/sitename/_vti_bin/owssvr.dll?CS=109&Cmd=Display&List={LIST-ID}&CacheControl=1&ID=2&Using=event.ics

We simply want this link to be included in the email.  The way to make this link specific to the actual event ID of the relevent list item, will be to replace the ID=2 in the link, to be the ID of the current list item in the workflow.  Delete the number after ID= in your link, and click “Add Lookup” button. This will open a window, 

In this field, you’re looking up the ID field from the Courses calendar, and matching it up with the Course ID field in the Registrations list.

This is the full text of what I put in my workflow.  It not only includes a pretty “CLICK HERE” link, it also lets the user know that they’ll need to click “Save and Close” once the appointment opens.  Yes, you can use HTML in SharePoint Designer workflow emails. If you would like to add this event to your Outlook calendar,

 <a href=”http://myserver/sites/sitename/_vti_bin/owssvr.dll?CS=109&Cmd=Display&List={LIST-ID}&CacheControl=1&ID=[%Courses:ID%]&Using=event.ics”>CLICK HERE</a>, then click to Open, then Save & Close.

So now people will be able to open and save the event in their outlook calendar without having to export in from SharePoint site.

Advertisement

14 Responses

  1. When I make the changes, the link is emailed out but the event is not in the exported link. When the user clicks on “CLICK HERE”, it opens the calendar window but the class is not listed. It’s just a blank calander item. How do I get the class information to also export?

  2. Hi Ameya,

    Nice post.

    I implemented on the same line but i am stuck at one position. When user click on Click here link it opens up appointment in Outlook, but the data and timings of the course is coming as current date rather than actual date of course.

    Can you please let me know if i am doing anything wrong here?

    Thanks
    Shilpa

      • Hi Ameya,

        I have checked my regional settings and defined work days from monday to friday. I guess all settings are fine.

        Is there anything else i need to do?
        Please suggest.

        Thanks
        Shilpa

      • Hi Shilpa,
        Did you get correct timings in workflow?? Try to debug to workflow..
        Try getting information in workflow variables.. I suspect the workflow did not receive correct information or during workflow execution the parameter values got changed..

        Can you provide some more details?
        Thanks,
        Ameya

  3. Hi I have implement this but I am wondering if the abilitiy to set a “Reminder alert” is possible. The current method opens Outlook with teh corect date but I would like to set a reminder to be 1 hour before the event. When I use this method I find users don’t set reminders and the calendar option is saved but they are not alerted to the event.

    Thanks for you help

  4. I also have this working but would like to set up the reminder for the event with a default value other than none. Where and how is the code executed? I am assuming this may not be easy. Thank you.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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