I think there’s a thread from Episode 1 about this in a way. Automating sending an email from a calendar event
I feel like I need a Hazel for my calendar, so that there can be a rule like, “If an event with this kind of text is added to the calendar, do this thing.”
IFTTT does allow a little of this to happen if it’s a Google Calendar but the action needs to happen on my Mac, and not in webspace.
I’m wondering if anyone has used Hazel to somehow watch their calendar? I’m not entirely sure what file I would watch or how it’s stored (whether I would be able to capture it).
Or any other solutions?
Hazel’s for files, not for calendar monitoring.
So maybe change the problem to a file one.
You already noted IFTTT can monitor a Google calendar. What if as a result it then produced a file in a cloud service? For example, Dropbox; and that file had relevant calendar event details in it.
Then if that file sync’d to your Mac and Hazel was watching for an “event file” appearing, it could then take local action.
IFTTT won’t do it, but Zapier might.
If Zapier works, that’s probably the easiest solution.
The only thing I can think of is icalBuddy which can parse your calendar and look for your text.
However, I don’t know how you would “trigger” it, other than periodically running the command, and then looking for changes compared to the previous output.
It might be do-able, but it would be fairly involved. That being said, if you want to investigate it as an option, let me know some more specifics and I’ll see if I can help.
@sylumer’s solution is probably the best way to go. But a couple of other options, just in case:
I believe at one point it was possible to set an Automator event to run as a calendar alarm. I don’t know if that’s still available but that could be an option depending on your needs.
Alternatively it’s possible you could create the trigger when the event is created. Again depending on circumstances. For example if you are creating events from Shortcuts/KM/similar you could use the same Hazel trick as you might with Zapier. I imagine, still, that Zapier is the best choice, though, unless you really needed to not have any internet involved.
That was removed from iCal / Calendar several years ago, but it might be possible with BusyCal or Fantastical on the Mac.
I have Zapier monitor my calendar and create OmniFocus projects and actions via a Dropbox file and Keyboard Maestro macro.
I add a short text string into the notes field of the calendar appointment depending on what I’d like to have happen. “.wme” will add actions to process travel and other expenses for a work-related meeting. “.inv” will create a draft invoice inside Xero for a meeting with a client. I have another than creates travel time “appointments” either side of a meeting outside of the office because travel time doesn’t sync with my calendar setup. I can combine as many of these strings as I like depending on what I need.
This is a little more complex that just having OmniFocus actions created by Zapier with an email sent to my OmniFocus address but it means that I can use taskpaper format to have the actions automatically filtered where they need to go in my OmniFocus project hierarchy without me having to manually process them from the inbox.
Quick side note: although my calendar’s hosted in Google I use Fantastical on the front end.
I’m not sure how you’d go about doing this if your calendar is purely local to your device other than some sort of time-triggered scripting solution.
Just further to this: I only have a High Sierra Mac at the moment, but I have just discovered that I can still do this on that machine—but it requires an ‘On My Mac’ calendar. Instructions: https://www.idownloadblog.com/2018/10/19/mac-calendar-open-file-alerts/
For most use cases, probably not that useful, but for others (like, happily, the one I’m looking into at the moment) it is an option. Just in case that turns out to be useful to others later!
I’ll report back once I have access to a more recent macOS, too.
Still works on MacOS 12.6