Playlist rules

Choose what your Spotify bot keeps updated. Spotify rankings use Spotify’s time windows. Play-count rules use the listening history imported into your bot.

Keep each playlist ID the same when editing its rules so the bot updates the same playlist. Removing a rule stops its updates. To rename a playlist the bot already created, rename it in Spotify.

Apply rules in GitHub

Set up the bot once before applying rules. An all-time play-count playlist uses the listening history imported into your bot.

  1. Choose Copy rules for GitHub above.
  2. In your private repository, open Actions, choose your playlist sync workflow, and click Run workflow. Use the default branch.
  3. Paste the rules into playlist_rules and click Run workflow. When the run succeeds, open Spotify to see the result.

Submitted rules replace the bot’s current playlist rules. The workflow uses the encryption secret already saved in GitHub.

Missing the playlist_rules field?

For a private repository made from the Neon Music starter, install these two files once on the default branch. If you customized your workflow, keep those changes when adding the new input and step.

Apply a rules download locally

  1. Set up your bot first. For an all-time play-count playlist, import your Spotify Extended Streaming History into that bot.
  2. Download playlist_rules.py into your bot folder next to cloud.py. Put the downloaded neon-music-playlist-rules.json there too.
  3. Download the latest state/config.enc from your private GitHub repository into the bot’s local state folder. From the bot folder, run python playlist_rules.py neon-music-playlist-rules.json using your existing local rotation-key.txt.
  4. Upload only the resulting state/config.enc back to the same path in your private repository. Open GitHub Actions to check the next playlist sync.

The website exports rules only. The local script updates just the encrypted configuration using your existing key.