{
  "name": "Generate Youtube video metadata (timestamps, tags, description, ...)",
  "nodes": [
    {
      "id": "",
      "name": "Mistral Cloud Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        700,
        -40
      ]
    },
    {
      "id": "",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -440,
        120
      ]
    },
    {
      "id": "",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        860,
        -40
      ]
    },
    {
      "id": "",
      "name": "No Operation, do nothing1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        700,
        100
      ]
    },
    {
      "id": "",
      "name": "Check IF Finished",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -160,
        -80
      ]
    },
    {
      "id": "",
      "name": "Get DataSet",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        240,
        -100
      ]
    },
    {
      "id": "",
      "name": "Scrape Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -440,
        -80
      ]
    },
    {
      "id": "",
      "name": "If Finished",
      "type": "n8n-nodes-base.if",
      "position": [
        20,
        -80
      ]
    },
    {
      "id": "",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        180,
        120
      ]
    },
    {
      "id": "",
      "name": "If Recent",
      "type": "n8n-nodes-base.if",
      "position": [
        -660,
        20
      ]
    },
    {
      "id": "",
      "name": "If Not Generated",
      "type": "n8n-nodes-base.if",
      "position": [
        460,
        -100
      ]
    },
    {
      "id": "",
      "name": "Generate Description",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        700,
        -200
      ]
    },
    {
      "id": "",
      "name": "Format ",
      "type": "n8n-nodes-base.code",
      "position": [
        1100,
        -200
      ]
    },
    {
      "id": "",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        -100
      ],
      "parameters": {
        "width": 420,
        "height": 340,
        "content": "## 1- Input\nEnter the ID of the YTB channel to trigger the workflow when a new video is posted"
      }
    },
    {
      "id": "",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        -180
      ],
      "parameters": {
        "width": null,
        "height": 480,
        "content": "## 2- Create DataSet\nApify scrape the last YTB video of the channel"
      }
    },
    {
      "id": "",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        -280
      ],
      "parameters": {
        "width": 600,
        "height": 580,
        "content": "## 4- Check and Generate Metadata\nVerify if Metadata are not already generated and generate them with LLM\n"
      }
    },
    {
      "id": "",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -280
      ],
      "parameters": {
        "width": 460,
        "height": 240,
        "content": "## 5- Output\nFormat all the data created and update YTB Video"
      }
    },
    {
      "id": "",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -180
      ],
      "parameters": {
        "width": 640,
        "height": 500,
        "content": "## 3- Wait for Completion & Get DataSet\nWait until the dataset is completed in Apify and get it"
      }
    },
    {
      "id": "",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        -800
      ],
      "parameters": {
        "width": 780,
        "height": 240,
        "content": "## How it works?\n**1 -** Enter the ID of the YTB channel to trigger the workflow when a new video is posted\n**2 -** Apify scrape the last YTB video of the channel\n**3 -** Wait until the dataset is com"
      }
    },
    {
      "id": "",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        -540
      ],
      "parameters": {
        "width": 780,
        "height": 340,
        "content": "## SETUP\n\n**Setup Input YTB Chanel :** Go to the channel's page on YouTube, and look at the URL of the page. The channel ID is the value that comes after channel/ in the URL. Add it after \"?channel_id"
      }
    },
    {
      "id": "",
      "name": "Trigger New Video Posted",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        -880,
        20
      ]
    },
    {
      "id": "",
      "name": "Update YTB Video",
      "type": "n8n-nodes-base.youTube",
      "position": [
        1280,
        -200
      ]
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Check IF Finished",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format ": {
      "main": [
        [
          {
            "node": "Update YTB Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Recent": {
      "main": [
        [
          {
            "node": "Scrape Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get DataSet": {
      "main": [
        [
          {
            "node": "If Not Generated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Finished": {
      "main": [
        [
          {
            "node": "Get DataSet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Video": {
      "main": [
        [
          {
            "node": "Check IF Finished",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Not Generated": {
      "main": [
        [
          {
            "node": "Generate Description",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check IF Finished": {
      "main": [
        [
          {
            "node": "If Finished",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Description": {
      "main": [
        [
          {
            "node": "Format ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Description",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Description",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Trigger New Video Posted": {
      "main": [
        [
          {
            "node": "If Recent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}