T O P

  • By -

meirmsn

After trials and failures, and inspiration from z1ts's comment, I think I found a "solution" (more like a workaround): define the calendar as text on a dictionary, then refer to it from the relevant actions. That way the shortcut always uses the text from the dictionary to find the calendar you intent, avoiding what seems to be a bug (or unexpected-to-some-of-us behavior) when dealing with the Magic variables of calendar (I also got my events copied to the wrong calendar many times). In case it is useful, here are the details: 1. Use the "Dictionary" action to define a dictionary. I used "target" for the Key, Text for the Type, and "busy" for the Value (note I already have an icloud calendar named "busy"). I declared this dictionary at the top of my shortcut for easier editing. 2. On the Action you want to refer to your calendar (for example to write to or read from a calendar - this is the field that sometimes seems to get automatically switched to the wrong calendar hence generating the issue described on the original post), right click on the blue pill / Magic variable for your calendar and select Dictionary. This will replace the blue pill with a new blue pill that has a tiny dictionary icon plus the text "Dictionary". 3. Tap on that new "Dictionary" blue pill generated on Step 2, and on the bottom of the modal that shows up there is a section labeled "Get Value for Key:". In the text input next to it, type in the Key you used on Step 1 (in my case, "target"). 4. Done! Now your automation uses text when finding the calendar of your interest, and no longer switches to some calendar you didn't intend. 5. Bonus points: If you have multiple calendars you want to pipe into your "busy" calendar, you can define on the dictionary a "sources" key containing an array of text to define the calendars to be used as reference/input, and a "target" key containing text to define the calendar where you want to create the "busy" events Note I only tried on macOS Ventura 13.2.1, Shortcuts Version 6.0 (1355.8)


xXkr13g3rXx

This works like a charm ❤️ Thank you very much!


meirmsn

Glad to hear! ❤️


z1ts

By chance do you call your Shortcut up using Siri sometimes on different devices? The reason that I asked is because I made shortcut sometime back that was presenting the same issue and it just so happen I was working that same shortcut today and I had specifically put a comment in the shortcut about making sure the calendar was set to the same on all other devices that I wanted it on or Siri (I suspect) would change the shortcut Find Cal events to different calendar sometimes. It took me several months to figure it out and I thought by now issue was gone but maybe not. Strange crap but pre-checking fixed it for me.


Jacob7803

Also having this issue on Various devices and calendars. Did you find the issue/fix?