{
  "name": "Automated Spotify playlist organizer - sort and queue tracks by popularity",
  "nodes": [
    {
      "id": "cc585aa3-5d73-4032-adf7-e7a40e050963",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -336,
        -16
      ]
    },
    {
      "id": "0f1db10b-3c41-449c-aa59-bf19929f3ac6",
      "name": "Get a user's playlists",
      "type": "n8n-nodes-base.spotify",
      "position": [
        -64,
        -16
      ]
    },
    {
      "id": "d7083e5b-9233-4177-afea-a64f801a7698",
      "name": "Add a song to a queue",
      "type": "n8n-nodes-base.spotify",
      "position": [
        1296,
        0
      ]
    },
    {
      "id": "9b6865cb-44ef-4c3e-a03d-0f81eafd6241",
      "name": "Get a playlist's tracks by URI or ID",
      "type": "n8n-nodes-base.spotify",
      "position": [
        496,
        -16
      ]
    },
    {
      "id": "eb38ca65-09e1-4440-a426-57e11268ed28",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1008,
        -16
      ]
    },
    {
      "id": "11b1ab8e-f4ed-4a61-92b3-74286425f878",
      "name": "Clean & Deduplicate",
      "type": "n8n-nodes-base.code",
      "position": [
        224,
        -16
      ]
    },
    {
      "id": "71d6e171-5d97-45b6-b462-39f6502ae39c",
      "name": "Playlist reorganizer",
      "type": "n8n-nodes-base.code",
      "position": [
        752,
        -16
      ]
    },
    {
      "id": "13679add-3de9-4411-932f-f34818ce9f6f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -128
      ],
      "parameters": {
        "width": null,
        "height": 368,
        "content": "## This node retrieve all your playlist"
      }
    },
    {
      "id": "db178070-9da6-443a-b4ad-553ea73a724b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -208
      ],
      "parameters": {
        "width": 288,
        "height": 448,
        "content": "## This node clean and deduplicate the previous output. \n\n**It displays a list of all your playlists with their ids**"
      }
    },
    {
      "id": "68cbf32b-8650-493c-8fb3-99cd1395d50a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        -128
      ],
      "parameters": {
        "width": 224,
        "height": 368,
        "content": "## This node extract all the song\n"
      }
    },
    {
      "id": "3f9a5db7-9e26-498a-9ca1-b3285f60eb41",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        -192
      ],
      "parameters": {
        "width": 224,
        "height": 432,
        "content": "## This node reorganize your playlist sorting by popularity"
      }
    },
    {
      "id": "4b587aaa-af95-4bb2-9cf1-b48d50ff40ca",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        -192
      ],
      "parameters": {
        "width": 544,
        "height": 432,
        "content": "## This loop add songs in queue so you can enjoy it for your evening :)"
      }
    }
  ],
  "connections": {
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Add a song to a queue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean & Deduplicate": {
      "main": [
        [
          {
            "node": "Get a playlist's tracks by URI or ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Playlist reorganizer": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add a song to a queue": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a user's playlists": {
      "main": [
        [
          {
            "node": "Clean & Deduplicate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a playlist's tracks by URI or ID": {
      "main": [
        [
          {
            "node": "Playlist reorganizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get a user's playlists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}