Jul 18 2007

Lotus Notes -> iCal -> iPhone synch problems

Published by at 6:19 pm under Macs

I’m posting this on the off-hand chance someone else may run into this issue.

So – you’re using OS X, you’ve got Calendar entries in Lotus Notes that you want to export into iCal, and from thence to your new iPhone.

Getting Calendar info out of Notes is pretty straightforward, once you figure out which view to use:

  • Log into Notes, open the Calendar DB
  • (this is important!!) Select the ‘All Calendar Entries’ option in your display panel. Do NOT use the ‘Day’, ‘Week’ or ‘Month’ views.
  • From the Application menu, select File -> Export
  • In the file dialog, enter your choice of filename (eg: ‘notes’) , then select ‘Calendar File (*.ics)’ from the ‘Format:’ drop-down list
  • Hit ‘Export’, select ‘All Rows’ from the following dialog, and wait for the process to complete.

(screenshot:)
notes client screenshot

The resulting file (‘notes.ics’) should import cleanly into iCal – at, least, it did for me, and I had a pretty extensive calendar.

So… iCal seems happy, and in a perfect world you’d expect that you could simply use iTunes to sync to the iPhone. This is where I ran into trouble, however – iTunes would silently fail while updating the iPhone’s calendar. No warning, just a cryptic dialog that it had lost connection with the iPhone. A troll through the system logs turned up some errors (which, sadly, I don’t have handy – but IIRC it was reporting reads on NULL sockets.) but nothing actually useful for debugging the root cause.

After some trial and error, it appears that the problem is that the iPhone synch process does not properly handle iCal VEVENT entries in cases where:

  • there are a fixed number of repeats (i.e.: ’6 repeats’ vs. having an explicit end date), and
  • the VEVENT does NOT have a defined SUMMARY attribute. It appears that this is a feature of the import from Notes – Notes allows events without summaries, iCal tolerates them enough to at least import them into the desktop app, but something in the synch process is not so lenient.

To fix this problem, I processed the .ics file generated from Notes with the following script:

--- cut
#!/usr/bin/perl -w

# Save this as fix_notes_ical.pl, run it as
#   ./fix_notes_ical.pl [filename]
#
use strict;
my $summary = 0;
while (<>) {
 if (/^BEGIN\:VEVENT/) {
   $summary = 0;
 } elsif (/^SUMMARY\:/) {
   $summary = 1;
 } elsif (/END:VEVENT/) {
   unless ($summary) {
     print "SUMMARY:(no summary)\\r\\n";
   }
 }
 print $_;
}
--- cut 

This simply adds dummy SUMMARY data to any VEVENT in the ics file that does not already have one.

e.g:

henwen~$ ./fix_notes_ical.pl notes.ics > fixed.ics

I then imported the resulting file (‘fixed.ics’) into iCal, and then synch’d with iPhone without issue.

Hope this is of some help.

21 responses so far

