Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a multi-event ICalendar file to Google Calendar

I have created an ICalendar file with multiple(10) events. The file validates correctly here and here.

It also opens correctly in the Calendar application on OSX.

In Gmail, the first event is shown correctly with an option to add to calendar, but the other events do not appear. If I choose to add the event, it adds correctly.

If I attempt to import the file to Google Calendar, it says that 3 events have been imported, but nothing shows.

Any suggestions please?

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//MY-ID//session-schedule//EN
METHOD:PUBLISH
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20150630T131326Z
UID:[email protected]
SUMMARY:Session 1
DTSTART:20150701T150000Z
DURATION:PT45M
LOCATION:Cape Town\, Western Cape\, South Africa
STATUS:CONFIRMED
ORGANIZER;CN=Joe Soap:MAILTO:[email protected]
ATTENDEE:CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Fred Bloggs:MAILTO:[email protected]
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20150630T131326Z
UID:[email protected]
SUMMARY:Session 2
DTSTART:20150708T150000Z
DURATION:PT45M
STATUS:CONFIRMED
ORGANIZER;CN=Joe Soap:MAILTO:[email protected]
ATTENDEE:CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Fred Bloggs:MAILTO:[email protected]
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20150630T131326Z
UID:[email protected]
SUMMARY:Session 3
DTSTART:20150715T150000Z
DURATION:PT45M
STATUS:CONFIRMED
ORGANIZER;CN=Joe Soap:MAILTO:[email protected]
ATTENDEE:CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Fred Bloggs:MAILTO:[email protected]
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20150630T131326Z
UID:[email protected]
SUMMARY:Session 4
DTSTART:20150722T150000Z
DURATION:PT45M
STATUS:CONFIRMED
ORGANIZER;CN=Joe Soap:MAILTO:[email protected]
ATTENDEE:CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Fred Bloggs:MAILTO:[email protected]
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20150630T131326Z
UID:[email protected]
SUMMARY:Session 5
DTSTART:20150729T150000Z
DURATION:PT45M
STATUS:CONFIRMED
ORGANIZER;CN=Joe Soap:MAILTO:[email protected]
ATTENDEE:CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Fred Bloggs:MAILTO:[email protected]
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20150630T131326Z
UID:[email protected]
SUMMARY:Session 6
DTSTART:20150805T150000Z
DURATION:PT45M
STATUS:CONFIRMED
ORGANIZER;CN=Joe Soap:MAILTO:[email protected]
ATTENDEE:CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Fred Bloggs:MAILTO:[email protected]
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20150630T131326Z
UID:[email protected]
SUMMARY:Session 7
DTSTART:20150812T150000Z
DURATION:PT45M
STATUS:CONFIRMED
ORGANIZER;CN=Joe Soap:MAILTO:[email protected]
ATTENDEE:CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Fred Bloggs:MAILTO:[email protected]
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20150630T131326Z
UID:[email protected]
SUMMARY:Session 8
DTSTART:20150819T150000Z
DURATION:PT45M
STATUS:CONFIRMED
ORGANIZER;CN=Joe Soap:MAILTO:[email protected]
ATTENDEE:CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Fred Bloggs:MAILTO:[email protected]
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20150630T131326Z
UID:[email protected]
SUMMARY:Session 9
DTSTART:20150826T150000Z
DURATION:PT45M
STATUS:CONFIRMED
ORGANIZER;CN=Joe Soap:MAILTO:[email protected]
ATTENDEE:CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Fred Bloggs:MAILTO:[email protected]
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20150630T131326Z
UID:[email protected]
SUMMARY:Session 10
DTSTART:20150902T150000Z
DURATION:PT45M
STATUS:CONFIRMED
ORGANIZER;CN=Joe Soap:MAILTO:[email protected]
ATTENDEE:CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=TENTATIVE;CN=Fred Bloggs:MAILTO:[email protected]
END:VEVENT
END:VCALENDAR
like image 971
kpg Avatar asked Jun 30 '15 14:06

kpg


People also ask

Can Google Calendar read ICS files?

With an ICS file, you can transfer your calendar events safely and easily to other calendar apps and accounts. However, to export successfully from Google Calendar, you'll need to be using the desktop version of Google Calendar, not the mobile app.


2 Answers

I've been struggling with this same issue and have some discoveries to report, but not a solid solution yet...

When the .ics attachment has a mime_type of application/ics then gmail shows all events in a grey 'Events in this message' box like this - screenshot 1.

However, with a mime_type of text/calendar it shows the slicker gmail event box like this - screenshot 2.

The slicker option can't show multiple events so I'm setting the mime_type depending to the number of events in the .ics

The problem I still have is that gmail seems to only show the grey multiple events box sporadically but I can't work out a pattern! Anyone know why?

like image 176
Jo P Avatar answered Sep 29 '22 14:09

Jo P


Probably there is nothing wrong with the ics file. I am assuming that you are trying to mail this ics file to a gmail account. It looks something like this in your gmail ID. And when you try to "Add to Calendar" link it adds only 1 event to the calendar.

enter image description here

I think gmail is programmed to read only the first event in the ics file. Try to import the ics file by opening google calendar settings and selecting "Import & export". This should add all the events to your calendar.

But I guess you would not want to instruct the user to open calendar setting. Strangely I tried sending 2 ics files in the mail. One with 2 event and another with 1 event. In this case it read all 3 events and allowed me to add it to my calendar. So I guess the workaround it to either send multiple ics file and send all event. Or at least create 2 ics file where 1 can act as a dummy and other can have all the events.

enter image description here

like image 21
Vishal Venugopal Avatar answered Sep 29 '22 14:09

Vishal Venugopal