Event triggers for Shortcuts iOS 15

Trying to get my sleep playlist to start playing when Sleep Focus turns on and to stop playing when Sleep Focus turns off.

I’m combing through the Shortcuts Field Guide (and I know that’s from iOS 13 days) and it seems like I need to use an event trigger to get this accomplished, but I’m not finding how to add such a trigger to the shortcut.

A little help, please?

Untested, but at the bottom of the shortcuts app click “automation”.

Create personal automation.

Scroll down to focus and pick the focus mode.

Under scripting you can run a shortcut (or you could access the music app directly).

Hope that helps!

Got it to work to start playing…now to figure out how to have it stop playing when Sleep Focus is off.

Thanks!