Replace changes to Calendar events in "Start my day"

Hi, As the calendar events change sometimes during the day - cancelled or removed, reduced or extended in time, how does the “Start my day” shortcut reflect this dynamic changes in the calendar event? The reason to ask is if I create the periodic notes at 8 am with " Start my day" shortcut, say it has 5 calendar events. but during the course of the day, a few have undergone change. I would like to reflect the final set of events in the #events block. Else I have an outdated list appearing in the Appointments section of the daily note.

Hi @Vasanth_Kumar, I’ve taken the liberty to make your question public, as it’s a good one and not a personal/private matter. This way, everyone wins :wink:


As the calendar events change sometimes during the day - cancelled or removed, reduced or extended in time, how does the “Start my day” shortcut reflect this dynamic changes in the calendar event?

The old version you’re talking about, it doesn’t reflect changes. To keep it current, you’d have to

  1. remove the existing list of events from your note first
  2. run the workflow every time your list of events change to rebuild the list in the note

Let’s change that! I guess you could change the single placeholder with a more involved construct. The search/replace action removes the placeholder, so if you run the workflow a second time, there’d be no placeholder anymore to replace, right?

One possible way to go about it would be having not just one single placeholder but a pair, one to mark the start of the block and another to mark the end, like so:

### Appointments

%%appointments-start%%
%%appointments-end%%

Then, you could rewrite the search/replace action accordingly, so that it replaces everything in-between those placeholders. So, with this as your Daily Note template:

### Today is Tuesday,  {{date:YYYY-MM-DD}}

The weather is %%weather%%.

## Appointments
%%appointments-start%%
%%appointments-end%%

… this could be your workflow:

Download: Start my day.shortcut (23.7 KB)

Hope this helps!

Is there a way to attach screenshots here?

Thanks for the workaround. I tested and it works.

The only problem now is as follows:

  1. Run “Start my day” at 8 am
  2. Changes occurred say at 11am
  3. I re-run the “Start my day”.
  4. The events results ignores appointments from 8am-11am as it tends to only look for upcoming events.
  5. So, I loose the morning appointments from 8am-11am.

A. How can I keep the appointments for the entire day with all appointments from the start of the day till end of day, even after several re-runs, if the appointment changes during the course of the day.
B. This will help to keep the links in the notes when the re-run happens, which I intend to create for each appointment in meeting notes. I also saw your another video to create meeting notes automated. I should look into it, in the next days.

thanks for your time to provide me with answers. Few things are critical for me to assess, before I fully subscribe to this tool.

Is there a way to attach screenshots here?

Just drag them into the editor, it’ll upload them automatically.

How can I keep the appointments for the entire day with all appointments from the start of the day till end of day, even after several re-runs, if the appointment changes during the course of the day.

The workflow as-is uses the Get Upcoming Events action. Replacing it with the Find Calendar Events action should do the trick, as it doesn’t care if the start time is in the past. Here are they both, side by side:

thanks for your time to provide me with answers.

You’re welcome. Thanks for checking AFO out!

2 Likes

Hi,
Nice shortcut. But I run into a bug. When I call the weather information, I mostly get an error that the location service might be turned off or the WLAN is turned off, while both are definitely on (location service for shortcut, weather, map, etc.). Is this a common error or just on my end? Both of my Macs are running Somona 14.2.
If it works again, I will add the current city as well. I think this could be useful when traveling.

Common error, I’ve heard about that more than once. Weather can’t always access location when using Shortcuts, and … yeah, another thing that’s broken. :man_shrugging:t2:

It’s not only weather… Just fill in a “Feedback” report.

  1. Check in Mac System settings > Privacy& Security> any missing location permissions for either Weather or Shortcuts or both


In Shortcuts, Try resetting “privacy” ( Check the right side menu) for the workflow before running it again

Carlo mentioned the above steps, and it started working for me. Hope this helps.

Thanks @Vasanth_Kumar for your help. I have done all this, checked the location setting (and turned it on and off), deleted the privacy setting, reconnected the wifi and and and. As I have this problem with both my Macs and not with my iPad (wifi with no GPS) and iPhone, at least it has nothing to do with my wifi. My current impression is that it helps to have some time between executing shortcuts using the location service. But with this assumption, I may also fall into the trap of superstitious behaviour. I don’t know how to test it to make sure it’s reliable.
Nevertheless, I have filed a bug report with Apple. Let’s see what happens - but I have no hope, as the shortcuts are a huge buggy construction site.

shortcuts are a huge buggy construction site

They are, aren’t they.

Random thought: have you tried getting the location with Get Current Location to see if that works? If it does (as it’s not a Weather action) you could pass the location into Get Current Weather, as a workaround.

Yes, it is the same. I just programmed - together with my little dev-helper - a little python script using the pyobjc-framework-CoreLocation and this works without any problems. Nevertheless in shortcuts a second location call works after waiting a few minutes. So for a script calling time by time it’s ok, but not while testing when calling the location service every few second :frowning:

Huh, that’s interesting. Weird, though.

Just had another issue with the service menu. I disabled an entry of another shortcut. After enabling the entry again it wasn’t displayed. I have to reboot again. Since my other Mac behave in the same way, I will reboot more often :wink: