Check out an example of this being used:
If you have the Spotify Desktop App on your PC you can get the URI to use with the Browse URL action right away:
Basically, you can skip to step 3! Just addat the end of the Spotify URI to start playing it automatically!Code (Text)::play
This works for playlists, but also for Albums and possibly other types of URIs!
STEP 1 - CREATE TASK AND SET DEFAULT PARAMETER TO TEST
Setting %par1 manually like this will make it easier to test the task without having to create an additional task just for testing purposes
- Create a new task called Play Spotify Playlist From Share
- Add a variable set action where you set %par1 to a playlist link you get from the Android Spotify app when you go into a playlist > Menu > Share > Copy Link
- Add an If condition to that action, making it only set if %par1 is not already set
STEP 2 - GET VARIABLES FROM SPOTIFY PLAYLIST URL
This regex will get the user id and playlist id from the URL and create Tasker variables with those values
- Add an AutoTools Regex action
- Set the Text field to %par1 (which contains the Spotify URL)
- Set the Regex field to /user/(?<userid>.+?)/playlist/(?<playlistid>.+?)\?
- Accept and go back to Tasker
STEP 3 - OPEN SPOTIFY URI
- Add a Browse URL action
- Use the following URL:Code (Text):spotify:user:%userid:playlist:%playlistid:play
- Make sure to add the play at the end there, so that the playlist starts playing and doesn't just open
STEP 4 - TEST FROM ANOTHER TASK
- To call this from another Task simply use the Perform Task action and set Parameter 1 to the Spotify URL you got from the app
It seems that Spotify doesn't start playing automatically if the screen is off, so if you want to ensure that it does, use the Turn On action at the start of the task
If you want to send the playlist remotely like in the demo video you could use a profile to receive a share and send the link to another device with Join. Click here to import a profile like that. Make sure to edit the condition with an AutoShare command you want, and edit the task to send the command to the device you want.