With one tap, add a song to Spotify when you receive a link via iMessage
Do your friends send you a lot of Spotify links through iMessage? Do you wish you could have those songs sent to a playlist automatically, so that you can listen to all of them later? If so, iMessage2Spotify is for you.
This shortcut should be straightforward enough to use on its own. I've included alerts to aid in setup. In case you get lost, here are step-by-step instructions:
- Launch the shortcut; you'll be redirected to Safari to request Spotify authorization.
- Authorize the app.
- Copy the entire contents of the page, including the brackets.
- Press "Done" at the top left corner of Safari.
- Go to the Automations tab.
- Add an Automation with the + sign in the top right.
- Select "Create Personal Automation".
- Select "Message" and choose the senders you want this to apply to.
- The shortcut already copied "open.spotify.com/track" to the clipboard, so paste that into "Message Contains"
- Under "Do", select Run Shortcut and select iMessage2Spotify.
- You're done! Ask a friend to send you a Spotify song link to test it out!
Minor issue with how automated the automation is
Apple does not allow Personal Automations triggered by Messages to trigger without user input. This means for every song link that you receive, you will have to tap on the Shortcut notification and press Run to add it to your playlist. Note that these triggers will stay in your Notification Center, so you can run all of them at once, if you'd like. You don't need to run them immediately after receiving a message.
Comment below! You can try deleting the imessage2spotify.json file in iCloud Drive/Shortcuts/ to reset everything.
NOTE: Source code for helper app -> https://github.com/iannotian/imessage2spotify. Remember to always double check the permissions that an app asks for. The app is hosted on imessage2spotify.herokuapp.com and only requests playlist modification privileges for public and private playlists. No tokens or any personal information is ever stored in the app; storage is only on your iCloud Drive. Feel free to clone and host it yourself: you'll need to figure out your client ID and secret and add those to the .env, edit the callback route, add developer account settings and find hosting. If you're going that route, you might want to look into Spotify's Authorization Code With PKCE authorization flow, so you won't need a server/secret key holder at all.
Latest Release Notes
1.0.1 - Dec. 14, 2020, 3:08 p.m.
Correctly add song to playlist after using refresh token flow