{
  "name": "Automated YouTube video uploads with 12h interval scheduling in JST",
  "nodes": [
    {
      "id": "8614b18c-d37b-44cf-859a-61963f81d495",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -272,
        0
      ]
    },
    {
      "id": "2a864e15-008d-460c-b002-c7e6369b393a",
      "name": "List Video Files",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -64,
        0
      ]
    },
    {
      "id": "89a41e82-e8e5-41d1-9077-55441e0f44b9",
      "name": "Sort and Generate Items",
      "type": "n8n-nodes-base.code",
      "position": [
        144,
        0
      ]
    },
    {
      "id": "ab5c0131-dc14-4207-9256-b181343b0118",
      "name": "Calculate Publish Schedule (+12h Interval)",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        0
      ]
    },
    {
      "id": "b4fafaac-c6aa-46a2-bba7-67d9552ca667",
      "name": "Split in Batches (1 per video)",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        576,
        0
      ]
    },
    {
      "id": "b077ea9f-5e76-48da-a3d0-09cf548c0da4",
      "name": "Read Video File",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        832,
        16
      ]
    },
    {
      "id": "3e2cd625-012a-4451-aa2a-f3f049f82c0f",
      "name": "Upload to YouTube (Scheduled)",
      "type": "n8n-nodes-base.youTube",
      "position": [
        1072,
        16
      ]
    },
    {
      "id": "ee967e9e-66b7-475c-b4c6-cb1f194a2304",
      "name": "Add to Playlist",
      "type": "n8n-nodes-base.youTube",
      "position": [
        1280,
        16
      ]
    },
    {
      "id": "a52f2b0e-546a-4dd9-b929-a3ed35a28b31",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        -464
      ],
      "parameters": {
        "width": 480,
        "height": 224,
        "content": "# Overview\n\n\nThis workflow automates video publishing to YouTube.\nIt lists local video files, generates upload metadata, schedules each upload every 12 hours, then uploads and adds them to a YouTube p"
      }
    },
    {
      "id": "7bfa8a61-3eab-42eb-a3fe-52bf180cf7b0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        -208
      ],
      "parameters": {
        "width": 320,
        "height": 176,
        "content": "## List & Prepare Files\n\nRetrieves all video files from the local folder and prepares them as workflow items.\nEach item includes the file path and basic information for later processing."
      }
    },
    {
      "id": "2ff489ca-c9ff-4f99-b0ce-849a05b21ccc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        176
      ],
      "parameters": {
        "width": 368,
        "height": 192,
        "content": "## Sort & Schedule Uploads\n\nSorts videos in the correct order and calculates a publish schedule.\nEach video is assigned a publishAt time spaced 12 hours apart from the previous one."
      }
    },
    {
      "id": "9d4dec38-c545-4e79-8607-eaddf83ff697",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -208
      ],
      "parameters": {
        "width": 368,
        "height": 192,
        "content": "## Process in Batches\n\nEnsures videos are handled one by one.\nPrevents large uploads from overloading memory and makes error recovery easier."
      }
    },
    {
      "id": "e1ea7552-4668-4d16-bd9c-d47464bdd3d9",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        240
      ],
      "parameters": {
        "width": 368,
        "height": 192,
        "content": "## Upload to YouTube\n\nReads each video from disk and uploads it to YouTube as a scheduled private upload.\nThe video becomes public automatically at its scheduled publishAt time."
      }
    },
    {
      "id": "f9380df2-f7e4-439c-a07c-cdf679ff01e7",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        -208
      ],
      "parameters": {
        "width": 368,
        "height": 192,
        "content": "## Add to Playlist\n\nAfter upload, each video is automatically added to the specified YouTube playlist to keep the channel content organized."
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "List Video Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add to Playlist": {
      "main": [
        [
          {
            "node": "Split in Batches (1 per video)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Video File": {
      "main": [
        [
          {
            "node": "Upload to YouTube (Scheduled)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Video Files": {
      "main": [
        [
          {
            "node": "Sort and Generate Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort and Generate Items": {
      "main": [
        [
          {
            "node": "Calculate Publish Schedule (+12h Interval)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to YouTube (Scheduled)": {
      "main": [
        [
          {
            "node": "Add to Playlist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split in Batches (1 per video)": {
      "main": [
        [],
        [
          {
            "node": "Read Video File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Publish Schedule (+12h Interval)": {
      "main": [
        [
          {
            "node": "Split in Batches (1 per video)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}