matnewman.com

How to create an iCalendar Feed from a Lotus Notes database

Mat Newman  May 14 2012 16:00:14
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  05/14/2012 18:09:52  
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  05/14/2012 18:11:42  
How to create an iCalendar Feed from a Lotus Notes database

How cool!! Love these posts!

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

{ Link }

4Carl Tyler  05/14/2012 22:46:40  
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  05/14/2012 23:02:42  
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  05/14/2012 23:02:57  
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  05/14/2012 23:44:27  
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  05/15/2012 1:24:20  
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  05/15/2012 1:25:02  
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

05/15/2012 10:27:02  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

05/15/2012 11:27:20  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  05/15/2012 22:25:28  
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  05/16/2012 1:58:49  
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  05/16/2012 1:59:48  
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

05/23/2012 23:27:57  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  07/21/2012 1:35:03  
How to create an iCalendar Feed from a Lotus Notes database

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

17Alex  07/21/2012 1:35:10  
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  09/28/2012 22:41:54  
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  01/11/2013 14:54:45  
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  02/08/2013 9:51:33  
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  04/02/2013 19:38:29  
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?

22Craig O. Fogus  07/25/2013 1:50:27  
How to create an iCalendar Feed from a Lotus Notes database

This may be a obvious or not, but I did not want to give anonymous access to read my mail, so I used this URL which provides access via login in the url. I only wish there was an easy way to only grant access to the calendar:

https://yourserver.com/names.nsf?Login&Username=jcool&Password=password1234&redirectto=mail\yourmail.nsf\ical.ics

As always, HTTPS is preferred for security reasons. Obviously replace jcool and password1234 with the appropriate credentials. I tested this within Outlook 2010, and it works great. I'll repost on Openntf.org.

Thanks for the info!! Great page!

23Craig O. Fogus  07/25/2013 23:18:29  
How to create an iCalendar Feed from a Lotus Notes database

@Johannes Madsen I forgot to mention that I'm doing this in Notes 9, and it works fine.

24John  09/05/2013 8:46:46  
How to create an iCalendar Feed from a Lotus Notes database

This is *exactly* what I needed. Thanks!

I'm using wget to grab an .ics file of the user's calendar, then the DaviCal scripts to post the .ics file as the user's calendar on a CalDAV server. This step was necessary since an Outlook plugin supporting CalDAV needs to read the file from a CalDAV server rather than a straight-up iCal feed, so it'll refresh the calendar every so often. With the above steps in a cron job, it works slick. Basically, this allows me to use notes users with calendar autoprocessing enabled as resources on a CalDAV server.

-John

25JK  09/20/2013 9:32:05  
How to create an iCalendar Feed from a Lotus Notes database

This looks great. I am using a custom template called eProductivity. Any thoughts on how I can add the feed capability without losing the custom features from eProductivity?

26Roberto  10/11/2013 2:30:46  
How to create an iCalendar Feed from a Lotus Notes database

Did you have yet implemented the "writable" capability of the solution?

Regards

27Mat Newman

11/08/2013 14:45:45  How to create an iCalendar Feed from a Lotus Notes database

@25, JK: This tool adds new design elements to the database, it doesn't modify any existing ones. Should be no problem with e-Productivity (but you might want to check with Eric Mack).

@26, Roberto: As mentioned earlier in this thread, IBM implemented a Calendar API with Notes 9. Now most things are possible.

Mat Newman IBM Champion

28Luis Arciniega  02/07/2014 9:07:47  
How to create an iCalendar Feed from a Lotus Notes database

Thanks Matt for this great help. I already used it and managed to open my Notes calendar as ical in an Outlook 2013 client. Is there a way to edit these ical events from the guest mail system? Thanks

29Magdalena Welander  03/20/2014 17:56:15  
How to create an iCalendar Feed from a Lotus Notes database

