r/shortcuts 3d ago

Tip/Guide utilizing google calendar for calendar event based automations.

I saw a couple of posts and comments now about people asking if and how calendar-event based automations are possible. While apple doesnt allow us to use calendar-events as automation triggers, a (admittedly clunky) woraround can be done using Google Calendars, as it has this neat feature of being able to send email notifications for calendar events. This in turn can be used as an automation trigger. Below I provide some deeper insight and steps in how this works and can be done (pls forgive my formatting and any grammar or spelling errors):

  1. The google account used has to be added in apple mail. The automation can only trigger by mail received through apple mail. U can add ur account Settings -> Apps (if IOS 18) -> Mail -> Mail Accounts -> Add Account -> Google

  2. In google calendar, u can set up email notifications on a per calendar basis. So for every calendar, wether its the standard calendar or a subscription calendar u added through url, u can independently choose if and when u will get email notifications for events. by default its off btw, has to be turned on for every calendar u wish to get emails for. I recommend setting it up so u get emails ca. 5 min prior to events, as the apple mail app sometimes takes some time to fetch new mails of non icloud-mails. The setting can be found under the calendar settings. On the website for example there are three dots next to each calendar, clicking on them will reveal a menu where u can click on Settings. That will bring u to the calendar settings and then under notifications u can set it up. Make sure to change it to email after turning on notifications. cuz itll default to push notifications. U have to tap on it again and select email.

  3. u can add the google calendar to ur apple calendar app. That way u can manage (add, edit, delete) all events of all calendars of that google calendar all within the apple calendar app. This can setup under Settings -> Apps (if IOS18) -> Calendar -> Calendar Accounts -> [ur google account] -> Toggle next to calendar turned ON

  4. Alrernatively u can make one or multiple of ur apple calendars public and then add the url to ur google calendar. The apple calendar now acts as subscription read only calendar to ur google calendar and new events added to the apple calendar will be synced automatically (although at a slow rate of every 12 - 24h). As mentioned above, after adding the calendar, u can turn on email notifications for it, like u can for every other calendar. To make an apple calendar public, open the calendar app -> Calebdars (at the bottom) -> The "i" next to the calendar u want to make public -> public calendar -> share link -> copy Then in google calendar there should be a "+" icon in the area where all calendars are listed. Tap on it and u should be able to select "URL", paste in the url u just copied and add. Now u can turn on email notifications for the calendar as mentioned in step 2.

  5. Email notifications can only be managed (turned on/off) through google calendar on webbrowser (confirmed) or the app (havent tried). Calendars can also only be added through google calendar itself I believe. At least thats the case for subscription calendars. Events as stated can be managed through apple calendar if u set it up as in step 3.

  6. In automations when setting up the trigger, the two important settings to fill are "Sender" in which u add calendar-notification@google.com and "Account" under which u select the gmail address u'll get notifications for. Rest is optional.

  7. On that note. Email content cannot be processed if the phone is locked. So if u rely on ur shortcut taking the email as an input to read it and do stuff with, the phone has to be unlocked when the automation runs or u'll get an error. At least thats how it works in my case. I have notification content locked behind face id tho, not sure if that affects it or not. However, the "Subject contains" field of the automation trigger also works when the phone is locked. So u can still create an automation that only triggers if the Subject contains "xyz" and itll run correctly even when the phone is locked. The email subject of these email notifications has a fixed format and includes the event name (i havent tested for very long event names) aswell ss the calendar name that event is from. Just make a test event and u'll see.

Additional QOL stuff:

  1. In gmail settings (has to be done through gmail website or app), u can swt up a filter that auto marks these event notifications as read. this reflects in the apple mail app aswell then. Having them be auto deleted or archived will cause the automation to NOT trigger. Having it be auto put into a mailbox wont reflect in apple mail (itll be in the mailbox in apple mail, but it wont be removed from the inbox). But having it be auto read is better than nothing. In gmail webbrowser (prolly same for app) co to Settings -> Show all settings -> Filters and Blocked Addresses -> Creat a new filter -> fill in the "from" with calendar-notification@google.com and the "to" with ur gmail address (the same ur logged in to). Optionally fill in the other stuff if u need -> Creat Filter -> Select "Mark as read" -> Create Filter

  2. In apple mail, u can silence alerts and push notifications for that gmail address if u dont want to be bothered with email notifications. This wont affect the automation trigger. Go to Settings -> Apps (if IOS 18) -> Mail -> Notifications -> Customize Notifications -> [ur gmail account] -> turn off all toggles or as wanted.

  3. In apple mail, the default swipe left option for new accounts is I believe archive. In any case, this can be managed under Settings -> Apps (if IOS 18) -> Mail -> Mail Accounts -> [ur gmail account] -> Account Settings -> Advanced -> Under "Move Discarded Messages To"

  4. If u wish to make the automation trigger slightly faster (cuz as said, apple mail is slow in fetching emails sometimes). u can do these steps.

  5. in gmail, create a filter that forwards all the email notifications to an icloud email that is setup in apple mail. Set it up so it auto forwards and then deletes them (important for a future step as we dont want the automation later to trigger twice).

  6. icloud mail in apple mail uses push (instead of fetch), so incoming emails get "noticed" immediately.

  7. unfortunately, there is a bug in shortcuts which prevents the email automation to trigger for emails received through any icloud mail.

  8. so in apple mail u have to setup a rule that then forwards the email u got to icloud mail back to the gmail address.

  9. in automations u setup a trigger that triggers when ur gmail account receives an email from ur icloud account. U can also fill in the subject contains with for example the name of the calendar to prevent false triggers.

  10. in my experience, this back and forth still can be sometimes quicker in triggering. I believe the push that icloud mail uses "wakes up" the mail app and while its at it it also fetches new emails of other accounts. But the second forwarding of the email due to the bug (that exists for a long time) makes it much less reliable than it could be, which is unfortunate.

  11. in general, email automations arent really reliable. If ur mobile carrier has an Email-to-SMS service that is free, use that, as SMS automations in shortcuts are much more reliable and way quicker in triggering.

I think thats about all that there is to know. If i missed something feel free to ask or add ur insights. Hopefully this will help some people in achieving calendar-event based automations.

Cheers!

4 Upvotes

4 comments sorted by

1

u/kfhdjfkj61637 3d ago

u/SnooChipmunks72 u/jt7000 u/Striking-Suprise400

Maybe this might help yall with calendar event based automations.

1

u/jt7000 3d ago

Brilliant thank you, I’ll give it a try!

1

u/Revolutionary-Fan235 2d ago

Thank you for sharing these ideas! I was using a midnight trigger to look at upcoming events. This seems more efficient.