Trying to run a shortcut at a given start time based on a calendar event

I’m trying to run a Mac OS shortcut, which should trigger based on the start time of an iOS subscribed calendar event. Any thoughts?

Your question could mean different things.

Firstly, there is no "trigger" for such a thing, but you could write a macro that could run and "check" if it's time to take action.

Second, you didn't say if you wanted it to trigger on every event on a subscribed calendar, or just for certain events on a calendar.

Thirdly, you didn't say if you were willing to give the "name" (web address) of the subscribed calendar to your KM Macro, or whether you absolutely weren't willing to do that. If you're not willing to do that, you may have serious difficulties, but if you are willing to do that, your difficulties will be only moderate.

Fourth, you didn't say what you wanted to happen when an event occurred. Do you want to receive a text message? Or a macOS notification? Do you want the notification a day early or an hour early? Etc.

But let me say it is possible. You see, a subscribed calendar comes from an "ics" file type, and those file types tend to be distributed by a web address. Do you have the web address if the ics file that you downloaded?

All ICS files are, I believe, text files, and here's what one looks like:

The fields are all easy to read. It wouldn't be that difficult for someone to write a KM macro to read the appropriate fields and provide a notification. But you have to answer some of the above questions.

And I likely won't be able to write it myself, because I will be leaving on a vacation in a week and I'm not sure when I might come back to this website. But your task is interesting and I'll put it on my mental list of things to investigate in the future.

Thank you for such a thorough response as I did neglect to include many details. That said, I’ve made progress in extracting the date and time of the calendar events which should trigger a particular KM macro at the given date and time.

My next question is how can I pass this info (example output: Dec 11, 2023 at 7:30 PM) to KM which will then schedule the macro to run at the given date and time?

Thanks so much for your help! :grinning:

What is your progress? Did you write a macro? May I see it? Do you have a web address for a sample ics file? For the time string you provided, is that UTC time or local time? The ics file contains a mix of UTC and local times. Have you done the conversion in your macro?

I haven't decided what the best approach would be for scheduling a macro using a time string. I can see different possible solutions to making this work.

Another user recommended the macOS app called Rules, which is dedicated to accomplishing this very task. It’s simple and seems to work very well. That said I thank you so much for your time and effort. :grinning:

You're welcome. I'm glad I could help. But there's not much more I can do until some of my questions are answered. I need to know the details about what you want, and about what progress you've made regarding data extraction.