{
  "name": "Spotify: discover weekly archive",
  "nodes": [
    {
      "id": "b605b875-85cf-4210-8027-ce7b9b7069b9",
      "name": "CRON",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        820,
        360
      ]
    },
    {
      "id": "edd9d7b6-9ac4-4acf-8f4b-4cbe943dfd34",
      "name": "Get User's Playlists",
      "type": "n8n-nodes-base.spotify",
      "position": [
        1060,
        360
      ]
    },
    {
      "id": "98cf8fdc-556a-452a-8df6-16a98c17613e",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1280,
        360
      ]
    },
    {
      "id": "d27ee5c1-86d8-4a6a-adcb-90bf59280550",
      "name": "Get Discover Tracks",
      "type": "n8n-nodes-base.spotify",
      "position": [
        1560,
        240
      ]
    },
    {
      "id": "e276dce6-d3d2-41a0-96b6-68e115ed198e",
      "name": "Get Archive Tracks",
      "type": "n8n-nodes-base.spotify",
      "position": [
        1560,
        460
      ]
    },
    {
      "id": "c619085b-424d-4ff5-b3eb-fa0eed05ce0d",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1840,
        360
      ]
    },
    {
      "id": "6981f3b3-e1d4-415b-b2c2-d05646271270",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1760,
        180
      ],
      "parameters": {
        "width": 262,
        "height": 354,
        "content": "#### Purpose\n\nCompares tracks using `Combine` operation to output **non-matching** Discover Weekly tracks to ensure that duplicates are not appended to the Archive playlist"
      }
    },
    {
      "id": "65a9ef93-afac-4f86-9203-73e24bcdb500",
      "name": "Check if tracks to add is NOT empty",
      "type": "n8n-nodes-base.if",
      "position": [
        2100,
        360
      ]
    },
    {
      "id": "604717ae-90ab-412b-bc83-15399d18c0d4",
      "name": "Add tracks to Archive playlist",
      "type": "n8n-nodes-base.spotify",
      "position": [
        2360,
        220
      ]
    },
    {
      "id": "34ddb49e-ebfe-46ff-a348-959befe5e86c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2580,
        280
      ],
      "parameters": {
        "width": 634,
        "height": 190,
        "content": "### Do anything else here\n\nFor example, in my personal workflow, after the tracks have been added to to my Archive playlist, I send a `POST` request to my self-hosted [NTFY](https://docs.ntfy.sh) serv"
      }
    },
    {
      "id": "c5c18f22-2c1f-4e65-83fc-7f89c5e44828",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -418.42807424594014
      ],
      "parameters": {
        "width": 605.1751740139206,
        "height": 733.4280742459401,
        "content": "## README\n\nThis workflow will automatically archive your Spotify `Discover Weekly` playlist to a separate playlist. One additional caveat this workflow addresses is it will compare the refreshed `Disc"
      }
    }
  ],
  "connections": {
    "CRON": {
      "main": [
        [
          {
            "node": "Get User's Playlists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Check if tracks to add is NOT empty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Get Discover Tracks",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Archive Tracks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Archive Tracks": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get Discover Tracks": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get User's Playlists": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if tracks to add is NOT empty": {
      "main": [
        [
          {
            "node": "Add tracks to Archive playlist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}