Using Mac Automator to Play Spotify when VSC is Opened

All steps using Automator. Open VSC and start playing music. Flow mode!

APIs Used:

Run Shell Script (as arguments) - Open VSC

Open VSC with the open command:

Run Shell Script (as arguments) - Get Spotify Devices

cURL the Spotify API to get the active list of devices. This is so you don't end up playing music on the living room speakers accidentally.

Run Javascript - Fetch Active Device ID

Part two of above, fetching the most recent device that Spotify interfaced with.

Run Shell Script (as arguments) - Play Music on Active Device

cURL the device and hit play!

Read These Next

I Wish Programming Were More Emotional

I wish others could feel the way programming pulls on my heartstrings

A List of Good Matts

While surely there are bad Matts out there (and ive met a few!!), these are not them.

I Want to See A *Real* Horror Movie

spooky!