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

Choosing an idea off a dice roll

Highlight clipped from stream

Hey DALL-E, Finish The Cat Drawing

Using DALL-E inpainting to finish the cat drawing.

How NOT to add a Youtube Player to VSC

Sometimes projects fall flat due to a higher power

Stay in Touch

Each week, I send out something that looks like this. Sign up below if you want in!