{
  "name": "Find quality YouTube videos with automated filtering & relevance scoring to Google Sheets",
  "nodes": [
    {
      "id": "230d2269-6b2e-4915-82e8-b42c2a36746a",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        20,
        -40
      ]
    },
    {
      "id": "2ffb8769-8769-4636-adff-f70a65df8fa5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        140
      ],
      "parameters": {
        "width": 340,
        "height": 440,
        "content": "This step is going to call YouTube's API and ask for it to return videos that match the query, looking only in the category of education, sorted by relevance, and  no more than 50.\n\n**What you need to"
      }
    },
    {
      "id": "b0becf14-1e2b-47a4-83b0-2db297518479",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        140
      ],
      "parameters": {
        "width": 340,
        "height": 240,
        "content": "This step is going to set the value of what you're going to be searching for in YouTube. It's optional, but easier to update and you can attach a chat to this if you want to update it outside of the n"
      }
    },
    {
      "id": "d437a506-e2b8-48fa-98cf-940657d7a879",
      "name": "Set Query",
      "type": "n8n-nodes-base.set",
      "position": [
        340,
        -40
      ]
    },
    {
      "id": "ea7e2dad-4f8f-40d8-9e77-25fbfe222f6f",
      "name": "Search YouTube",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        980,
        -40
      ]
    },
    {
      "id": "f68554af-5f38-4296-a38e-e917dba605f4",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1980,
        220
      ],
      "parameters": {
        "width": 440,
        "height": 340,
        "content": "This loop is going to collect all the metadata that we need from the videos, such as view and like count, and then filter based on those values as well as recency of publishing. Finally it will remove"
      }
    },
    {
      "id": "62956d67-ee59-4131-8f4f-de263dafa7bc",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1380,
        -320
      ],
      "parameters": {
        "width": 340,
        "height": 220,
        "content": "This step is going to be the first quality and relevance filter, excluding anything that doesn't seem purely educational or that seems promotional or scammy.\n\n**Try Modifying**\n\n- The filter criteria "
      }
    },
    {
      "id": "c0f112d7-99d3-487a-9def-71bf8a879fdd",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        2920,
        -340
      ]
    },
    {
      "id": "43bb3d2b-0022-4cb0-a13c-ba7df4d4d9f4",
      "name": "Filter for Quality",
      "type": "n8n-nodes-base.filter",
      "position": [
        2280,
        -40
      ]
    },
    {
      "id": "f844dd50-6a38-4e9f-874b-885bddf52b4e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2260,
        -820
      ],
      "parameters": {
        "width": 440,
        "height": 440,
        "content": "This final set of steps is going to remove duplicate videos, assign a relevance score based on keywords and quality metrics, and then send only the top one's to a google sheet. \n\n**What you need to do"
      }
    },
    {
      "id": "40ec5dda-3c74-4203-b769-896cdb17c703",
      "name": "Split Query",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        660,
        -40
      ]
    },
    {
      "id": "0f3f6e07-b0ad-4558-a268-97b61094671a",
      "name": "Split Results",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1240,
        -40
      ]
    },
    {
      "id": "c44d4550-3bcc-46e5-b294-65c5455b112f",
      "name": "Filter for Relevance",
      "type": "n8n-nodes-base.filter",
      "position": [
        1480,
        -40
      ]
    },
    {
      "id": "74f3670e-e61a-4dd1-bde7-5fbf845e14ca",
      "name": "Loop over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1820,
        -80
      ]
    },
    {
      "id": "8ad9d1d8-83f7-4edc-bac3-3d7bffbc0c83",
      "name": "Get Video Metadata",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2060,
        -40
      ]
    },
    {
      "id": "040a4ed8-ec93-4461-acc1-5403154d3d61",
      "name": "Remove Unnecessary Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        2480,
        -40
      ]
    },
    {
      "id": "79b34b24-290f-43b7-8c45-990a5c30cdb0",
      "name": "Remove Duplicate Videos",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        2060,
        -340
      ]
    },
    {
      "id": "756fa598-ab05-46ff-aaea-be6c9533568d",
      "name": "Generate Relevance Score",
      "type": "n8n-nodes-base.set",
      "position": [
        2280,
        -340
      ]
    },
    {
      "id": "452016d9-50ce-49bb-bed8-d3213bd5bcec",
      "name": "Sort by Relevance",
      "type": "n8n-nodes-base.sort",
      "position": [
        2480,
        -340
      ]
    },
    {
      "id": "916ff54f-b7a3-472f-af8e-df2e501aef65",
      "name": "Force Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        2700,
        -340
      ]
    },
    {
      "id": "b4007c9b-cf09-4292-b22d-2778bf7c03a6",
      "name": "Send to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3120,
        -340
      ]
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Send to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Query": {
      "main": [
        [
          {
            "node": "Split Query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Force Limit": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Query": {
      "main": [
        [
          {
            "node": "Search YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Results": {
      "main": [
        [
          {
            "node": "Filter for Relevance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search YouTube": {
      "main": [
        [
          {
            "node": "Split Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop over Items": {
      "main": [
        [
          {
            "node": "Remove Duplicate Videos",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Video Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort by Relevance": {
      "main": [
        [
          {
            "node": "Force Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter for Quality": {
      "main": [
        [
          {
            "node": "Remove Unnecessary Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video Metadata": {
      "main": [
        [
          {
            "node": "Filter for Quality",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter for Relevance": {
      "main": [
        [
          {
            "node": "Loop over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send to Google Sheets": {
      "main": [
        []
      ]
    },
    "Remove Duplicate Videos": {
      "main": [
        [
          {
            "node": "Generate Relevance Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Relevance Score": {
      "main": [
        [
          {
            "node": "Sort by Relevance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Unnecessary Fields": {
      "main": [
        [
          {
            "node": "Loop over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Set Query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}