{
  "name": "Track Playlist",
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        130,
        280
      ]
    },
    {
      "parameters": {
        "filePath": "[csv file path on you host]"
      },
      "name": "Read Binary File",
      "type": "n8n-nodes-base.readBinaryFile",
      "typeVersion": 1,
      "position": [
        280,
        280
      ],
      "notesInFlow": true,
      "notes": "Read CSV"
    },
    {
      "parameters": {
        "options": {}
      },
      "name": "Spreadsheet File",
      "type": "n8n-nodes-base.spreadsheetFile",
      "typeVersion": 1,
      "position": [
        430,
        280
      ],
      "notesInFlow": true,
      "notes": "Parse CSV."
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$node[\"Spreadsheet File\"].json[\"trackid\"]}}",
              "value2": "[track_id]"
            }
          ]
        }
      },
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        610,
        280
      ],
      "notesInFlow": true,
      "notes": "Pick sessions from a track"
    },
    {
      "parameters": {
        "resource": "playlistItem",
        "playlistId": "[choose a playlist]",
        "videoId": "={{$node[\"IF\"].json[\"video_id\"]}}",
        "options": {}
      },
      "name": "YouTube",
      "type": "n8n-nodes-base.youTube",
      "typeVersion": 1,
      "position": [
        820,
        170
      ],
      "notesInFlow": true,
      "credentials": {
        "youTubeOAuth2Api": "<your credential>"
      },
      "notes": "Add session to a playlist"
    },
    {
      "parameters": {},
      "name": "NoOp",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        820,
        390
      ],
      "notesInFlow": true,
      "notes": "Do nothing."
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Read Binary File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Binary File": {
      "main": [
        [
          {
            "node": "Spreadsheet File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Spreadsheet File": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF": {
      "main": [
        [
          {
            "node": "YouTube",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "NoOp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "timezone": "Asia/Taipei"
  },
  "id": "1"
}