I only get an error: unable to connect :-(

Using Mac's Calendar.app

30William  04/18/2014 0:03:20  
How to create an iCalendar Feed from a Lotus Notes database

Added the view and page, and I can read the feed from a note client, but It seems to not conform with the native MAC os Calendar function. Has anyone been able to configure a MAC-os calendar app to read the feed?

31Eugenio  02/16/2017 22:03:25  
How to create an iCalendar Feed from a Lotus Notes database

Hello and thank for sharing your template

The ics file generation works with a little problem

my nextcloud server in which I'm trying to read the ics gives back an error

... from Java Console

Error: invalid line (no token ";" or ":") "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">"

at ParserError (ical.js:1641)

at Function.ICAL.parse.parser._handleContentLine (ical.js:1829)

at ical.js:1671

at Function.ICAL.parse.parser._eachLine (ical.js:2130)

at Object.parser [as parse] (ical.js:1670)

at Object.split (app.js:5891)

at app.js:5704

at processQueue (angular.js:16383)

at angular.js:16399

at Scope.$eval (angular.js:17682)

...

using a ics validator for the created file it gives back the following errors due mainly to CRLF end of line

....

Problem! Found 7 warnings

Warnings

Blank line detected, specification does not address the use of blank lines near line # 8

Blank line detected, specification does not address the use of blank lines near line # 21

Blank line detected, specification does not address the use of blank lines near line # 22

Blank line detected, specification does not address the use of blank lines near line # 35

Blank line detected, specification does not address the use of blank lines near line # 36

Line length should not be longer than 75 characters near line # 4

Reference: RFC 5545 3.1. Content Lines

Invalid MIME type detected, should be 'text/calendar' (found MIME type 'text') near line # 1

Reference: RFC 5545 8.1. iCalendar Media Type Registration

Problem! Found 1 error

Errors

Lines not delimited by CRLF sequence near line # 1

Reference: RFC 5545 3.1. Content Lines

...

this is the generated file

BEGIN:VCALENDAR

PRODID:-//Eugenio //Lotus Notes//EN

X-WR-CALNAME:Eugenio , Calendar - by IBM Lotus Notes

X-WR-TIMEZONE:(UTC+01:00) Amsterdam, Berlino, Berna, Roma, Stoccolma, Vienna

VERSION:2.0

CALSCALE:GREGORIAN

METHOD:PUBLISH

BEGIN:VEVENT

SEQUENCE:1

CLASS:PUBLIC

CREATED:20170216T140000Z

LAST-MODIFIED:20170216T140000Z

UID:A08E69CA2AF76163C12580C80058ECA1

DTSTAMP:20170216T140000Z

ORGANIZER;CN=Eugenio :MAILTO:Eugenio@example.com

DTSTART:20170216T140000Z

DTEND:20170216T150000Z

SUMMARY:

END:VEVENT

BEGIN:VEVENT

SEQUENCE:1

CLASS:PUBLIC

CREATED:20170218T090000Z

LAST-MODIFIED:20170218T090000Z

UID:A7DB7533C6043D24C12580C9002C67B9

DTSTAMP:20170218T090000Z

ORGANIZER;CN=Eugenio :MAILTO:Eugenio@example.com

DTSTART:20170218T090000Z

DTEND:20170218T100000Z

SUMMARY:PROVA condivisione

END:VEVENT

END:VCALENDAR

may you help somehow

thanks in advance

eugenio

32Alex  02/02/2018 21:10:18  
How to create an iCalendar Feed from a Lotus Notes database

Hi, I love it and use it for quite a while.

But unfortunately some appoints don't appear in the iCal file. Some recurring meetings appear multiple times but with equal start/end time.

Any idea?

33claudio  02/07/2018 21:16:04  
How to create an iCalendar Feed from a Lotus Notes database

hello,

this works fine in my outlook calendar

about google calendar I can add the ics but I don't see the appointments..

about the json format, did you have the same kind of page created for the ics format?

34Cecile  06/01/2018 21:03:12  
How to create an iCalendar Feed from a Lotus Notes database

hello,

I copied the 2 elements in my database

I did the connection test on file.ics

I can see all the data

I configured gmail and I do not see anything

Is it ok with Domino 9.0.1 ?

Mat Newman

THE Notes (formerly IBM/Lotus Notes) Guy. Productivity Guru. Evangelist. IBM Champion for IBM Collaboration Solutions, 2011/2012/2013. Former IBMer. HCLite. Views are my own.

#GetProductive #GetHCLNotes

Mat Newman




Home  | 

Get Serious. Get Domino.