Turn any YouTuber into an AI agent (<$0.01/run) using n8n + GPT-5.1 + Supabase (full channel → vector DB)

    Shared 12/5/2025

    48 views

    Visual Workflow

    JSON Code

    {
      "id": "huGhT0C0lBkt0mMo",
      "meta": {
        "instanceId": "3f8f24ba926ad175fb3fa0b581d1ea7e580749c1a4da438e4b4b0f683c1dc9a3"
      },
      "name": "YT Processing UPDATED",
      "tags": [],
      "nodes": [
        {
          "id": "daaac0a4-933a-4a07-bc2c-3586726f5d3c",
          "name": "Edit Fields",
          "type": "n8n-nodes-base.set",
          "position": [
            48,
            80
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "eb0d7330-0198-43fa-9a74-6d69d84635b8",
                  "name": "channel_handle",
                  "type": "string",
                  "value": ""
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "f4d1fea1-73db-4a1d-b34b-a34252eb5537",
          "name": "Append or update row in sheet",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            1136,
            80
          ],
          "parameters": {
            "columns": {
              "value": {
                "Link": "=https://www.youtube.com/watch?v={{ $json.id }}",
                "Type": "={{ $json.isShort ? 'Short' : 'Video' }}",
                "Title": "={{ $json.snippet.title }}",
                "Channel": "={{ $('Edit Fields').item.json.channel_handle }}",
                "Seconds": "={{ $json.totalSeconds }}",
                "Video ID": "={{ $json.id }}",
                "Thumbnail": "={{ $json.snippet.thumbnails.high.url }}",
                "Channel ID": "={{ $json.snippet.channelId }}",
                "Like Count": "={{ $json.statistics.likeCount }}",
                "View Count": "={{ $json.statistics.viewCount }}",
                "Publish Time": "={{ $json.snippet.publishedAt }}",
                "Comment Count": "={{ $json.statistics.commentCount }}"
              },
              "schema": [
                {
                  "id": "Video ID",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Video ID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Channel ID",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "Channel ID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Channel",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "Channel",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Title",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "Title",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Type",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Type",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Seconds",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Seconds",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Publish Time",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Publish Time",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Link",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Link",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Thumbnail",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Thumbnail",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "View Count",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "View Count",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Like Count",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Like Count",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Comment Count",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Comment Count",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Transcript File ID",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Transcript File ID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Transcript Link",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Transcript Link",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Vector Status",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Vector Status",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [
                "Video ID"
              ],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            },
            "options": {
              "useAppend": true
            },
            "operation": "appendOrUpdate",
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": 25357018,
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit#gid=25357018",
              "cachedResultName": "KyleFrielTech"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit?usp=drivesdk",
              "cachedResultName": "YT Processing"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "HngHdvL4ncK2MxZb",
              "name": "Google Sheets account"
            }
          },
          "typeVersion": 4.7
        },
        {
          "id": "e74077e1-23bf-4933-b5b8-0381862bafdc",
          "name": "Get many videos",
          "type": "n8n-nodes-base.youTube",
          "position": [
            592,
            80
          ],
          "parameters": {
            "filters": {
              "channelId": "={{ $json.channelId }}"
            },
            "options": {},
            "resource": "video",
            "returnAll": true
          },
          "credentials": {
            "youTubeOAuth2Api": {
              "id": "PastEx3bxO2UAadP",
              "name": "YouTube account"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "68ce5162-b663-4b6e-bb14-1f8f4d190567",
          "name": "Get a video",
          "type": "n8n-nodes-base.youTube",
          "position": [
            784,
            80
          ],
          "parameters": {
            "options": {},
            "videoId": "={{ $json.id.videoId }}",
            "resource": "video",
            "operation": "get"
          },
          "credentials": {
            "youTubeOAuth2Api": {
              "id": "PastEx3bxO2UAadP",
              "name": "YouTube account"
            }
          },
          "typeVersion": 1
        },
        {
          "id": "99fbfdc1-7443-41c3-9b4b-976346236998",
          "name": "Code in JavaScript",
          "type": "n8n-nodes-base.code",
          "position": [
            960,
            80
          ],
          "parameters": {
            "jsCode": "function parseYouTubeDuration(duration) {\n  const match = duration.match(/PT(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)S)?/);\n  const hours = parseInt(match[1] || 0);\n  const minutes = parseInt(match[2] || 0);\n  const seconds = parseInt(match[3] || 0);\n  return hours * 3600 + minutes * 60 + seconds;  // total seconds\n}\n\n\nfor (const item of $input.all()) {\n  const totalSeconds = parseYouTubeDuration(item.json.contentDetails.duration);\n\n  item.json.totalSeconds = totalSeconds;\n  item.json.isShort = totalSeconds <= 180;\n  \n}\n\nreturn $input.all()"
          },
          "typeVersion": 2
        },
        {
          "id": "f3531b3e-9d81-4fa9-98a4-7e7e47467662",
          "name": "Sticky Note",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            0,
            16
          ],
          "parameters": {
            "color": 5,
            "width": 1360,
            "height": 240,
            "content": "## Add Videos to Sheet"
          },
          "typeVersion": 1
        },
        {
          "id": "93d586c1-6895-4983-b593-9fa3fae76a0b",
          "name": "Get row(s) in sheet",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            48,
            416
          ],
          "parameters": {
            "options": {},
            "filtersUI": {
              "values": [
                {
                  "lookupValue": "Video",
                  "lookupColumn": "Type"
                }
              ]
            },
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": 25357018,
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit#gid=25357018",
              "cachedResultName": "KyleFrielTech"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit?usp=drivesdk",
              "cachedResultName": "YT Processing"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "HngHdvL4ncK2MxZb",
              "name": "Google Sheets account"
            }
          },
          "typeVersion": 4.7
        },
        {
          "id": "c4390800-1313-47b1-972a-8ae8cae698c8",
          "name": "Transcribe",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            784,
            368
          ],
          "parameters": {
            "url": "=https://8e1278410a9a.ngrok-free.app/transcript/{{ $json[\"Video ID\"] }}",
            "options": {}
          },
          "typeVersion": 4.2
        },
        {
          "id": "aff6906a-94f7-4d06-a53f-28bfb12b780d",
          "name": "Update row in sheet",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            1360,
            368
          ],
          "parameters": {
            "columns": {
              "value": {
                "row_number": "={{ $('Loop Over Items').item.json.row_number }}",
                "Transcript Link": "=https://drive.google.com/file/d/{{ $json.id }}",
                "Transcript File ID": "={{ $json.id }}"
              },
              "schema": [
                {
                  "id": "Video ID",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Video ID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Channel ID",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Channel ID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Channel",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Channel",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Title",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Title",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Type",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Type",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Seconds",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Seconds",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Publish Time",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Publish Time",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Link",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Link",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Thumbnail",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Thumbnail",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "View Count",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "View Count",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Like Count",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Like Count",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Comment Count",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Comment Count",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Transcript File ID",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Transcript File ID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Transcript Link",
                  "type": "string",
                  "display": true,
                  "removed": false,
                  "required": false,
                  "displayName": "Transcript Link",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Vector Status",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Vector Status",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "row_number",
                  "type": "number",
                  "display": true,
                  "removed": false,
                  "readOnly": true,
                  "required": false,
                  "displayName": "row_number",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [
                "row_number"
              ],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            },
            "options": {},
            "operation": "update",
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": 25357018,
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit#gid=25357018",
              "cachedResultName": "KyleFrielTech"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit?usp=drivesdk",
              "cachedResultName": "YT Processing"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "HngHdvL4ncK2MxZb",
              "name": "Google Sheets account"
            }
          },
          "typeVersion": 4.7
        },
        {
          "id": "fb854d7c-1405-456c-938e-5f5fb4e1ff56",
          "name": "Get Channel Search HTML",
          "type": "n8n-nodes-base.httpRequest",
          "position": [
            224,
            80
          ],
          "parameters": {
            "url": "https://youtube.com/results",
            "options": {},
            "sendQuery": true,
            "queryParameters": {
              "parameters": [
                {
                  "name": "search_query",
                  "value": "={{ $json.channel_handle }}"
                }
              ]
            }
          },
          "typeVersion": 4.2
        },
        {
          "id": "57068782-052d-42e7-b020-a23a637c636e",
          "name": "Extract Channel ID",
          "type": "n8n-nodes-base.code",
          "position": [
            400,
            80
          ],
          "parameters": {
            "jsCode": "const html = $input.first().json.data;\n\nconst channelIdRegex = /\"channelId\":\"(UC[\\w-]+)\"/g;\nconst handleRegex = /\"canonicalBaseUrl\":\"(\\/@[\\w\\d._-]+)\"/g;\n\nconst channelIds = [...html.matchAll(channelIdRegex)].map(m => m[1]);\nconst handles = [...html.matchAll(handleRegex)].map(m => m[1]);\n\n// Zip the two arrays together (in case they align by order)\nconst results = [];\nconst length = Math.min(channelIds.length, handles.length);\nfor (let i = 0; i < length; i++) {\n  results.push({\n    channelId: channelIds[i],\n    handle: handles[i].replace(/^\\/?/, ''),\n  });\n}\n\nreturn results.map(channel => ({ json: channel }));"
          },
          "typeVersion": 2
        },
        {
          "id": "72a89928-15a6-4374-a34e-2842f1451f37",
          "name": "Filter",
          "type": "n8n-nodes-base.filter",
          "position": [
            224,
            416
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "d7f6fdfc-c523-40d8-9e54-6e2e871649e8",
                  "operator": {
                    "type": "string",
                    "operation": "empty",
                    "singleValue": true
                  },
                  "leftValue": "={{ $json[\"Transcript File ID\"] }}",
                  "rightValue": ""
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "036b9577-71f1-4201-995d-3cd586a40d76",
          "name": "Convert to File",
          "type": "n8n-nodes-base.convertToFile",
          "position": [
            976,
            368
          ],
          "parameters": {
            "mode": "each",
            "options": {
              "fileName": "={{ $json.videoId }}.json"
            },
            "operation": "toJson"
          },
          "typeVersion": 1.1
        },
        {
          "id": "f80fab64-97d6-4b15-a917-8b712fdefce2",
          "name": "Upload file",
          "type": "n8n-nodes-base.googleDrive",
          "position": [
            1168,
            368
          ],
          "parameters": {
            "name": "=",
            "driveId": {
              "__rl": true,
              "mode": "list",
              "value": "My Drive"
            },
            "options": {},
            "folderId": {
              "__rl": true,
              "mode": "list",
              "value": "1WhaQcNAPCZCp-KU8UubHZZ6zqN4VWuIb",
              "cachedResultUrl": "https://drive.google.com/drive/folders/1WhaQcNAPCZCp-KU8UubHZZ6zqN4VWuIb",
              "cachedResultName": "my-video-transcripts"
            }
          },
          "credentials": {
            "googleDriveOAuth2Api": {
              "id": "kKFjcq5OGFjxf4fD",
              "name": "Google Drive account 3"
            }
          },
          "typeVersion": 3
        },
        {
          "id": "818b303e-1b93-482d-952d-e758727a4386",
          "name": "Loop Over Items",
          "type": "n8n-nodes-base.splitInBatches",
          "position": [
            592,
            416
          ],
          "parameters": {
            "options": {}
          },
          "typeVersion": 3
        },
        {
          "id": "20387739-8d5c-49c0-89f9-ef5bcb200ae0",
          "name": "Sticky Note1",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            0,
            320
          ],
          "parameters": {
            "color": 4,
            "width": 1584,
            "height": 272,
            "content": "## Get Video Transcripts\nLong form videos only"
          },
          "typeVersion": 1
        },
        {
          "id": "3a32d28d-0ab2-40af-ba7d-cd6fafc97a96",
          "name": "Supabase Vector Store",
          "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
          "position": [
            1232,
            896
          ],
          "parameters": {
            "mode": "insert",
            "options": {
              "queryName": "match_yt_knowledge_v3"
            },
            "tableName": {
              "__rl": true,
              "mode": "list",
              "value": "yt_knowledge_v3",
              "cachedResultName": "yt_knowledge_v3"
            }
          },
          "credentials": {
            "supabaseApi": {
              "id": "SqvlX6Mb6QjnneeU",
              "name": "Supabase account 2"
            }
          },
          "typeVersion": 1.3
        },
        {
          "id": "d00939cb-876a-4d1d-9b2a-7fa924de3a73",
          "name": "Embeddings OpenAI",
          "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
          "position": [
            1200,
            1088
          ],
          "parameters": {
            "options": {}
          },
          "credentials": {
            "openAiApi": {
              "id": "4QprS3T7aQ3Te4lg",
              "name": "OpenAi account 2"
            }
          },
          "typeVersion": 1.2
        },
        {
          "id": "e567a928-82c0-4489-826b-14270dc2d17e",
          "name": "Download file1",
          "type": "n8n-nodes-base.googleDrive",
          "position": [
            736,
            992
          ],
          "parameters": {
            "fileId": {
              "__rl": true,
              "mode": "id",
              "value": "={{ $json['Transcript File ID'] }}"
            },
            "options": {},
            "operation": "download"
          },
          "credentials": {
            "googleDriveOAuth2Api": {
              "id": "kKFjcq5OGFjxf4fD",
              "name": "Google Drive account 3"
            }
          },
          "typeVersion": 3
        },
        {
          "id": "8d55a254-c7ef-4d59-bce9-4549ecfa091f",
          "name": "Get row(s) in sheet2",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            -96,
            736
          ],
          "parameters": {
            "options": {},
            "filtersUI": {
              "values": [
                {
                  "lookupValue": "Video",
                  "lookupColumn": "Type"
                }
              ]
            },
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": 25357018,
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit#gid=25357018",
              "cachedResultName": "KyleFrielTech"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit?usp=drivesdk",
              "cachedResultName": "YT Processing"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "HngHdvL4ncK2MxZb",
              "name": "Google Sheets account"
            }
          },
          "typeVersion": 4.7
        },
        {
          "id": "e280115c-2616-4e59-b03c-1d6433f36b8c",
          "name": "Filter2",
          "type": "n8n-nodes-base.filter",
          "position": [
            112,
            736
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "5c44fac9-9ee6-4df3-9b54-5042b935241f",
                  "operator": {
                    "type": "string",
                    "operation": "notEmpty",
                    "singleValue": true
                  },
                  "leftValue": "={{ $json[\"Transcript File ID\"] }}",
                  "rightValue": ""
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "79306ee9-f8f9-4a0c-85fd-bbc3101cedd1",
          "name": "Extract from File1",
          "type": "n8n-nodes-base.extractFromFile",
          "position": [
            880,
            992
          ],
          "parameters": {
            "options": {},
            "operation": "fromJson"
          },
          "typeVersion": 1
        },
        {
          "id": "2c7c08cf-1c5d-4dba-b2b6-c43c85ac3090",
          "name": "AI Agent1",
          "type": "@n8n/n8n-nodes-langchain.agent",
          "position": [
            608,
            1472
          ],
          "parameters": {
            "options": {
              "systemMessage": "=# Role\nYou are a specialized YouTube Content Analyst. Your sole purpose is to answer user queries based exclusively on two specific datasets. You do not use outside knowledge or general internet search.\n\n# Data Sources & Capabilities\n1. **Metadata Registry (Google Sheet):** - Contains: Video Titles, URLs, View Counts, Like Counts, Publish Dates.\n   - USE WHEN: The user asks about performance metrics, ranking (e.g., \"most popular,\" \"least viewed\"), sorting, dates, or retrieving specific URLs.\n\n2. **Transcript Knowledge Base (Vector Database):**\n   - Contains: Semantic chunks of video transcripts.\n   - USE WHEN: The user asks about specific topics, advice, \"how-to\" instructions, spoken quotes, or summaries of content.\n\n# Decision Logic\nYou must evaluate the user's intent to choose the correct workflow:\n\n- **Quantitative Queries:** If the user asks for \"the most viewed video\" or \"videos from 2023,\" query the **Google Sheet** first to identify the specific video(s).\n- **Qualitative Queries:** If the user asks \"What does he say about Python?\" or \"Summarize the cooking advice,\" query the **Vector Database**.\n- **Hybrid Queries:** If the user asks \"What is the advice in the most popular video?\", you must perform a two-step process:\n  1. Find the most popular video title in the **Google Sheet**.\n  2. Use that title to filter/search the transcript in the **Vector Database**.\n\n# Response Guidelines\n- **Citations:** Always reference the \"Video Title\" when providing information. If possible, provide the URL from the Google Sheet.\n- **Accuracy:** If the answer is not in the provided data sources, state clearly: \"I cannot find that information in the database.\" Do not hallucinate.\n- **Context:** When answering from the Vector Database, synthesize the chunks into a coherent answer rather than listing disjointed sentence fragments."
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "67f23813-6a9c-470d-85a4-09ce9e9ad644",
          "name": "OpenAI Chat Model1",
          "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
          "position": [
            480,
            1680
          ],
          "parameters": {
            "model": {
              "__rl": true,
              "mode": "list",
              "value": "gpt-5.1",
              "cachedResultName": "gpt-5.1"
            },
            "options": {}
          },
          "credentials": {
            "openAiApi": {
              "id": "GeU4wllbobmfVPcj",
              "name": "OpenAi account 4"
            }
          },
          "typeVersion": 1.2
        },
        {
          "id": "8c0c30b7-dd6d-46bf-b5dd-b08b8c507184",
          "name": "Supabase Vector Store1",
          "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
          "position": [
            1008,
            1680
          ],
          "parameters": {
            "mode": "retrieve-as-tool",
            "topK": 8,
            "options": {
              "queryName": "match_yt_knowledge_v3"
            },
            "tableName": {
              "__rl": true,
              "mode": "list",
              "value": "yt_knowledge_v3",
              "cachedResultName": "yt_knowledge_v3"
            },
            "toolDescription": "This tool searches the Supabase vector database for the most relevant YouTube transcript sections and returns them for reference when generating new content."
          },
          "credentials": {
            "supabaseApi": {
              "id": "SqvlX6Mb6QjnneeU",
              "name": "Supabase account 2"
            }
          },
          "typeVersion": 1.3
        },
        {
          "id": "4bef87cd-4692-4488-b117-73d46431095f",
          "name": "Simple Memory",
          "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
          "position": [
            624,
            1680
          ],
          "parameters": {},
          "typeVersion": 1.3
        },
        {
          "id": "20aedf80-57b1-4c9a-aa56-9515239f15d8",
          "name": "Merge",
          "type": "n8n-nodes-base.merge",
          "position": [
            464,
            736
          ],
          "parameters": {
            "mode": "combine",
            "options": {},
            "joinMode": "keepNonMatches",
            "outputDataFrom": "input1",
            "fieldsToMatchString": "Video ID"
          },
          "typeVersion": 3.2
        },
        {
          "id": "c041135f-d68f-4395-96f1-c73982fba88b",
          "name": "Get many rows",
          "type": "n8n-nodes-base.supabase",
          "position": [
            208,
            944
          ],
          "parameters": {
            "tableId": "yt_knowledge_v3",
            "operation": "getAll",
            "returnAll": true,
            "filterType": "string",
            "filterString": "=metadata->>videoId=in.({{ $json.data.map(r => r['Video ID']) }})"
          },
          "credentials": {
            "supabaseApi": {
              "id": "SqvlX6Mb6QjnneeU",
              "name": "Supabase account 2"
            }
          },
          "executeOnce": false,
          "typeVersion": 1,
          "alwaysOutputData": true
        },
        {
          "id": "09fd4be2-87ad-45e8-b9e0-58c6986e8514",
          "name": "Edit Fields1",
          "type": "n8n-nodes-base.set",
          "position": [
            336,
            944
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "b7842dd9-69b4-4018-ab3b-72b55a4a9050",
                  "name": "Video ID",
                  "type": "string",
                  "value": "={{ $json.metadata.videoId }}"
                }
              ]
            }
          },
          "typeVersion": 3.4
        },
        {
          "id": "e2341c54-96ca-4892-ba21-a05713a8fa74",
          "name": "Update row in sheet2",
          "type": "n8n-nodes-base.googleSheets",
          "position": [
            1376,
            704
          ],
          "parameters": {
            "columns": {
              "value": {
                "row_number": "={{ $('Loop Over Items1').item.json.row_number }}",
                "Vector Status": "Added"
              },
              "schema": [
                {
                  "id": "Video ID",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Video ID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Channel ID",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Channel ID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Channel",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Channel",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Title",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Title",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Type",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Type",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Seconds",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Seconds",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Publish Time",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Publish Time",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Link",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Link",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Thumbnail",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Thumbnail",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "View Count",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "View Count",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Like Count",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Like Count",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Comment Count",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Comment Count",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Transcript File ID",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Transcript File ID",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Transcript Link",
                  "type": "string",
                  "display": true,
                  "removed": true,
                  "required": false,
                  "displayName": "Transcript Link",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "Vector Status",
                  "type": "string",
                  "display": true,
                  "required": false,
                  "displayName": "Vector Status",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                },
                {
                  "id": "row_number",
                  "type": "number",
                  "display": true,
                  "removed": false,
                  "readOnly": true,
                  "required": false,
                  "displayName": "row_number",
                  "defaultMatch": false,
                  "canBeUsedToMatch": true
                }
              ],
              "mappingMode": "defineBelow",
              "matchingColumns": [
                "row_number"
              ],
              "attemptToConvertTypes": false,
              "convertFieldsToString": false
            },
            "options": {},
            "operation": "update",
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": 25357018,
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit#gid=25357018",
              "cachedResultName": "KyleFrielTech"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit?usp=drivesdk",
              "cachedResultName": "YT Processing"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "HngHdvL4ncK2MxZb",
              "name": "Google Sheets account"
            }
          },
          "typeVersion": 4.7
        },
        {
          "id": "620a0051-f51c-46f1-b3cd-137609cc9653",
          "name": "Delete a row",
          "type": "n8n-nodes-base.supabase",
          "position": [
            336,
            1104
          ],
          "parameters": {
            "tableId": "yt_knowledge_v3",
            "operation": "delete",
            "filterType": "string",
            "filterString": "=metadata->>videoId=eq.{{ $json['Video ID'] }}"
          },
          "credentials": {
            "supabaseApi": {
              "id": "SqvlX6Mb6QjnneeU",
              "name": "Supabase account 2"
            }
          },
          "typeVersion": 1,
          "alwaysOutputData": true
        },
        {
          "id": "6a779e3a-d291-40c7-9625-0a73507a2cd3",
          "name": "If",
          "type": "n8n-nodes-base.if",
          "position": [
            -96,
            992
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 2,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "07edc120-507c-4d6e-99ae-d06af63081a4",
                  "operator": {
                    "type": "string",
                    "operation": "notEquals"
                  },
                  "leftValue": "={{ $json['Vector Status'] }}",
                  "rightValue": "Invalidate"
                }
              ]
            }
          },
          "typeVersion": 2.2
        },
        {
          "id": "e1ba927d-fd62-4460-bc78-8a26f89bfd22",
          "name": "Merge1",
          "type": "n8n-nodes-base.merge",
          "position": [
            1216,
            704
          ],
          "parameters": {
            "mode": "chooseBranch"
          },
          "typeVersion": 3.2
        },
        {
          "id": "dc24e068-6b3c-43fd-8ac1-4b383d9f7d22",
          "name": "Aggregate",
          "type": "n8n-nodes-base.aggregate",
          "position": [
            64,
            944
          ],
          "parameters": {
            "options": {},
            "aggregate": "aggregateAllItemData"
          },
          "typeVersion": 1
        },
        {
          "id": "ffb5aabb-cb53-4695-94a7-616eae10ee51",
          "name": "Get row(s) in sheet in Google Sheets",
          "type": "n8n-nodes-base.googleSheetsTool",
          "position": [
            768,
            1680
          ],
          "parameters": {
            "options": {},
            "filtersUI": {
              "values": [
                {
                  "lookupValue": "Video",
                  "lookupColumn": "Type"
                }
              ]
            },
            "sheetName": {
              "__rl": true,
              "mode": "list",
              "value": 25357018,
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit#gid=25357018",
              "cachedResultName": "KyleFrielTech"
            },
            "documentId": {
              "__rl": true,
              "mode": "list",
              "value": "1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA",
              "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VXUBavv_9Ba6O3SZbTMdIjjE9xVdRfCcm0thJ-vvHnA/edit?usp=drivesdk",
              "cachedResultName": "YT Processing"
            }
          },
          "credentials": {
            "googleSheetsOAuth2Api": {
              "id": "HngHdvL4ncK2MxZb",
              "name": "Google Sheets account"
            }
          },
          "typeVersion": 4.7
        },
        {
          "id": "6f37e32d-84f6-42c4-ae9b-598f4c58ee92",
          "name": "Limit1",
          "type": "n8n-nodes-base.limit",
          "position": [
            656,
            736
          ],
          "parameters": {
            "maxItems": 20
          },
          "typeVersion": 1
        },
        {
          "id": "b3826ac3-5023-4b13-8d66-f08783fbd5a3",
          "name": "Code in JavaScript1",
          "type": "n8n-nodes-base.code",
          "position": [
            1040,
            992
          ],
          "parameters": {
            "mode": "runOnceForEachItem",
            "jsCode": "const segments = $json.data.segments;\nconst videoTitle = $('Loop Over Items1').item.json.Title;\n\n// --- CONFIGURATION ---\nconst TOTAL_FIXED_SIZE = 1000; // Exact total size (Header + Content)\nconst OVERLAP = 100;\n\n// 1. Calculate the fixed cost of the header\n// Template: \"Title: SOME TITLE\\n---\\n\"\nconst titleHeader = `Title: ${videoTitle}\\n---\\n`;\nconst titleCost = titleHeader.length;\n\n// 2. Calculate exactly how many content characters fit per chunk\nconst CONTENT_WINDOW = TOTAL_FIXED_SIZE - titleCost;\n\n// 3. Calculate how much we move forward each time (Window - Overlap)\nconst STEP_SIZE = CONTENT_WINDOW - OVERLAP;\n\nlet chunks = [];\nlet buffer = \"\"; // A running buffer of text\n\nfor (const segment of segments) {\n  // Add current segment to the buffer\n  // We add a space to ensure words don't merge, though this adds 1 char\n  buffer += segment.text + \" \";\n\n  // WHILE the buffer has enough text to fill a chunk...\n  // We use a while loop here because one long segment might create multiple chunks\n  while (buffer.length >= CONTENT_WINDOW) {\n    \n    // a. Slice exactly the amount we need to hit the limit\n    // Note: This is a \"Hard Cut\" (could split a word in half). \n    // This is necessary to guarantee EXACT character counts.\n    const chunkContent = buffer.slice(0, CONTENT_WINDOW);\n\n    // b. Create the final string\n    const formattedContent = `${titleHeader}${chunkContent}`;\n    chunks.push(formattedContent);\n\n    // c. Move the buffer forward\n    // We remove the text we used, but keep the overlap for the next chunk\n    // conceptually: buffer = buffer.substring(CONTENT_WINDOW - OVERLAP)\n    buffer = buffer.slice(STEP_SIZE);\n  }\n}\n\n// HANDLE LEFTOVERS\n// If there is anything left in the buffer (even if it's small), save it.\nif (buffer.length > 0) {\n    const formattedContent = `${titleHeader}${buffer.trim()}`;\n    chunks.push(formattedContent);\n}\n\nreturn {\n  fullText: chunks.join(\"||\")\n};"
          },
          "typeVersion": 2
        },
        {
          "id": "74fe7cee-538c-48dd-9c9c-395dd295d832",
          "name": "Loop Over Items1",
          "type": "n8n-nodes-base.splitInBatches",
          "position": [
            560,
            976
          ],
          "parameters": {
            "options": {}
          },
          "typeVersion": 3
        },
        {
          "id": "81f5cbe8-f411-4735-a21a-f418db248fd5",
          "name": "Sticky Note2",
          "type": "n8n-nodes-base.stickyNote",
          "position": [
            -192,
            656
          ],
          "parameters": {
            "color": 6,
            "width": 1808,
            "height": 688,
            "content": "## Upload Video Transcripts to Vector Database\n"
          },
          "typeVersion": 1
        },
        {
          "id": "44156178-2651-44f3-b52a-17da1f5c77c2",
          "name": "Trigger Manually",
          "type": "n8n-nodes-base.manualTrigger",
          "position": [
            -224,
            80
          ],
          "parameters": {},
          "typeVersion": 1
        },
        {
          "id": "eb2a388c-2585-416f-a87d-491cf090ba3e",
          "name": "Limit",
          "type": "n8n-nodes-base.limit",
          "position": [
            400,
            416
          ],
          "parameters": {
            "maxItems": 20
          },
          "typeVersion": 1
        },
        {
          "id": "8ea41fee-3817-4436-b7c2-caf9c2906e3f",
          "name": "Default Data Loader",
          "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
          "position": [
            1376,
            1104
          ],
          "parameters": {
            "options": {
              "metadata": {
                "metadataValues": [
                  {
                    "name": "type",
                    "value": "={{ $('Loop Over Items1').item.json.Type }}"
                  },
                  {
                    "name": "title",
                    "value": "={{ $('Loop Over Items1').item.json.Title }}"
                  },
                  {
                    "name": "channel",
                    "value": "={{ $('Loop Over Items1').item.json.Channel }}"
                  },
                  {
                    "name": "videoId",
                    "value": "={{ $('Loop Over Items1').item.json['Video ID'] }}"
                  },
                  {
                    "name": "channelId",
                    "value": "={{ $('Loop Over Items1').item.json['Channel ID'] }}"
                  },
                  {
                    "name": "likeCount",
                    "value": "={{ $('Loop Over Items1').item.json['Like Count'] }}"
                  },
                  {
                    "name": "viewCount",
                    "value": "={{ $('Loop Over Items1').item.json['View Count'] }}"
                  },
                  {
                    "name": "publishedAt",
                    "value": "={{ $('Loop Over Items1').item.json['Publish Time'] }}"
                  },
                  {
                    "name": "commentCount",
                    "value": "={{ $('Loop Over Items1').item.json['Comment Count'] }}"
                  },
                  {
                    "name": "durationInSeconds",
                    "value": "={{ $('Loop Over Items1').item.json.Seconds }}"
                  }
                ]
              }
            },
            "jsonData": "={{ $json.fullText }}",
            "jsonMode": "expressionData",
            "textSplittingMode": "custom"
          },
          "typeVersion": 1.1
        },
        {
          "id": "4999357c-f7ce-42a4-88b9-c1f98bb59aec",
          "name": "Character Text Splitter",
          "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
          "position": [
            1472,
            1312
          ],
          "parameters": {
            "separator": "||"
          },
          "typeVersion": 1
        },
        {
          "id": "23bf6f60-e100-4c32-a682-36e1779c945d",
          "name": "When chat message received",
          "type": "@n8n/n8n-nodes-langchain.chatTrigger",
          "position": [
            336,
            1472
          ],
          "webhookId": "1b94c1d2-cc03-4204-bb56-cf807b639aa7",
          "parameters": {
            "options": {}
          },
          "typeVersion": 1.4
        }
      ],
      "active": false,
      "pinData": {},
      "settings": {
        "executionOrder": "v1"
      },
      "versionId": "0c5e84a9-e1f0-40b7-b1ab-3a81bdd01285",
      "connections": {
        "If": {
          "main": [
            [
              {
                "node": "Aggregate",
                "type": "main",
                "index": 0
              }
            ],
            [
              {
                "node": "Delete a row",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Limit": {
          "main": [
            [
              {
                "node": "Loop Over Items",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Merge": {
          "main": [
            [
              {
                "node": "Limit1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Filter": {
          "main": [
            [
              {
                "node": "Limit",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Limit1": {
          "main": [
            [
              {
                "node": "Loop Over Items1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Merge1": {
          "main": [
            [
              {
                "node": "Update row in sheet2",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Filter2": {
          "main": [
            [
              {
                "node": "Merge",
                "type": "main",
                "index": 0
              },
              {
                "node": "If",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Aggregate": {
          "main": [
            [
              {
                "node": "Get many rows",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Transcribe": {
          "main": [
            [
              {
                "node": "Convert to File",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Edit Fields": {
          "main": [
            [
              {
                "node": "Get Channel Search HTML",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get a video": {
          "main": [
            [
              {
                "node": "Code in JavaScript",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Upload file": {
          "main": [
            [
              {
                "node": "Update row in sheet",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Delete a row": {
          "main": [
            [
              {
                "node": "Merge",
                "type": "main",
                "index": 1
              }
            ]
          ]
        },
        "Edit Fields1": {
          "main": [
            [
              {
                "node": "Merge",
                "type": "main",
                "index": 1
              }
            ]
          ]
        },
        "Get many rows": {
          "main": [
            [
              {
                "node": "Edit Fields1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Simple Memory": {
          "ai_memory": [
            [
              {
                "node": "AI Agent1",
                "type": "ai_memory",
                "index": 0
              }
            ]
          ]
        },
        "Download file1": {
          "main": [
            [
              {
                "node": "Extract from File1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Convert to File": {
          "main": [
            [
              {
                "node": "Upload file",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get many videos": {
          "main": [
            [
              {
                "node": "Get a video",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Loop Over Items": {
          "main": [
            [],
            [
              {
                "node": "Transcribe",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Loop Over Items1": {
          "main": [
            [],
            [
              {
                "node": "Download file1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Trigger Manually": {
          "main": [
            [
              {
                "node": "Edit Fields",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Embeddings OpenAI": {
          "ai_embedding": [
            [
              {
                "node": "Supabase Vector Store",
                "type": "ai_embedding",
                "index": 0
              },
              {
                "node": "Supabase Vector Store1",
                "type": "ai_embedding",
                "index": 0
              }
            ]
          ]
        },
        "Code in JavaScript": {
          "main": [
            [
              {
                "node": "Append or update row in sheet",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Extract Channel ID": {
          "main": [
            [
              {
                "node": "Get many videos",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Extract from File1": {
          "main": [
            [
              {
                "node": "Merge1",
                "type": "main",
                "index": 0
              },
              {
                "node": "Code in JavaScript1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "OpenAI Chat Model1": {
          "ai_languageModel": [
            [
              {
                "node": "AI Agent1",
                "type": "ai_languageModel",
                "index": 0
              }
            ]
          ]
        },
        "Code in JavaScript1": {
          "main": [
            [
              {
                "node": "Supabase Vector Store",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Default Data Loader": {
          "ai_document": [
            [
              {
                "node": "Supabase Vector Store",
                "type": "ai_document",
                "index": 0
              }
            ]
          ]
        },
        "Get row(s) in sheet": {
          "main": [
            [
              {
                "node": "Filter",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Update row in sheet": {
          "main": [
            [
              {
                "node": "Loop Over Items",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get row(s) in sheet2": {
          "main": [
            [
              {
                "node": "Filter2",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Update row in sheet2": {
          "main": [
            [
              {
                "node": "Loop Over Items1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Supabase Vector Store": {
          "main": [
            [
              {
                "node": "Merge1",
                "type": "main",
                "index": 1
              }
            ]
          ]
        },
        "Supabase Vector Store1": {
          "ai_tool": [
            [
              {
                "node": "AI Agent1",
                "type": "ai_tool",
                "index": 0
              }
            ]
          ]
        },
        "Character Text Splitter": {
          "ai_textSplitter": [
            [
              {
                "node": "Default Data Loader",
                "type": "ai_textSplitter",
                "index": 0
              }
            ]
          ]
        },
        "Get Channel Search HTML": {
          "main": [
            [
              {
                "node": "Extract Channel ID",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "When chat message received": {
          "main": [
            [
              {
                "node": "AI Agent1",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Get row(s) in sheet in Google Sheets": {
          "ai_tool": [
            [
              {
                "node": "AI Agent1",
                "type": "ai_tool",
                "index": 0
              }
            ]
          ]
        }
      }
    }