Update an event in Outlook 2007 with an iCalendar file - outlook

There is a previous thread with this question, and hints at an answer, but I could not get it to work.
I have an ICS file. It validates. It looks like this:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//WA//FRWEB//EN
BEGIN:VEVENT
UID:FRICAL201
SEQUENCE:0
DTSTAMP:20081108T151809Z
DTSTART:20081109T121200
SUMMARY:11/9/2008 12:12:00 PM TRIP FROM JFK AIRPORT (JFK)
LOCATION:JFK AIRPORT (JFK)
END:VEVENT
END:VCALENDAR
I double-click it and it goes into Outlook 2007 perfectly.
Then, I double-click another ICS file that looks like this:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//WA//FRWEB//EN
BEGIN:VEVENT
METHOD:REQUEST
UID:FRICAL201
SEQUENCE:1
DTSTAMP:20081108T161809Z
DTSTART:20081109T121300
SUMMARY:11/9/2008 12:13:00 PM TRIP FROM JFK AIRPORT (JFK)
LOCATION:JFK AIRPORT (JFK)
END:VEVENT
END:VCALENDAR
As explained in the rfc, the UID is the same and the sequence number is one greater, so I expect outlook to update my previous event entry, but all it does is insert a second one.
How can I formulate the ICS file so that Outlook knows to update the event? The original poster in the thread I referenced above said he got it to respond with METHOD and ORGANIZER but in my experience METHOD has no effect and ORGANIZER causes undesirable behavior where Outlook wants to email the event to someone. I just want it to update the calendar.

I got a hold of Tom Carter, the guy who started the original thread. He had a working example with a request followed by a cancellation. What I had wrong was my METHOD was inside my VEVENT when it should have been outside. So here is a working update!
Original:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//WA//FRWEB//EN
METHOD:REQUEST
BEGIN:VEVENT
UID:FRICAL201
SEQUENCE:0
DTSTAMP:20081108T151809Z
ORGANIZER:donotreply#test.com
DTSTART:20081109T121200
SUMMARY:11/9/2008 12:12:00 PM TRIP FROM JFK AIRPORT (JFK)
LOCATION:JFK AIRPORT (JFK)
END:VEVENT
END:VCALENDAR
Update:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//WA//FRWEB//EN
METHOD:REQUEST
BEGIN:VEVENT
UID:FRICAL201
SEQUENCE:1
DTSTAMP:20081108T161809Z
ORGANIZER:donotreply#test.com
DTSTART:20081109T121300
SUMMARY:11/9/2008 12:13:00 PM TRIP FROM JFK AIRPORT (JFK)
LOCATION:JFK AIRPORT (JFK)
END:VEVENT
END:VCALENDAR
All I did was add the request method (in the correct spot!), and an organizer.

Related

how to delete a series of events from recurring set using ics file?

