{
  "name": "Automated YouTube video scheduling & AI metadata generation 🎬",
  "nodes": [
    {
      "id": "2001b9ca-f76b-437e-90a9-16c0d17accef",
      "name": "Fetch Latest Videos",
      "type": "n8n-nodes-base.youTube",
      "position": [
        -60,
        40
      ]
    },
    {
      "id": "e8857adf-63ec-4612-aa49-cd77130a6728",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        160,
        40
      ]
    },
    {
      "id": "1a8cf640-caf4-4163-a658-400714702314",
      "name": "YT Title",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2220,
        120
      ]
    },
    {
      "id": "ec6e5d83-d8c8-417e-8df0-86634feef3e6",
      "name": "Create Description",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1920,
        80
      ]
    },
    {
      "id": "f59d950b-4e29-4a41-8756-85ea7814b3d3",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -2260,
        300
      ]
    },
    {
      "id": "27ef7d44-7cca-417f-8177-b5b896a79aa0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2660,
        -20
      ],
      "parameters": {
        "width": 220,
        "height": null,
        "content": "### 🎥Title is kept from the upload, alternatively you can just add the YT Title module in the mix \n# 👇🏻\n"
      }
    },
    {
      "id": "8d763312-35f0-4d53-a210-1e0e22a06323",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        -140
      ],
      "parameters": {
        "width": null,
        "height": 200,
        "content": "# Adjust the Prompts 👉🏻\n\n# 👇🏻"
      }
    },
    {
      "id": "9e7f22d5-7776-4bc4-a274-963cb8c8810c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -560
      ],
      "parameters": {
        "width": 620,
        "height": 420,
        "content": "# Youtube Video Description/Tags/etc. Automation\n\n👉🏻 **Repos**: [github.com/JimPresting](https://github.com/JimPresting) 🛠️  \n👉🏻 **YouTube**: [youtube.com/@StardawnAI](https://www.youtube.com/@Stardaw"
      }
    },
    {
      "id": "4c5667cf-f8a9-45ab-876b-3a6b5730484c",
      "name": "2.5FlashPrev",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        2220,
        0
      ]
    },
    {
      "id": "7c73cc89-ea8e-42b3-a1c9-2dc493026216",
      "name": "YT Tags",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2220,
        -120
      ]
    },
    {
      "id": "e8782ac7-ca31-4a5f-a9f1-62548f56407d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2340,
        -140
      ],
      "parameters": {
        "width": 2000,
        "height": 660,
        "content": "# 📅Scheduling Logic⏰\n\n"
      }
    },
    {
      "id": "33d289eb-c989-4c8d-b387-405f31ba11d6",
      "name": "3s",
      "type": "n8n-nodes-base.wait",
      "position": [
        2920,
        140
      ]
    },
    {
      "id": "19337563-a349-485d-a064-32f58c8fde90",
      "name": "gettitle",
      "type": "n8n-nodes-base.youTube",
      "position": [
        -780,
        200
      ]
    },
    {
      "id": "da93ff18-8d19-45ab-b268-dbbebcb86719",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        -140
      ],
      "parameters": {
        "width": 180,
        "height": null,
        "content": "## Code only returns the videos that are not listed"
      }
    },
    {
      "id": "71e9606c-4b6e-4b49-b3ec-bd9bd261f7a9",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -600,
        -80
      ],
      "parameters": {
        "width": 220,
        "height": 260,
        "content": "## Video needs to be set to private TOGETHER with the PublishAt parameter in order for it to work."
      }
    },
    {
      "id": "c5a240aa-b705-4219-b293-da4ae0168350",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1320,
        -140
      ],
      "parameters": {
        "width": 280,
        "height": 240,
        "content": "### Video needs to be Unlisted or Published in order for the scraper to be able to get the transcript\n\n### ADJUST YOUR APIFY API TOKEN HERE      \n# 👇🏻"
      }
    },
    {
      "id": "5fb12ed7-8992-424d-86e0-7c8cd0f0b9d3",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -140
      ],
      "parameters": {
        "width": 3200,
        "height": 660,
        "content": "# Generate Description, Tags, etc. 🖌️📝 #️⃣"
      }
    },
    {
      "id": "33b865ef-ec2e-4349-bbba-d76d41345fe3",
      "name": "Set Publish Date",
      "type": "n8n-nodes-base.youTube",
      "position": [
        -600,
        280
      ]
    },
    {
      "id": "9a228886-c91a-44f7-b894-e23095166efc",
      "name": "Every Day",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2260,
        60
      ]
    },
    {
      "id": "c0277051-f146-43f7-a2cd-36739d933209",
      "name": "Get Videos to reschedule",
      "type": "n8n-nodes-base.youTube",
      "position": [
        -1880,
        40
      ]
    },
    {
      "id": "5cf3813b-931b-4c0a-84fe-4edd3d55a99a",
      "name": "Get video Ids seperated",
      "type": "n8n-nodes-base.code",
      "position": [
        -1660,
        40
      ]
    },
    {
      "id": "8131b388-b842-4c46-b82b-e53283d938ed",
      "name": "Loop over Video IDs",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1440,
        40
      ]
    },
    {
      "id": "665cb406-f6b9-4ba4-82fa-daa1141eb0a3",
      "name": "Get Video Data",
      "type": "n8n-nodes-base.youTube",
      "position": [
        -1220,
        60
      ]
    },
    {
      "id": "3d366fb3-f579-46f0-9254-8d4c1612038e",
      "name": "Return Private Videos",
      "type": "n8n-nodes-base.code",
      "position": [
        -1220,
        -120
      ]
    },
    {
      "id": "bb3e90ae-ff3f-4c22-b920-d1a99a1f99e8",
      "name": "4s",
      "type": "n8n-nodes-base.wait",
      "position": [
        -260,
        240
      ]
    },
    {
      "id": "f67c7668-71eb-42e6-b385-f66f9e5e80eb",
      "name": "Loop over All Videos not Published",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1020,
        60
      ]
    },
    {
      "id": "f98b1399-7970-4585-8f2a-be897562fa40",
      "name": "get video id",
      "type": "n8n-nodes-base.set",
      "position": [
        380,
        80
      ]
    },
    {
      "id": "6b907512-945b-4c1e-8a97-b14409ddfcaa",
      "name": "Remove Duplicates from previous Runs",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        600,
        80
      ]
    },
    {
      "id": "d6c7152e-e508-43c3-8748-ba12652ac117",
      "name": "new video?",
      "type": "n8n-nodes-base.if",
      "position": [
        820,
        80
      ]
    },
    {
      "id": "d1c31718-4a26-4108-a618-f67cfb87053c",
      "name": "getLatestVideoID",
      "type": "n8n-nodes-base.youTube",
      "position": [
        1000,
        160
      ]
    },
    {
      "id": "66814975-e4a5-4c23-9bf2-c8d30d96c122",
      "name": "Get Transcript",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1320,
        120
      ]
    },
    {
      "id": "fd355571-8c74-4d31-972e-13f737aaec05",
      "name": "Adjust Transcript Format",
      "type": "n8n-nodes-base.code",
      "position": [
        1600,
        120
      ]
    },
    {
      "id": "7b69339f-aa12-430e-ba21-b85a0db596b5",
      "name": "Update Video's Metadata",
      "type": "n8n-nodes-base.youTube",
      "position": [
        2660,
        140
      ]
    }
  ],
  "connections": {
    "3s": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4s": {
      "main": [
        [
          {
            "node": "Fetch Latest Videos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "YT Tags": {
      "main": [
        [
          {
            "node": "Update Video's Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "YT Title": {
      "main": [
        []
      ]
    },
    "gettitle": {
      "main": [
        [
          {
            "node": "Set Publish Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every Day": {
      "main": [
        [
          {
            "node": "Get Videos to reschedule",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "new video?": {
      "main": [
        [],
        [
          {
            "node": "getLatestVideoID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2.5FlashPrev": {
      "ai_languageModel": [
        [
          {
            "node": "YT Tags",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "get video id": {
      "main": [
        [
          {
            "node": "Remove Duplicates from previous Runs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Transcript": {
      "main": [
        [
          {
            "node": "Adjust Transcript Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video Data": {
      "main": [
        [
          {
            "node": "Loop over Video IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "get video id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Publish Date": {
      "main": [
        [
          {
            "node": "Loop over All Videos not Published",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "getLatestVideoID": {
      "main": [
        [
          {
            "node": "Get Transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Description": {
      "main": [
        [
          {
            "node": "YT Tags",
            "type": "main",
            "index": 0
          },
          {
            "node": "YT Title",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Latest Videos": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop over Video IDs": {
      "main": [
        [
          {
            "node": "Return Private Videos",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Video Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Return Private Videos": {
      "main": [
        [
          {
            "node": "Loop over All Videos not Published",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get video Ids seperated": {
      "main": [
        [
          {
            "node": "Loop over Video IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Video's Metadata": {
      "main": [
        [
          {
            "node": "3s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Adjust Transcript Format": {
      "main": [
        [
          {
            "node": "Create Description",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Videos to reschedule": {
      "main": [
        [
          {
            "node": "Get video Ids seperated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Get Videos to reschedule",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop over All Videos not Published": {
      "main": [
        [
          {
            "node": "4s",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "gettitle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates from previous Runs": {
      "main": [
        [
          {
            "node": "new video?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}