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

The Projects That Matter The Most To Me Are Small

The case for thinking smaller, while achieving more.

I love copy and paste

Never do the same work more than once

Uplift Desk Thoughts

5 Months In With An Uplift Desk

Stay in Touch

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