Automators 1: Automating Calendar Events

episode

#107

I use Fantastical and how it works is detailed in this video:

However there is an AppleScript in this thread that works with the calendar app and the same spreadsheet:


#108

I use week cal, is it possible to have a short cut ask me questions about something I want to add for an event. I have a great picture of what I want to do in my head but I don’t know how to do it. I want to make it similar to the video that @MacSparky made of using shortcuts as your menu for everything on your phone, but I only want to do it for the calendar.


#109

I found the correct syntax. It is “missing value”.


#111

So I’ve figured out why the KBM macro would only add the last event, it was because KBM was trying to add them too fast. Here’s the updated script that works.

tell application "Keyboard Maestro Engine" to set myEvent to getvariable "Event"

tell application "Fantastical 2"
    parse sentence myEvent with add immediately
    delay 1
end tell

Also, if you want to go nuts like I did, you can use this RegEx to allow you to paste in events from rows and columns (not just rows like the example), by turning tabs into newlines. I use the spreadsheet to create multiple events based on one original date, and this allows me to do this.


#112

@RosemaryOrchard How come in the Numbers spreadsheet, the formula is using ifs and isblanks with concatenation vs solely using concatenation? I used concatenation and it seemed to work just fine. This is completely an intellectual question.


#113

That’s because depending on what you put in the columns it might not work with the blank things - I am adding words. Plus this way if you want to paste the event list into an email it’s already pretty


#114

Yes, the concatenate only is definitely not as pretty. I also added a column for time starts and just added cell references to include that column and it worked beautifully.


#115

I will put up a web page showing the shortcuts I made to make my automation work. An email comes in once a month with dates and a titles of two movies. I wanted this to be automated. Did it with Shortcuts and use Regex along the way.

I made a video demonstration of the Shortcuts made in the Shortcuts app. I took the body of an email and sent it into the automation. Out of the other end I had 2 calendar events. I used Fantastical within Shortcuts ot make it work. I even got fancy by having the main shortcut run 4 shortcuts in it to parse the text the way it was needed to make it work in Fantastical.

Love using automation. Learned a lot about Shortcuts app and had to think like a programmer to make it work. Took ages to set it up and it will take a long time to get back the time in savings from using the shortcut. But - I had a great learning experience.