Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use Automator to fix Outlook invites that iCal rejects Apps
Some meeting invites sent from Outlook just do not work with iCal and when you click on the invite (.ics file) iCal reports "iCal canít read this calendar file. No events have been added to your iCal calendar." I remember reading a hint (sorry, can't find it to reference it!) that pointed the blame at empty lines at the start and end of the .ics file. If you remove these (using BBedit, for example), the invite is recognized by iCal.

So after doing this too many times, I came up with an Automator solution to speed things up. It may not be the most elegant, but it does work. The following has you create a one-off directory and apply a Folder Action to it. If you save an ics file to this folder from, the Folder Action will run a script to remove the empty lines, save the file, open the file (and therefore load it into iCal), and then remove it to tidy up.

Usage: From, save the ics file to the FixiCal folder, and Automator does the rest. Read on for the how-to...

  1. Create a directory in your user's Documents folder called FixiCal.
  2. In Automator, create a new Folder Action, and select the new FixiCal folder.
  3. Add the Run Shell Script action to your workflow. Select the bash shell, and set Pass Inputs As to Arguments.
  4. Use the following code in the action:
    grep -v "^$" $@ > ~/Documents/FixiCal/fixed_invite.ics
  5. Add the Run AppleScript action to your workflow, and have it run this code:
    on run {input, parameters}
      do shell script "open ~/Documents/FixiCal/fixed_invite.ics"
      return input
    end run
  6. Add the Find Finder Items action, and have it search the FixiCal folder, where 'All of the following' are true: File extension -- contains -- ics.
  7. Add the Move Finder Items to Trash action to your workflow, and save.
[robg adds: I haven't testedt this one.]
  • Currently 1.93 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (14 votes cast)

Use Automator to fix Outlook invites that iCal rejects | 2 comments | Create New Account
Click here to return to the 'Use Automator to fix Outlook invites that iCal rejects' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use Automator to fix Outlook invites that iCal rejects
Authored by: tangential on Dec 24, '09 03:03:27AM

What we need is a solution that 'fixes' (really breaks) iCal invites we are sending to outlook 2007 users.

[ Reply to This | # ]
Right tool for the job
Authored by: Anonymous on Dec 29, '09 12:35:51PM
Please don't use grep with a redirect. Remove blank lines with sed:
sed -i -e "/^$/d" $@
That modifies the original file without a backup. If you really need a backup:
sed -i.original -e "/^$/d" $@
or with an ISO UTC timestamp:
sed -i.$(date --utc +%Y%m%dT%H%MZ) -e "/^$/d" $@
And now, instead of step 5, simply add a second line in your shell script:
open $@
This reduces overhead by not taking an Applescript detour.

[ Reply to This | # ]