Spotify Playlist → Alfred AppleScript

Paste your existing script and new Spotify playlists. Get back a full, ready-to-paste Alfred AppleScript that picks a random playlist and keeps comments so you remember what’s what.

1. Existing AppleScript (optional)

Understands URIs + -- comments

Paste your current Alfred script here (or just the part that has playlistURIs). It will scan for spotify:playlist:... and keep names from comments like:
-- Incubus
set end of playlistURIs to "spotify:playlist:..."

2. New playlists

Format: Name + URL or just URL

Each line = one playlist. Examples:
Incubus https://open.spotify.com/playlist/...
Daft Punk spotify:playlist:04b4GxtT0Q3Dqswjjygwrt
https://open.spotify.com/playlist/...

3. Generated Alfred AppleScript

Paste into “Run Script” (osascript)

Paste this whole script into a Run Script action in Alfred (language: /usr/bin/osascript (AppleScript)). If you prefer Run NSAppleScript, wrap everything in on alfred_script(q) / end alfred_script.

Content copied