matnewman.com

How to create an iCalendar Feed from a Lotus Notes database

Mat Newman  14 May 2012 04:00:14 PM
One thing coming up over and over again on Twitter recently is how much users hate Lotus Notes because it can't provide them with an iCalendar Feed that they can sync with another service like Google or OSX iCal.

Interestingly, the iCalendar standard was actually co-authored by a Loti (a Lotus employee), Frank Dawson (http://en.wikipedia.org/wiki/ICalendar)

Out of the box Lotus Notes accepts iCalendar feeds as a consumer (you can add feeds to your own Lotus Notes calendar using the "Add Calendars" tool), however Lotus Notes is not - by default - an iCalendar Feed provider.

Until now!

Figure 1: iTeam's Training Database as the source for iCalendar Feeds, consumed by Google and Lotus Notes:

Image:How to create an iCalendar Feed from a Lotus Notes database

Note: The time might appear to be out in the Lotus Notes calendar feed (above), however; That is Lotus Notes being it's usual clever self and adjusting the time for me because I'm currently in Timor-Leste and the Calendar feed is coming from Hobart, Tasmania :-)

So how did I do it?  It's all in the database you can download at the end of this post, but essentially it's just a view that is embedded in a page, and the page is in the correct format to produce an iCalendar format .ics file.

Sorry for using @Today in a view selection formula folks, but it was one of the easiest ways to get only 2 weeks back and 2 months forward without touching anyone's data.

This database contains a view (iCalNotes) and a page (ical.ics).

You can try this out by adding the following URL into your own calendar system as a feed: test feed.

When these design elements are added to any standard database, they will enable users with HTTP access to the host Domino Server and at least 'read' access to the database to subscribe to an iCalendar Feed based on that databases content.

The Database requires a standard Lotus Domino calendar design, including a form called "Appointment", which contains the Following Fields:

Subject
From
iNetFrom (Optional)
StartDate
StartTime
EndDate
EndTime
Location

These design elements have been tested using a Standard Lotus Notes Mail Database Design.  The design elements will work in ANY Lotus Notes Database that has a calendar form included, and uses the Standard form and field names indicated above.

Once installed, access the feed from:   http://yourserver.com/yourmail.nsf/ical.ics
(where yourserver.com is your own domino server's internet address and yourmail.nsf is the full path to your mail database)


BE CAREFUL MODIFYING THE DESIGN ELEMENTS IN THIS DATABASE, THEY HAVE BEEN TESTED AND VALIDATED USING AN iCALENDAR VALIDATION SERVICE HERE.  IN ADDITION THEY HAVE BEEN VERIFIED TO WORK WITH GOOGLE CALENDAR FEEDS, MAC OSX iCAL FEEDS AND LOTUS NOTES FEEDS.


No guarantees. No Liability. Your Mileage May Vary. Use at your own risk. Caveat Emptor.

Download Template (<-  Right-Click and Save Target)

So there you go, how to create an iCalendar feed from any Lotus Notes database. Enjoy! :-)


Comments

1Chris Hudson  14/05/2012 6:09:52 PM  
How to create an iCalendar Feed from a Lotus Notes database

Looks great... will have to try it out. May have some applications here at the ABS that could use that.

On another note, I would love to know how you got the weather data into your calendar?

2Robert Ibsen Voith  14/05/2012 6:11:42 PM  
How to create an iCalendar Feed from a Lotus Notes database

How cool!! Love these posts!

3Alin Bria  14/05/2012 8:51:28 PM  
weather report in your calendar

{ Link }

4Carl Tyler  14/05/2012 10:46:40 PM  
How to create an iCalendar Feed from a Lotus Notes database

I did something similar for my plane booking website, 100% Domino:

{ Link }

Ical Feed:

{ Link }

SMS integration, telephone integration provided by Twilio (all integration done within Domino)

It even won the Twilio developers contest one week.

{ Link }

@Robert, for the weather you just need to find an iCal feed for weather in your area and add it as an additional calendar.

5Carl Tyler  14/05/2012 11:02:42 PM  
How to create an iCalendar Feed from a Lotus Notes database

Don't forget you can also setup the ical feed in iOs devices, so they are visible inside yoru iphone or iPad calendar.

And yes the spec goes back to Lotus Organizer. If you open up a copy of Lotus Organizer, you can open up LCS (Lotus iCalendar) files which are basically, ICS.

6Carl Tyler  14/05/2012 11:02:57 PM  
How to create an iCalendar Feed from a Lotus Notes database

Don't forget you can also setup the ical feed in iOS devices, so they are visible inside yoru iphone or iPad calendar.

And yes the spec goes back to Lotus Organizer. If you open up a copy of Lotus Organizer, you can open up LCS (Lotus iCalendar) files which are basically, ICS.

7Ed Brill  14/05/2012 11:44:27 PM  
OpenNTF?

Any thoughts of putting this on OpenNTF, Mat? That would give us an opportunity to establish much more visibility for it, since I agree, we get requests for this a lot.

8Steve Medure  15/05/2012 1:24:20 AM  
How to create an iCalendar Feed from a Lotus Notes database

Hey Mat, great post.

I can get to the ics from a browser, but I can't add this as a calendar on my iOS device even with a user name and password. Same with adding it to Google by URL, it doesn't work. I'm guessing that in order for this to work as a public calendar it would have to have Anonymous read access?

