Adding Automator Alarms As Calendar Events

You can add Automator actions and even AppleScripts as alarms in the Calendar app on your Mac. It may look like this is no longer possible with Yosemite, but you can do it as long as you use the special Calendar Alarm document type in Automator, or if you simply use an On My Mac calendar instead of an iCloud one.
Video Transcript / Captions
Closed captioning for this video is available on YouTube: Adding Automator Alarms As Calendar Events.

Hi, this is Gary with On today's episode let's look at how to add Automator actions as calendar alarms.

So before Yosemite you used to be able to create calendar events that then had Automator tasks or AppleScript as the alarm. For instance, I would be able to create an event, say Test, and I can set an alert and choose Custom. One of the options here would be to have an Automator script run. But you no longer have that. There is a couple reasons for that but there is also ways to get it back.

Mainly the reason is that because now we all use iCloud calendars which is great because they sync across all your devices including iOS. It doesn't make sense to have Automator or Applescript events there because in iOS, of course, there is no Automator or AppleScript. You want events that will actually occur across your devices.

So one way to get an Automator script to run with the Calendar on your Mac in Yosemite is to start with Automator.

Now when I run Automator I am asked to choose the type of document. I'm going to create a new document here. I want to choose Calendar Alarm which is new for Yosemite and it is in El Capitan as well. I will choose that and then I get a blank document here. We'll add something to it. Let's add a simple AppleScript. Run AppleScript and then I'll just put in a little alert. Great.

So now I'll test it. You see it displays a little test message there. Now I'll save it. It is going to ask to Save the alarm. I'll give it a name like Test Alarm.

What it is going to do here is it is then going to run Calendar and it's going to do a few things. First it will run the script there and I'll see it there and I'll see it appear as a Notification. It also created a special calendar that is on my Mac. So this is not shared with any of my other devices. It is just on this Mac and it is called Automator Calendar. It's put that Test Alarm, it put a sample there. Basically it is set for right now. That's why the alarm went off immediately.

This special Automator Calendar here is now where any Automator task that I create as a calendar alarm will appear. It will appear under this. So this is a special calendar just for running these kinds of Automator tasks.

So let's take a look at this event here. You can see it looks like an open file alert at time of event but it is not. If you try to change that it doesn't really come up. It comes up there in that menu and then you hit Custom and it doesn't even show that here. So you don't want to mess with the type of alert or most of the stuff here for these special events.

What you can mess with is the timing of them. So, for instance, I can change it to a different time and I can even set it to repeat everyday. You can see that it appears everyday and it will go off at that time. So you can mess with that and it will work and go off at the same time everyday now. I can go back in and mess with it again. So the timing is what you want to change but not necessarily what some of those other features are.

If you want to change what the alert does you go back into Automator here. I'm still editing this script here. I can change it say so I change what text appears. I can just Command S for save. So you can do that.

You can also get to these scripts, by the way, by clicking in the Finder. If I look here at the top I can see I'm going to use the Command and click here at the top and you can see that it is saving it in my User Library folder under Workflows, Applications, Calendar, and then there is the app that is saved. So I can get access to these later even if it disappears from my Recent menu here in Automator.

Now there is an alternative and I hinted at this before. The problem is that you can't have Automator tasks running in iCloud calendars but you can have them running On My Mac calendars.

So you can create a new On My Mac Calendar if you go to File, New Calendar, you can create one On My Mac. That only appears if you already have an On My Mac calendar. If you only have iCloud calendars that won't appear. But you usually do have other calendars.

I find that if you Control click underneath Other you can create a New Calendar and it will appear as an On My Mac calendar. So if you need to create your first one, that is the trick to do it.

So with this calendar here I can select it and I can Create a New Event and under this event I can add an alert that is Open File and I can then choose Other for Open File. Now I'll go to the desktop and let's say I want to have an Automator task here. So I'm going to create a new Automator task that is an application and then I'm going to run AppleScript inside of that and Save it to the desktop like that.

Now when I go back into Calendar I can see it appear there and I can actually add it Open file and put that app there at time of event and now I can play with this in the same way I can do the Automator calendar. As a matter of fact they are kind of the same thing it's just that this one will automatically, you can create things in Automator inside calendar that will automatically will put them in here. Whereas for this On My Mac calendar I'm actually adding them manually.

So if you have been looking for a way to add Automator or AppleScript tasks to calendars on your Mac this is the way to do it in Yosemite and beyond. It actually really hasn't changed much. It's just that now with iCloud being the predominate calendar which doesn't allow those because of the limitations and other security issues and things like that you just have to know that you have to go with the On My Mac calendar or use Automator's automatic calendar to add these types of alarms.

Comments: 5 Responses to “Adding Automator Alarms As Calendar Events”

    Bernard Loewenthal
    4 years ago

    Good idea.

    Bernard Loewenthal
    4 years ago

    Good idea

    4 years ago

    Thank you Gary this is great and just what I was looking for.

    3 years ago

    Is there anyway to set up the automator to record 2 sep events on the same day? I’ve been having trouble with this issue. I set up the automator through iCalendar to record one event and that event records fine, but if I try to record 2 sep. events at two sep. times on the same day, it will only record the first event.

      3 years ago

      You’re going to have to experiment. Perhaps try setting multiple alarms for the same “event?” Also, maybe simply copy and paste the Automator script and create a “new” one that is just a duplicate with a different name and a different time in Calendar.

Comments Closed.