Automators 1: Automating Calendar Events

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.

1 Like

Does anyone have a shortcut that I can search certain events every month and it puts it in a list order?

@Jjm, can you clarify what you are looking for?

What do you mean by “certain events”? Do you just want to search for some text in the title, events that are of a particular length,…?

What do you mean by “list order”? Display what information in the list, just the name for example; and what order do you want? Chronological, alphabetical, and ascending or descending?

For the list is it just a list that you want to view, like an itinerary, or is this an actionable list where you want to select one or more events and do something with or to them.

@sylumer good questions. I would like to search a month or more at a time for my overtime at work. When I work it I add it to my calendar as a separate event in the title.
Then I would like to put it in order of when I worked it, for example…
Jan 1 9 hours
Jan 5 6 hours

Here’s an approach that might work for you.

Specify the calendar and the search term in the first action. The shortcut then loops over the returned events, extracts the start time, and calculates the duration. In both cases I’ve set the formatting to match your output specified in your clarification post.

Please note that the shortcut will ignore days of duration as you are assigning overtime to specific days and also seconds as it is not significant to specify any event time at that graularity, if you are then reporting it back in hours. i.e it only process hours and minutes of duration.

Expand to show shortcut details

Hopefully that’s a good starting point for you.

Thanks @sylumer I will try it out

Just curious why this message comes up. I know someone probably asked this question, but I forget what the answer is.

You should put the “ask for input” date in the end time too, and double check to make sure it’s formatted as just the date :slight_smile:

6 pm refers to the day you are creating the shortcut :wink:

Wouldn’t it be the date the shortcut was run, rather than the date that the shortcut was created? :thinking:

Is it possible to add events to a shared calendar? I tried and it came up with an error. 20

Ok now I’m getting the boolean error as above by @jplacek. I’ll redownload the numbers sheet to see if that works otherwise I’m a bit stumped.

Hello,

This isn’t my shortcut but I think its pretty great. I have a couple questions.
Do you have to use a variable for the date?
in the “Add New Event” it says “date” next to the time, could you just use a ask when run? would that do the same thing?
How do you get the time to stay set to the specified times? when I try to make an add new event on my own it will give me the time the it is now, not the time that I have in the event.

https://www.icloud.com/shortcuts/d0832fec66ab4747892363a24618ea62

You could use a magic variable instead.

Not quite.you could use an ask when run to specify the date and time and do it twice. Once for the start and once for the end. The approach the author set out asks you the date just once and make use of preset times. It is obviously less flexible, but a faster entry - it befits being a template as described.

Hopefully the answers above and this question together give you the insight to understand the answer to this question… after all, that’s the intent behind the original by the looks of it. :wink:

Hi, just finished this episode. Thank you. I especially like David’s concept of event confirmations. Sadly I couldn’t get the Workflow shortcut working. Is someone here can help please with 2 questions.

  1. Why we have to enter email password and technical configuration into Workflow. Why it didn’t use system email compose controller like other iOS apps. Since it is a manual step, I don’t really get why the Workflow app demands our email password. Once I’ve added my email password, there’s no clear way to remove it, so I had to change it in Hover.

  2. The script only worked first time. When I ran it again, and again, it skips the beginning actions and goes into “Who are the recipients?” action.

Thank you.

This is to enable background mail sending, it’s not required. Tapping the settings icon on the “Send email” action (top right, next to the button to delete that action), will let you delete an account from Shortcuts.

Did you add any filters to the find calendar events action? If it doesn’t find any calendar events then it won’t bring up the choice.

Thank you Rosemary, I think it doesn’t find any events. I found Mail settings too.

Wanted to check in to ensure this still worked. I have my work calendar dates that I want to put into my Family Events shared calendar. Is all working?

Holy thread bump, batman (and nuke this if it’s out of order), but this was the first thread that came up when I looked for adding multiple, non-repeating calendar events to Fantastical. Do the tips here still work, or has something changed? Before I potentially wipe out my whole calendar, I want to check!

Thanks, y’all.

Late to the party as I’ve just discovered this podcast!
I’m trying out the Calendar Event Templates for shortcuts but every time I make a fourth entry and duplicate the start and end time actions the connections break


This results in the new event not being run as the end times are corrupt.
How do I fix the connections for input and output between the two?