Im trying to delete a series of dates like google or zoom does ("delete this and following occurrences") but cant seem to delete them all
here is the code I'm using to do so
RECURRENCE-ID;RANGE=THISANDFUTURE;TZID=America/New_York:20230221T100000Z
I saw few people recommending to use UNTIL in the range parameter for recurrence-id but cannot find any syntax or working example.
Thanks in advance
Full code for creating recurring event:
BEGIN:VCALENDAR
VERSION:2.0
PRODID://Events//iCal 2.1//EN
METHOD:REQUEST
X-WR-CALNAME:Event Calendar
X-WR-TIMEZONE:America/New_York
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/New_York
TZURL:http://tzurl.org/zoneinfo-outlook/America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
TRANSP:OPAQUE
CREATED:20221221T094254Z
UID:TESTSC20221221094254
DTEND;TZID=America/New_York:20221226T110000
SUMMARY:deadline approaching Event
LOCATION;ENCODING=QUOTED-PRINTABLE:Virtual Meeting
DTSTART;TZID=America/New_York:20221226T100000
DTSTAMP:20221221T094254Z
ORGANIZER;CN=Events:mailto:events#abc.org
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=abc#abc.org;X-NUM-GUESTS=0:mailto:abc#abc.org
STATUS:CONFIRMED
DESCRIPTION:A. Want to join the meeting from your computer, tablet or smartphone?\n go to https://zoom.us/
SEQUENCE:0
RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20230228T110000Z
BEGIN:VALARM
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT10M
ACTION:DISPLAY
END:VALARM
END:VEVENT
END:VCALENDAR
Full code I use for deleting:
VERSION:2.0
PRODID://Events//iCal 2.1//EN
METHOD:CANCEL
X-WR-CALNAME:Event Calendar
X-WR-TIMEZONE:America/New_York
CALSCALE:GREGORIAN
BEGIN:VEVENT
TRANSP:OPAQUE
CREATED:20221221T145554Z
UID:TESTSC20221221094254
DTSTART;TZID=America/New_York:20221226T100000
DTEND;TZID=America/New_York:20221226T110000
SUMMARY:Event: deadline approaching Cancelled
LOCATION;ENCODING=QUOTED-PRINTABLE:Virtual Meeting
DTSTAMP:20221221T145554Z
ORGANIZER;CN=Events:mailto:events#abc.org
RECURRENCE-ID;RANGE=THISANDFUTURE;TZID=America/New_York:20230221T100000Z
SEQUENCE:0
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=abc#abc.org;X-NUM-GUESTS=0:mailto:abc#abc.org
STATUS:CANCELLED
DESCRIPTION:This meeting has been deleted. Please contact HQ for scheduling a new meeting or more information about this.
END:VEVENT
END:VCALENDAR```

parsing ics file - recurring events timezone issue

This is a basic.ics file containing a recurring event and a non-recurring event
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:GreekMan
X-WR-TIMEZONE:Asia/Nicosia
BEGIN:VTIMEZONE
TZID:Europe/Moscow
X-LIC-LOCATION:Europe/Moscow
BEGIN:STANDARD
TZOFFSETFROM:+0300
TZOFFSETTO:+0300
TZNAME:MSK
DTSTART:19700101T000000
END:STANDARD
END:VTIMEZONE
BEGIN:VTIMEZONE
TZID:Asia/Nicosia
X-LIC-LOCATION:Asia/Nicosia
BEGIN:STANDARD
TZOFFSETFROM:+0300
TZOFFSETTO:+0200
TZNAME:EET
DTSTART:19701025T040000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETFROM:+0200
TZOFFSETTO:+0300
TZNAME:EEST
DTSTART:19700329T030000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTART:20221110T140000Z
DTEND:20221110T143000Z
DTSTAMP:20221110T093950Z
UID:52kaiifeon2cdil0m6ln6m4cf6#google.com
CREATED:20221110T091122Z
LAST-MODIFIED:20221110T091122Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:non recurring event 1600
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=Asia/Nicosia:20221110T130000
DTEND;TZID=Asia/Nicosia:20221110T133000
RRULE:FREQ=WEEKLY;BYDAY=TH
DTSTAMP:20221110T093950Z
UID:4ponmapnn5o6bj0fep6kfplcf4#google.com
CREATED:20221110T091051Z
DESCRIPTION:
LAST-MODIFIED:20221110T091101Z
LOCATION:
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:recurring event 1300
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
I download this file with wget and convert it to a table using this command
awk 'BEGIN{FS=":"}/^DTSTART/{dtstart=$2}/^SUMMARY/{summary=$2}/^END:VEVENT/{print substr(dtstart,7,2)"/"substr(dtstart,5,2)"/"substr(dtstart,1,4),sprintf("%02d",substr(dtstart,10,2)'+2')":"substr(dtstart,12,2),summary}' basic.ics
This is the output. As you can see the recurring event is showing the wrong time.
10/11/2022 16:00 non recurring event 1600
10/11/2022 15:00 recurring event 1300
google calendar shows the time in UTC+0, so as you can see in the above command I add 2 hours to each event to make it UTC+2.
The problem is that recurring events include the timezone on DTSTART, so those events don't have to be corrected.
How can I modify the command to avoid adding 2 hours to recurring events?

ICS Wrong Time Zone Appearing In Google Calendar

I am having a weird issue with ics calenders. I am creating a calendar with the following information:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:www.bingewave.com
X-WR-TIMEZONE:America/New_york
BEGIN:VTIMEZONE
TZID:America/New_york
X-LIC-LOCATION:America/New_york
END:VTIMEZONE
BEGIN:VEVENT
UID:61bb267c4074e
DTSTART;TZID=America/New_york:20211216T180000
SEQUENCE:0
TRANSP:OPAQUE
DTEND;TZID=America/New_york:20211216T210000
The time zone set to America/New_york and the time set to 180000, which is 6:00 PM. But I am getting this in my Google Calender:
Am I doing something wrong?
The answer is case sensitivity. New_york is not recognized, while New_York with a capital Y works. Apparently, Google Calendar is strict on upper and lowercase.

Cannot cancel ical event (dreaded "not supported calendar message.ics")

I'm writing a system in Python that is using the icalendar library to generate ical invites. Those work fantastically, but if I try to send out a cancellation Outlook just displays the dreaded "not supported calendar message.ics". I originally had this issue with the invite, but solved it by fixing my date formatting.
Here is the initial invite:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//myapp//myapp.example.com//
METHOD:REQUEST
BEGIN:VEVENT
SUMMARY:Weekly Review Meeting
DTSTART;VALUE=DATE-TIME:20200331T190000Z
DTEND;VALUE=DATE-TIME:20200331T200000Z
DTSTAMP;VALUE=DATE-TIME:20200325T193007Z
UID:1#myapp
SEQUENCE:0
ATTENDEE:me#example.com
CATEGORY:EVENT
CLASS:PUBLIC
DESCRIPTION:bla bla
LOCATION:Webex
ORGANIZER:donotreply#example.com
PRIORITY:5
STATUS:CONFIRMED
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR
And then the cancellation:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//myapp//myapp.example.com//
METHOD:CANCEL
BEGIN:VEVENT
SUMMARY:Weekly Review Meeting
DTSTART;VALUE=DATE-TIME:20200331T190000Z
DTEND;VALUE=DATE-TIME:20200331T200000Z
DTSTAMP;VALUE=DATE-TIME:20200325T193011Z
UID:1#myapp
SEQUENCE:1
ATTENDEE:me#example.com
CATEGORY:EVENT
CLASS:PUBLIC
DESCRIPTION:
LOCATION:Webex
ORGANIZER:donotreply#example.com
PRIORITY:5
STATUS:CANCELLED
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR
The same code generates both and sets the METHOD and STATUS differently (DESCRIPTION also differs). I send a SEQUENCE of 0 for the invite and 1 for the cancellation. The UIDs are always consistent between the matching pair. What am I missing?
I ended up solving this myself. I will share my learnings for posterity.
The MIME type in the email needs to be set with method=CANCEL as well. This was ultimately my issue. method in the MIME type needs to match METHOD in the ical file and both are required for Outlook to process it correctly.
SEQUENCE should not be incremented for cancellation, just for update.
I also updated all addresses (ORGANIZER and ATTENDEE) to include mailto:, but this does not appear to be strictly necessary.

Lotus Notes (and MS Outlook) .ICS event CANCELLATION

I am trying to implement external appointment management (using VCAL2) - namely CREATE, UPDATE and CANCEL appointment - and I need it to work with Lotus Notes (and possibly in MS Outlook).
My VCAL2 files are in my opinion correct (RFC 5545), and CREATE and UPDATE actually works well. Problem is only with CANCEL and only in MS Outlook and Lotus Notes - they seem to ignore the cancellation request.
CREATE.ics
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//myprod//ical-poc//SK
METHOD:PUBLISH
X-WR-RELCALID:5EF979C9-3764-4B55-93B8-3BB00DFA176C#uniq.id
X-PUBLISHED-TTL:P1W
BEGIN:VEVENT
UID:5EF979C9-3764-4B55-93B8-3BB00DFA176C#uniq.id
DTSTART;TZID=Europe/Bratislava:20150701T090000
SEQUENCE:0
TRANSP:OPAQUE
STATUS:CONFIRMED
DTEND;TZID=Europe/Bratislava:20150701T093000
SUMMARY:CREATED
ATTENDEE:mailto:valid#email.xxx
DESCRIPTION:Event description.
ORGANIZER:mailto:cal-poc#domain.com
DTSTAMP:20150630T182305Z
END:VEVENT
END:VCALENDAR
UPDATE.ics
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//myprod//ical-poc//SK
METHOD:REQUEST
X-WR-RELCALID:5EF979C9-3764-4B55-93B8-3BB00DFA176C#uniq.id
X-PUBLISHED-TTL:P1W
BEGIN:VEVENT
UID:5EF979C9-3764-4B55-93B8-3BB00DFA176C#uniq.id
DTSTART;TZID=Europe/Bratislava:20150701T110000
SEQUENCE:1
TRANSP:OPAQUE
STATUS:CONFIRMED
DTEND;TZID=Europe/Bratislava:20150701T113000
SUMMARY:UPDATED+2
ATTENDEE:mailto:valid#email.xxx
DESCRIPTION:Event description.
ORGANIZER:mailto:cal-poc#domain.com
DTSTAMP:20150630T182428Z
END:VEVENT
END:VCALENDAR
CANCEL.ics
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//myprod//ical-poc//SK
METHOD:CANCEL
X-WR-RELCALID:5EF979C9-3764-4B55-93B8-3BB00DFA176C#uniq.id
X-PUBLISHED-TTL:P1W
BEGIN:VEVENT
UID:5EF979C9-3764-4B55-93B8-3BB00DFA176C#uniq.id
DTSTART;TZID=Europe/Bratislava:20150701T110000
SEQUENCE:1
TRANSP:OPAQUE
STATUS:CANCELLED
DTEND;TZID=Europe/Bratislava:20150701T113000
SUMMARY:CREATED+2
ATTENDEE:mailto:valid#email.xxx
DESCRIPTION:Event description.
ORGANIZER:mailto:cal-poc#domain.com
DTSTAMP:20150630T182457Z
END:VEVENT
END:VCALENDAR
As almost always, answering my question (it seems, posting it on S/O gives me some superpowers to find an answer in the next few hours).
It seems, there are multiple combinations of properties in iCal format, that form the valid file for each client. Following is my analysis of it (please note, it does not support RSVPs, but RSVPs only require few more tweaks to the file like slightly different methods etc. and the point of the question was cancellation):
CREATE & UPDATE APPOINTMENT
All Applications:
METHOD must be PUBLISH
DTSTART and DTEND (or DURATION) present
SEQUENCE must be incremented on each update
ORGANIZER must be present
UID must be present
X-WR-RELCALID for Outlook must be present and equal to UID
PRODID must be present
STATUS should be CONFIRMED
CANCEL
All Applications:
STATUS must be CANCELLED
all other fields as above
Apple Calendar:
METHOD must be PUBLISH (or actually, must not be CANCEL)
DURATION (or DTEND) must be present
Microsoft Outlook:
METHOD must be CANCEL
DURATION (or DTEND) MUST NOT be present
Lotus Notes:
METHOD must be CANCEL
DURATION (or DTEND) must be present

Resources