1

I'm working on a JavaScript-based app that sets up events between 1 organizer and 1 or more attendees per event. As it's public facing, organizers and attendees can be using pretty much any (major) calendar and/or email service.

I've determined that iCal (.ics) is the most widely supported format for sharing calendar events, so I've written code that emits valid .ics files (tested successfully against several online validators) but I'm confused about how to use the file. My expectation was:

  1. Generate .ics file with organizer and attendees (and an attendee entry for the organizer too with PARSTAT=ACCEPTED)
  2. Organizer sends the .ics file to the attendees (fyi: achieved by opening mail client in organizer's ui with pre-attached .ics file and preset to: field)
  3. The organizer's and attendees' respective mail/calendar service providers (e.g. gmail/gcal/outlook/exchange/etc) parse the .ics file and automatically add it to the users' calendars
  4. RSVP status is tracked by the calendar service providers

However, this usage does not seem to work with major providers for various reasons, e.g. for simplicity, let's assume both the organizer and the attendees use Gmail:

  1. Gmail seems to parse the file on both the organizer's side (.ics file sender) and the attendees' side (recipients), but only provides actions for the attendees to add the event to their calendar. No automated actions are provided for the organizer to add it to his/her calendar. I can confirm it is parsed on the organizer's side, as Gmail "knows" it's the organizer and deliberately doesn't offer the "add to calendar" action even though s/he is also an attendee (tested by modifying the organizer in the .ics file).

  2. The "Add to Calendar" action is offered to the attendee, and after it's added, RSVP actions are provided, but do not actually synchronize with the organizer (who at this point may or may not even have the event in his/her calendar depending on whether they added it manually).

I can guarantee the attendees are defined correctly (with PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE) and that the .ics files I'm generating are valid and their contents are correct.


  • Is my expected usage outlined above incorrect with regard to the .ics standard, or are the issues instead because of idiosyncrasies of the calendar/mail providers?

  • Is there another strategy to fulfill this use case using .ics files, or am I fundamentally misunderstanding the usage of .ics files - are they not meant to be mailed out as attachments? Do they not support RSVP unless you run your own CalDAV server?

smerg
  • 1,506
  • 3
  • 10
  • 14

1 Answers1

1

With iMIP/iTIP, there is no concept of "injecting" an invitation into the organiser's calendar. The initial workflow is triggered by the organiser so the assumption is that the event is already in the organiser's calendar.

For point 2) if the event is in the organiser's calendar and the reply are not processed, then there might be an issue with the way you are using the protocol. We would need the detail (both original REQUEST and REPLY) to help you debug this.

A somehow related response at How can I create and email an invite for two unrelated recipients to a meeting between them and allow them to control further scheduling

Community
  • 1
  • 1
Arnaud Quillaud
  • 4,420
  • 1
  • 12
  • 8
  • I've tried forcing the organizer to import the .ics file manually into their calendar before the organizer mails out the same .ics file to attendees, but then for some reason there is no connectivity (the RSVP option appears, but it does not update the other party). I'm relying on the underlying mail/calendar service to implement `METHOD:REPLY`. The original .ics file has `METHOD:REQUEST` and the intention is to initiate the process, but let the providers take it from there. – smerg May 03 '17 at 10:15
  • Update: it seems this may actually be an idiosyncrasy with the mail/calendar provider. When using Gcal, if the organizer first imports the event, the attendees are not registered (completely truncated). However, if the organizer uses iOS calendar the attendees are imported from the .ics file, and the calendar even sends out the invites on behalf of the organizer (so the organizer needs only to import the .ics file and the calendar then picks up the slack from there, notifying the attendees and handling RSVP). I wonder if there is a way to achieve the same thing using GCal and other calendars. – smerg May 03 '17 at 10:27
  • Well if you use iOS calendar + GCal, the client will use the CalDAV protocol and do a PUT of the whole event into the organiser's calendar. You could do the same but that is of course more involved. – Arnaud Quillaud May 03 '17 at 13:38