Publishing Activities as an iCalendar Feed

2011-09-13 11:56
Written by
At NS Web Solutions, we recently got a chance to work on a cool project for one of Pogstone's clients. Thanks to this client's generosity, we expect soon to release a Drupal module which will provide a feed of each user's assigned activities in iCalendar format, ready to be subscribed to from with Google Calendar and/or Outlook.

Key features

Here's a short list of what you can expect from this module:
  • General description: Users can access an iCal feed of their upcoming (future) Activities, suitable for subscription via Google Calendar, Microsoft Outlook, and/or similar software
  • Activities are represented as VEVENT objects, matching applicable properties (DTSTART, DTEND based on duration, etc.) where possible and appending names of any other asignees to the DESCRIPTION property
  • Feed includes activities of any type, including client-defined activity types
  • Feeds are implemented in such a way as to conserve server resources, for example by caching at a site-wide configurable interval (default 30 minutes).
  • A user's Activities feed shows all activities having that user assigned, even if other users are also assigned.
  • The user can easily determine the correct URL for the Activities feed by viewing the URL in CiviCRM
  • URL includes a persistent random hash to limit other parties' attempts at guessing the URL and viewing the user's feed; this can be re-generated by the user in case, for example, the URL becomes known to the wrong people.

Development status

This module currently exists as a sandbox project on CiviCRM Activities iCalendar Feed.  As of this writing we don't have much there in the way of working code, but expect to have something functional posted by the end of this week.
Code is first being written for the client's system in Drupal 6 / CiviCRM 3.4.5. Once we have that working we'll be porting it to Drupal 7 / CiviCRM 4.x. We're expecting to release fully tested D6 code by September 22, 2011.
Naturally I'd love to get feedback from everyone here. It's not a cureall for the synch-to-Google-Calendar question, since it doesn't attempt, for example, to pull events into CiviCRM from other calendaring systems. But I think there's some cool functionality here, and would be glad to hear ways it could be improved upon and made more useful to more people.
Filed under
Click thumbs up if you thought this blog post was useful (login to vote or to comment)


This would be a great tool. Please let us know when it's ready so we can test. :)



When we looked at synching before, our (main) stumbling block was that most calendar entries originate as meeting invites that are in people's emails. You've stated that this module isn't being built to handle that direction, but since you asked for feedback that would be my main comment. If double-entry is still required then at the very least it means some way to avoid duplicates of those entries in my calendar when I pull from civi.

Hi Allen - sounds like a useful addition.

We are about to do some research for a client who needs an appointment scheduler. They are already using CiviCRM heavily for Events/Training - but need something for one on one appointments - with these being synched to public Calendars so patients can see what timeslots are available.

We had been planning on going with a third party option as we thought the customisation required to do the above with civicrm (including ability to pay for session, cancel, reschedule etc) probably makes it all too big a mission at this point.

But it does sound like your project potentially fills in one of the gaps for this, so will be keen to explore it when you release the code.

David (not verified)
2011-10-24 - 17:06

I believe I saw another product that focuses on events as the unit to track in calendars. I like you activities focus.