{"product_id":"plex-music-smart-playlists-with-ollama-llm-n8n-workflow","title":"Plex Music Smart Playlists with Ollama LLM (n8n Workflow)","description":"\u003ch3\u003eAutomatically classify your Plex Music library and rebuild “smart” playlists using an Ollama LLM\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow runs on a schedule to scan every track in your Plex Music library, sends batches of track metadata to a local \u003cstrong\u003eOllama\u003c\/strong\u003e LLM for playlist classification, then recreates and fills matching Plex playlists—while skipping spoken-word content.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns weekly\u003c\/strong\u003e and queries your Plex server for library sections and the server machine identifier.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSelects your Plex Music library section\u003c\/strong\u003e and paginates through it to collect and normalize track metadata.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eBatch-sends tracks to Ollama\u003c\/strong\u003e (via \u003ccode\u003e\/api\/generate\u003c\/code\u003e) to assign each track to one of your predefined playlist names or \u003ccode\u003eSKIP_NON_MUSIC\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eParses and validates responses\u003c\/strong\u003e, accumulates an ID-to-playlist mapping across all batches, and excludes tracks marked \u003ccode\u003eSKIP_NON_MUSIC\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRebuilds playlists in Plex\u003c\/strong\u003e: for each playlist group, it fetches existing Plex playlists by name, deletes any matching playlist, creates a fresh playlist, seeds it with the \u003cstrong\u003efirst 50 tracks\u003c\/strong\u003e, then appends the remaining tracks in \u003cstrong\u003echunks of 50\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCreate and refresh mood\/genre-style playlists from your Plex Music library without manually sorting tracks.\u003c\/li\u003e\n  \u003cli\u003eExclude spoken-word tracks so your playlists stay music-focused.\u003c\/li\u003e\n  \u003cli\u003eMaintain always-current playlist contents with a weekly automated job in n8n.\u003c\/li\u003e\n  \u003cli\u003eUse a local LLM (Ollama) to control classification logic without sending your library to third-party AI APIs.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePlex integration:\u003c\/strong\u003e uses n8n \u003cem\u003eHTTP Request\u003c\/em\u003e nodes (requires an HTTP header credential including \u003ccode\u003eX-Plex-Token\u003c\/code\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLLM integration:\u003c\/strong\u003e calls \u003cstrong\u003eOllama\u003c\/strong\u003e at \u003ccode\u003e\/api\/generate\u003c\/code\u003e to classify track batches.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCore n8n nodes:\u003c\/strong\u003e \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003eset\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003esticky note\u003c\/code\u003e, \u003ccode\u003ehttp request\u003c\/code\u003e, and \u003ccode\u003esplit in batches\u003c\/code\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003eSetup notes:\u003c\/strong\u003e replace \u003ccode\u003eMY_N8N_HOST_OR_IP\u003c\/code\u003e in all Plex HTTP Request nodes, ensure n8n can reach your Plex server, and confirm the target library contains a Music section (type \u003cem\u003eartist\u003c\/em\u003e) with track items.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45756676014259,"sku":"N8N-17744","price":48.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/bApKAZUj0Tr7Ak46FpnXW_lbbw7J6L.png?v=1785748009","url":"https:\/\/buyflowscripts.com\/products\/plex-music-smart-playlists-with-ollama-llm-n8n-workflow","provider":"N8N Commerce","version":"1.0","type":"link"}