{
  "name": "Create AI-generated Spotify playlists with GPT-5 and email the link",
  "nodes": [
    {
      "id": "0809e2a2-9715-4338-be18-bce3073ca7ff",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -2336,
        -224
      ]
    },
    {
      "id": "43d77fbe-b6f4-4a47-8a2c-080b020860ab",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -2480,
        -224
      ]
    },
    {
      "id": "e0ba9f10-d58a-449e-957e-a390f9714d62",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -2640,
        -384
      ]
    },
    {
      "id": "b2ea230f-891f-43ee-86bb-c6ff7039d978",
      "name": "Send email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -1440,
        80
      ]
    },
    {
      "id": "077381fd-012e-4084-a475-acb869b496c7",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3296,
        -640
      ],
      "parameters": {
        "width": 528,
        "height": 1072,
        "content": "## ⚙️ Prerequisites & Required Setup\n\n### 1. Spotify Account & OAuth Credentials\n- What it's used for: Authenticating with Spotify API to search for songs, create playlists, and add tracks to playlist"
      }
    },
    {
      "id": "fa0d3a7e-9224-4614-9ebf-6aabebe50493",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2720,
        -640
      ],
      "parameters": {
        "width": 1600,
        "height": 1072,
        "content": "## 🎵 Create custom Spotify playlists using AI based on event details, then automatically send the playlist link via email.\nThis workflow combines OpenAI's ChatGPT with Spotify's API to generate tailor"
      }
    },
    {
      "id": "579b2953-a798-4c88-9e11-bb608a216eec",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2688,
        -512
      ],
      "parameters": {
        "width": 480,
        "height": 432,
        "content": "### 1. Form Input & AI Generation\nCaptures user input and uses AI to generate a playlist concept.\n\n"
      }
    },
    {
      "id": "c6acfd97-7ed3-4998-8fcd-b0ab151ba29d",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2480,
        -384
      ]
    },
    {
      "id": "40f41fc8-b246-4f99-8c6a-6aaacaccb911",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -2064,
        80
      ]
    },
    {
      "id": "50d68e52-a572-4089-a615-38727cc69968",
      "name": "Search Spotify for Song",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1872,
        80
      ]
    },
    {
      "id": "39097a8b-1ab7-4277-8ae1-f17fb36b915d",
      "name": "Extract Track URI",
      "type": "n8n-nodes-base.set",
      "position": [
        -2064,
        224
      ]
    },
    {
      "id": "83e29034-bda1-40e1-b61c-69428a989e42",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        -512
      ],
      "parameters": {
        "width": 480,
        "height": 432,
        "content": "### 2. Playlist Creation\nAuthenticates with Spotify and creates a new playlist on the user's account.\n\n"
      }
    },
    {
      "id": "d5ae08dd-f58a-431c-99fc-5cce67ca3930",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        -48
      ],
      "parameters": {
        "width": 480,
        "height": 432,
        "content": "### 3. Song Search & URI Extraction\nSearches Spotify for each recommended song and extracts track URIs.\n"
      }
    },
    {
      "id": "55f7c926-d7de-493d-8dff-eb8ec48410d7",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        -512
      ],
      "parameters": {
        "width": 480,
        "height": 432,
        "content": "### 4. Add Tracks & Merge Data\nCombines all track URIs and adds them to the newly created playlist.\n\n"
      }
    },
    {
      "id": "6d4aa54a-c054-4ae8-998f-6db35d543bab",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        -48
      ],
      "parameters": {
        "width": 480,
        "height": 432,
        "content": "### 5. Email Notification\nSends the user an email with their new playlist link. \n(Alternatively use Gmail or Outlook node)\n"
      }
    },
    {
      "id": "5f46eca6-9f76-4ead-b916-bf28e389958e",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -1536,
        -384
      ]
    },
    {
      "id": "d6f0885c-a040-4dc2-a6ba-9b56577982c0",
      "name": "Build URIs Array",
      "type": "n8n-nodes-base.code",
      "position": [
        -1872,
        224
      ]
    },
    {
      "id": "85da7c1c-e338-4baa-8b78-5f2f42042a4f",
      "name": "Get Spotify User ID",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2064,
        -384
      ]
    },
    {
      "id": "676c2301-9a2e-4685-ac12-9f683054be47",
      "name": "Create Spotify Playlist",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1872,
        -384
      ]
    },
    {
      "id": "4d20c12f-9055-4472-8e3e-9d5bf259eb43",
      "name": "Extract Playlist ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -1872,
        -208
      ]
    },
    {
      "id": "0cb6dfd9-3b41-4299-b60b-eb068d0316b5",
      "name": "Add Tracks to Playlist",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1344,
        -384
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Add Tracks to Playlist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Get Spotify User ID",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Search Spotify for Song",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build URIs Array": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Extract Track URI": {
      "main": [
        [
          {
            "node": "Build URIs Array",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extract Playlist ID": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Spotify User ID": {
      "main": [
        [
          {
            "node": "Create Spotify Playlist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Tracks to Playlist": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Spotify Playlist": {
      "main": [
        [
          {
            "node": "Extract Playlist ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Spotify for Song": {
      "main": [
        [
          {
            "node": "Extract Track URI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}