Errors importing iCal data (iCalendar) into Google Calendar

While attempting to import iCal export (.ics) files into Google Calendar, I’ve encountered the following errors:

  • Failed to import events: Unable to process your iCal/CSV file. (Google, Bing)
  • HTTP/1.1 403 Google Calendar doesn’t support storing of “To Do” (VTODO) components (Google, Bing)

It appears as though Google Calendar is choking on both the VTODO and VALARM stanzas within the export file.

VTODO data is easy to remove, as it will appear near the end of the export file.  Find the first instance of “BEGIN:VTODO,” and remove all data beginning with that line and ending with the final “END:VTODO” instance (take care not to delete the “END:VCALENDAR” line, as it will invalidate the export).

VALARM data is problematic, as it is nested within each VEVENT stanza.  Depending on the size of the export file, it could easily contain hundreds or thousands of these.

The fast and dirty solution is to remove these elements from the iCal export file, and then import the “clean” version into Google Calendar.  Note that imported events in the target Google Calendar will no longer contain alarms–these events will need to be updated manually, if desired.

Following is a simple Python script that will remove these stanzas and produce a new file that should import properly.  After downloading, be sure to edit the INFILE variable at a minimum.

Head on over to Code for the latest version (iCal-to-GCal).

It’s worth noting that this script can be used to quickly remove data from any file that contains similarly-formatted information.  Just update the TAGS list accordingly.

UPDATE01: Wondering whether the integration of Tasks into Google Calendar will alleviate the VTODO handling issue?

Share This

9 thoughts on “Errors importing iCal data (iCalendar) into Google Calendar

  1. I have this problem and I ran across your solution, but when I downloaded the file I wasn’t sure what to do once it was open. I get a page full of text. I don’t know what to do from there. I’m kinda tech-savvy, but I don’t know what to do with a script. Any advice?

  2. Thank you! I seriously thought I was going to go insane until I found this script. Sometimes I’m amazed at how shoddy some of Google’s products are–I never would have thought I’d need to go through such convolutions to get a valid .ics file into my calendar.

  3. I’m with Julie. I’m getting this error message too and came here, but I don’t know what to do with a script either. I’m also getting a message in iCal that says: availability is not supported on the server for this account. I’m completely at a loss, and finding help seems impossible. Any help would be greatly appreciated. Why is this so complicated.

  4. So how do you use this script? I download the script, run it, and see that I need to enter a command line in Terminal screen. I assume it has to include the file name somehow. Help would be appreciated.

    Thanks in advance.

  5. I’m in the same position as Julie. I don’t know hoe to proceed to run the script and use to “sanitise”my ics file. Would appreciate some pointers as it obviously works, judging from the first comments.

    Thanks in advance.

  6. Thank you, this worked like a charm!

    @Eileen, @AG, @Tracey
    Lets’s say you’ve exported your calendar to your Desktop folder, and named it “Calendar.ics”. Here’s what you do:

    1) Copy the “” file that you’ve downloaded there.

    2) Open that file in any text editor and change line 6 to the following:

    INFILE = ‘Calendar.ics’

    (if your calendar file is named something else, then substitute that file name in there)

    3) Open Terminal (in Applications), and type the following commands:

    cd ~/Desktop/

    4) The new file is in the same directory, and is called “out.ics”

    Hope that helps!

Comments are closed.