Trigger automation from a calendar appointment

Is there any way to put something in a calendar appointment that will trigger an automation? E.g. appointment shows someone arriving for dinner, I’d like to turn on outside lights 10 minutes before the start of the appointment and off again say, 4 hours later.

Have a look at this discussion.

If you have a scheduled script that runs periodically and can read your calendar, it can take action in any number of ways you acre to program it to.

It might also be worth having a listen of episode 1 as I think there was some mention there too of driving automations from a calendar via web services and home automation can often be triggered via such web services.

Hope that helps.

Many thanks for this, I’ll follow it up.

Just tested. Using Calendar “Open File” to launch an Automator works on MacOS 12.6.

Make sure its an “On my mac” calendar, iCloud doesn’t play nice with “Open File”