Templates / Create playlists and control your Spotify player with GPT-4

Create playlists and control your Spotify player with GPT-4

Needs changes

by Guillaume Duvernay ✓ · 4,849 views · created 2025-07-12 · Personal Productivity, AI Chatbot

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 22 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects OpenAI Chat Model and Spotify.

How it runs

Trigger: When a chat message arrives (plus 1 other trigger).

  1. Spotify Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 6 tools (Next song, Pause player, Resume player, Play a playlist…); memory: Simple Memory
  2. Ideate playlist (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model; output parser: Structured Output Parser
  3. Create playlist (Spotify): create (playlist)
  4. Get tracks array (Edit Fields (Set)): sets 1 field: Tracks
  5. Split Out: splits a list into separate items
  6. Search the track (Spotify): search (track)
  7. Get track IDs (Edit Fields (Set)): sets 1 field: Track ID
  8. Add track to playlist (Spotify): work with playlist
  9. Get the final playlist (Spotify): get (playlist)
  10. Clean data to share with agent (Code): runs custom JavaScript code

Services it uses

OpenAI Chat ModelSpotify

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in Spotify Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
Spotify Agent (v1.9)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Rarely used nodes in this template: n8n-nodes-base.spotifyTool

Nodes used (13)

From the author

This n8n template provides a powerful AI-powered chatbot that acts as your personal Spotify DJ. Simply tell the chatbot what kind of music you're in the mood for, and it will intelligently create a custom playlist, give it a fitting name, and populate it with…

Excerpt from Guillaume Duvernay's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.