Rebuild mood playlists from your Plex music library
At a glance
A Plex user runs local Ollama classification over track metadata and recreates playlists for listening contexts such as focus or workouts. This workflow is listed under Music, Local AI, Personal Library.
SourceBuilding a tool for these workflows? See weekly rates.
What they did
1) Have self-hosted n8n, Plex and Ollama reachable from one another, with tracks in a Plex Music library of type artist. Import the workflow and add a Plex HTTP-header credential containing X-Plex-Token. 2) Replace the Plex host in every request node and the Ollama host on port 11434. Install the selected model, such as gemma2:9b, and match its name in the model request. 3) Edit the playlist names and classification prompt, then review the weekly schedule. Matching existing playlists will be deleted and recreated. 4) Run the workflow to fetch track metadata in pages, classify batches with Ollama /api/generate and validate the track-to-playlist assignments. 5) Inspect the recreated Plex playlists; the workflow seeds each with 50 tracks and appends the rest in batches of 50.
How it went
The author reports successful testing with a library of over 16,000 tracks and 16 GB allocated to Ollama.
Worth knowing
Classification depends on ID3 metadata quality and prompt tuning.