21 Responses to “Lotus Notes -> iCal -> iPhone synch problems”

  1. Aubreyon 27 Jul 2007 at 3:26 am

    Now you just need to get the Notes export to happen automagically…

  2. Bethon 03 Aug 2007 at 4:56 pm

    Hi – this is exactly what I”m looking for to export my Notes Calendar to .ICS format.

    I’m totally missing something because I can’t find the ‘View All Calendar Entries” Options in my Calendar view. Can you tell me where to look for the view?

  3. Sunilon 05 Aug 2007 at 2:05 pm

    Do I write this script into Terminal? Thanks.

  4. phrogon 05 Aug 2007 at 3:27 pm

    Beth: I added a screen-shot of my notes calendar; hopefully this looks something like yours.

    Sunil: Yah, you’ll need to create the perl script through the terminal. For some general help with scripting under OS X, google says:

    http://www.macdevcenter.com/pub/a/mac/2003/11/07/scripting_osx.html

  5. Trevoron 15 Oct 2007 at 7:12 pm

    What version of Notes are you on? I don’t see this export option in 6.5.1.

  6. phrogon 16 Oct 2007 at 10:40 am

    Looks like I’m using: 7.0.2 December 03, 2006

  7. Yannon 23 Oct 2007 at 11:17 am

    I’m using 7.0.2 December 03, 2006, when exporting to .ics, some entries in my Lotus Notes Calendar are not exported !?
    So, import in iCal is ok, but some are missing in the .ics file, i don’t know why ?

  8. Kiranon 06 Nov 2007 at 11:34 pm

    I have similar problems. I use 6.5.3 and it doesn’t have .ics exporting. From reading online, I think that was added in 7.0. :-(

  9. Yannon 08 Nov 2007 at 5:43 pm

    I think i found what’s going wrong; when i export all events… there are too many entries… (since 2005…:-)
    So, when i select only one month and export it’s ok ! I must test more deeply to see when Lotus seems to stop to export events…
    Bye.

  10. Mischaon 23 Nov 2007 at 4:37 am

    Is there also a way to sync between my lotus notes 7 calendar and Apple Ical or only a 1 time export option?

  11. provibeon 05 Mar 2008 at 5:43 pm

    I’m also using Lotus Notes 7.0.2. But when I export a week or a month of calendar entries, I might get one or two to successfully import into iCal. Usually I get nothing imported. I have mostly repeats as my calendar entries and mostly put in by other people.

  12. appreciativeon 15 Jul 2008 at 8:39 pm

    Thanks heaps for posting this up.

  13. AliasNodeon 24 Sep 2008 at 9:34 am

    Has anyone tried this with Notes 8 yet?

    What happens if you do it twice? Will iCal import duplicates, or will it only import new/changed entries?

    When I export from Notes 7, I get multiple VCALENDAR entries in the ics file. Anyone have any idea why, and how I can change that?

  14. brightsp@rkyon 27 Jan 2009 at 10:21 pm

    I did about 6 imports of the ics files. Now I have duplicates entries. Apart from manual delete on the iphone Calendar. Anyone got other suggestions.

    If a meeting was reschedule in Lotus Notes, the old entry is not removed, although the new scheduled time is OK.

    Is there any way to do a clean import each time?

  15. Leonon 23 Mar 2009 at 12:01 am

    Using Lotus 8 and your method works well without the perl script.

    Is there any way of doing this automatically? Anybody out there that can do some magic with AppleScript or Automator?

  16. Antonellison 07 Sep 2009 at 5:15 pm

    I did about 6 imports of the ics files. Now I have duplicates entries. Apart from manual delete on the iphone Calendar. Anyone got other suggestions.

    If a meeting was reschedule in Lotus Notes, the old entry is not removed, although the new scheduled time is OK.

    Is there any way to do a clean import each time?…

  17. AliasNodeon 27 Oct 2009 at 3:15 pm

    Note:

    With Notes 8.02 and later, you can just use the iNotes webmail interface, which will format fairly well on the iPhone browser. No syncing with the iPhone calendar, but at least you can see your calendar.

    You can get alerts by setting the “email to” property in the alerts dialog in a notes calendar entry. Set the email to be @txt.att.net Unfortunately, you have to do that manually.

    Now if there were a way to script that…

  18. leewardon 08 Sep 2010 at 3:15 pm

    Looks like it was added in Lotus 7.0.2

    I’m on 7.0.1 and ical is not an option for exporting.

  19. axlon 21 Nov 2010 at 9:08 pm

    Hi you and thanks a lot . that’s the solution i was looking for such a long time – but no one could tell me or know – that you have to use the ‘ All calender entries’ view – before you export the calender . I’m so happy now – Thanks thanks thanks it works now

  20. Kevinon 13 May 2011 at 11:17 am

    Now it’s possible to sync Lotus calendar (events and tasks) with iPhone bi-directionally through Yahoo! Calendar using PIM Syncer tool.
    This tool can work on any operation system where Lotus Notes client can run. Mac OS X is supported too.

  21. erikon 15 Sep 2011 at 7:09 am

    It all works fine with my iPhone4 now.
    When having done the export in Lotus notes I send it to my yahoo acc as a *.ics file. On my iphone4 I receive the mail with attachement
    then I click on the attachement and the file is opened and looks at the differences of my special yahoo cal which is part of the iPhone4 calendar. These additions can be added and your done.
    GL Erik

Trackback URI | Comments RSS

Leave a Reply