Automator throws an error when trying to quit Mail.app

I had the same problem. Checking the 'ask to save changes' seems to resolve the issue.