Thanks.

9Stephan H. Wissel  15/05/2012 1:25:02 AM  
now lets talk about writing them back!

next stop:

Make the iCalendar writable (I can point you to the code) - using an XPages plug-in.

10Mat Newman

15/05/2012 10:27:02 AM  How to create an iCalendar Feed from a Lotus Notes database

@1, Chris: Darren Adams blog post linked @2 explains the process. I went to http://www.wunderground.com, entered my city, then using the blue drop-down next to the G+ image, hover over the "Download iCal" link, right-click and copy the link, then paste that into the "Add Calendar" dialog in your Lotus Notes calendar.

@4, Carl: Lotus Organizer is one of the best schedule managing applications around. Considering it hasn't been updated in over a decade there are still things that it does that aren't available in Lotus Notes. Love your links mate - they look great!

@7, Ed: No worries, will post to OpenNTF.

@8, Steve: I couldn't see how to do an authenticated link in Google Calendar either. Lotus Notes has a simple option to include a Username and Password in the calendar URL. Didn't have an iOS device handy to check compatibility, will get back to you when I have one available.

@9, Stephan: It took me two days of trolling the RFC ( http://tools.ietf.org/html/rfc5545#page-31 ) and tweaking the code to get this working, will create a project on OpenNTF and see if anyone else wants to help with your suggestion.

Mat Newman IBM Champion

11Mat Newman

15/05/2012 11:27:20 AM  iNotesCal now a project on OpenNTF

Anyone wishing to help develop and test this system further, please see the 'Help Wanted" section for this project which I have now posted to OpenNTF: http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=iNotesCal

Mat Newman IBM Champion

12Stephen Bailey  15/05/2012 10:25:28 PM  
How to create an iCalendar Feed from a Lotus Notes database

Great to see this innovation Matt, but...

This should already be in the product! Both ways, like Stephan's comment.

13Mike McP  16/05/2012 1:58:49 AM  
How to create an iCalendar Feed from a Lotus Notes database

@7 For every person that asks, there are probably ten who look, realize it's not in the default template, then move on.

How about comping Scott some LS tickets, then rolling an enhanced version of this into R9?:)

14Mike McP  16/05/2012 1:59:48 AM  
How to create an iCalendar Feed from a Lotus Notes database

^^^ or rather, Matt! (sorry about that...had too many blogs open today!)

15Mat Newman

23/05/2012 11:27:57 PM  How to create an iCalendar Feed from a Lotus Notes database

@14, Mike MCP: I'd rather they Comp the flights - that's the most expensive thing about Lotusphere for an Aussie (roughly double the cost of the conference!) ;-)

Mat Newman IBM Champion

16Alex  21/07/2012 1:35:03 AM  
How to create an iCalendar Feed from a Lotus Notes database

Well done. But... It's a shame such thing was not native...

17Alex  21/07/2012 1:35:10 AM  
How to create an iCalendar Feed from a Lotus Notes database

Well done. But... It's a shame such thing was not native...

18Andreas Imnitzer  28/09/2012 10:41:54 PM  
iPhone. tested and adapted

Mat, thanks. I ran into your code last night and tested it for the iphone in a non-anonymous environment. Did not run ad hoc, but I found the changes needed:

a) Mime type of the ical.ics Page should be set to text/calendar. This setting is great, because when you send a link to it, the iPhone will automatically jump to the calendar subscription page.

b) Username, servername and Password in the subscription. Use the server name that the domino server has as Fully qualified Host Name, before I did this, the iPhone said it could not verify the account in some cases. If I used my short name to log in, it did not mutter, but also did not show the calendar entries. after using FQHN, I could use my long user name and pw and it also shows the entries now.

c) You might want to filter substrings from the subject field, like the colon to not confuse the format.

C U in MCO

19Keith Brooks  11/01/2013 2:54:45 PM  
How to create an iCalendar Feed from a Lotus Notes database

Genius! I was just thinking about this and you did it. Love you, see you in 2+weeks.

20Chris  8/02/2013 9:51:33 AM  
How to create an iCalendar Feed from a Lotus Notes database

Thanks for this - it's fantastic I can at last see my Lotus Notes bookings in Lightning. One question: does it support daylight saving? In NZ were are currently UTC + 13. I have an appointment booked in notes for Fri 15/2/2013 9:15 am NZDT but in Lightning it is showing as Fri 15/2/2013 10:15 am. When I drill down in Lightning it shows the appointment as This 14/2/2013 9:15 pm UTC - it should be 8:15 pm UTC.

21Johannes Madsen  2/04/2013 7:38:29 PM  
Domino 9.0 questions

Hi Mat,

Does your code work in Notes 9.0 Mail?

Domino provides an iCalendar API { Link }

Do you consider using this in a Domino 9 version of your code?

Mat Newman

THE Lotus Notes Guy. Productivity Guru. Social Evangelist. IBM Champion for IBM Collaboration Solutions, 2011/2012/2013.

#GetProductive #GetLotusNotes

Mat Newman

New to IBM Lotus Notes? START HERE



I'm attending. IBM Software.
      Lotusphere 2012. Business. Made Social. January 15 - 19. Orlando,
      FL. Drive Adoption for IBM Connections



Home  | 

Get Serious. Get Domino.