Shortcut for automatically renaming specific calendar events?

Hello all, my first post here!
At work we recently switched to O365. I found out that Viva Insights can automatically block off focus time in my calendar, based on my availability. The problem is, that my colleagues see those blocks and think “Oh she’s not in a meeting” and send me meeting invitations anyway. I would like to change the title of those events to “Not available”. That way it’s more clear that they really can’t schedule a meeting with me.
Is it possible to get events called “Focus Time” out of the calendar and rename them to “Not available”, preferably automatically in the background whenever Viva Insights makes them? I use Fantastical on iPhone, iPad and Mac, although everything is in Calendar as well.
Thanks in advance!
Patricia

Creating a calendar event is not a trigger for a Shortcuts automation directly. For that, you would need something like Zapier, IFTTT or Make to monitor your calendar and then trigger the automation.

You could use a personal automation to run a Shortcut daily (or every hour or minute if you need the changes rapidly implemented) to change the titles, something like:

Hope this helps.

Thanks for your reply, Tony! I created the shortcut exactly like you suggested, and ran it manually. It doesn’t seem to work though… nothing changes in my calendar. Am I missing something?

What happens if you run a shortcut with just the Find action for Calendar Events? When it runs, you should get a result set shown in Shortcuts that you can swipe through showing you a set of all of your matching events.

The matching events are all processed by the loop, hence the first thing to check is what is being passed to the loop.

If you are getting no matches, then remove the filter and check you get results. If you do, check the title of the events you wish to rename are indeed an exact match to “Focus Time” - assuming that is exactly what you entered as Tony did above.

If without a filter you are still not getting your calendar, check that your Exchange/O365 calendar is set up in your Apple calendars and that you are not just accessing it directly via the Outlook app (I think that was a possible set up in the past - it’s been a while since I set it up). Shortcuts is working on calendars that are setup for use with the OS, so you may need to look into that if tyou do not have that setup.

Hope that helps.

1 Like

@sylumer has listed the best steps for tracing the issue here; one more check is that you have the little line joining each of the action steps to the step above it; this will confirm the flow of the data through the Shortcut

If none of these work,

  • share your Shortcut here and we can have a look at that (preferably sharing rather than a screenshot);.
  • share a (sanitised) screen grab of your Calendar to see if anything else sticks out.

Thanks for your valuable input, @sylumer !

I didn’t get any results when I left only the first step intact. That led me to the fact that I had put “Focus Time” in the search field, while it should be “Focus time” (no capital T there).

Then when I reconstructed the initial shortcut, it ran. But now I have a different problem :wink: In Apple Calendar, it correctly changed all the events to “Not available”. However, I always use Fantastical, and in Fantastical all the events still show up as “Focus Time”. At work I have to use Outlook, and there they show up as “Focus Time” as well. Both Apple Calendar, Fantastical and Outlook use the same MS Office account to add this specific calendar. Other events sync perfectly fine between the three, but the changed event doesn’t. Any ideas?

Check which calendars you are working with and how often you have them set to sync. Usually Fantastical will be using your device calendar store and should show identical results to the Apple calendar app. But until the results are synced from device to the cloud, other devices accessing the calendar live or via sync will show the old data.

My calendars usually show updates within a few seconds. I’ve refreshed them manually a couple of times, and it’s been 20 minutes now, with no changes… Fantastical and Outlook still show “Focus time”.

If your Apple calendar app is showing something different then you are not looking at the same calendar in Fantastical, or at least not the same localised source. You need to check your setup as per my note above.

I found the problem: https://discussions.apple.com/thread/253787531. It seems to be working now that I ran that script.

So I’ll try and combine the script from the thread on the Apple site with the input from @Tony and @sylumer so everything will run in the background.

Thanks so much!