It was frustrating to know that although Shortcuts gives support to Apple Music, Spotify does not have the same level of support for whatever reason, which is bad for Spotify users like me.
I just wanted to do one simple thing: Copy what Rosemary suggested on the last episode and automatically play a playlist when my wake up alarm is turned off. Unfortunately, it is not easy nor straightforward to automatically play a playlist using shortcuts. You can do it using URI schemes and play specific songs or albums (for example, spotify:track:4eVzQQ1Hx3uBBilGNlyMgQ), but it doesn’t quite work for playlists, though. It opens the app and loads the playlist. It just does not play automatically.
So, after searching for a bit, I found a workaround. It relies on using another app called Shortcutify, which I would like to recommend. I am an user, and not affiliated to this app in any way.
This app is similar to toolbox pro. It adds functionalities to Shortcut to apps like LIFX, Airtable, Google Mpas, Google Drive, Spotify and a few others. The caveat is: For most of it, it requires an API key or credentials for identifications. It is not straightforward, but after you set up you don’t have to worry about it anymore.
For Spotify: You have to download Shorcutfy, and then go to the Spotify developers dashboard and create an app to get a Client ID and Client Secret.
After getting it, you need to read the instruction on Shortcutify on how to set up the Sportify actions set. This is required because a specific callback URL should be added to the spotify app settings. If you have any trouble, go to Shortcutify -> Spotify -> Setup Instructions
And after that you are set. Now you just need to go to Shortcuts and create actions from shortcutify. One of the actions is “Spotify: Play Spotify URL”. You can pass the URL of your playlist, and select the playback device. This will send the Spotify server which device you want this to be played. For my case, it is my phone. But you might want to play on your other devices connected to your account as well.
Very neat little app