Skip to content

Instantly share code, notes, and snippets.

@CodeFocusChannel
Created December 20, 2025 14:28
Show Gist options
  • Select an option

  • Save CodeFocusChannel/ea543ce9a3159545f05875cacaf05656 to your computer and use it in GitHub Desktop.

Select an option

Save CodeFocusChannel/ea543ce9a3159545f05875cacaf05656 to your computer and use it in GitHub Desktop.
Youtuber-to-Consultant-Agents
{
"name": "Find Videos and Add to Sheet",
"nodes": [
{
"parameters": {
"workflowInputs": {
"values": [
{
"name": "channel_id"
},
{
"name": "channel_handle"
},
{
"name": "video_topic_query"
}
]
}
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"id": "651c5da1-1f9e-4ad6-a939-68b02e9cab3a",
"name": "When Executed by Another Workflow"
},
{
"parameters": {
"resource": "video",
"limit": 5,
"filters": {
"channelId": "={{ $json.channel_id }}",
"q": "={{ $json.video_topic_query }}"
},
"options": {}
},
"type": "n8n-nodes-base.youTube",
"typeVersion": 1,
"position": [
208,
0
],
"id": "7ece47c8-8e94-43ab-aa8c-0fa9086ea421",
"name": "Get many videos",
"credentials": {
"youTubeOAuth2Api": {
"id": "PastEx3bxO2UAadP",
"name": "YouTube account"
}
}
},
{
"parameters": {
"resource": "video",
"operation": "get",
"videoId": "={{ $json.id.videoId }}",
"options": {}
},
"type": "n8n-nodes-base.youTube",
"typeVersion": 1,
"position": [
384,
0
],
"id": "261f0ae5-42fc-4686-b1eb-453057a4e53a",
"name": "Get a video",
"credentials": {
"youTubeOAuth2Api": {
"id": "PastEx3bxO2UAadP",
"name": "YouTube account"
}
}
},
{
"parameters": {
"operation": "appendOrUpdate",
"documentId": {
"__rl": true,
"value": "1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM",
"mode": "list",
"cachedResultName": "Ultimate YT Consultant",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": 827493273,
"mode": "list",
"cachedResultName": "Videos",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit#gid=827493273"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Video ID": "={{ $json.id }}",
"Channel ID": "={{ $json.snippet.channelId }}",
"Title": "={{ $json.snippet.title }}",
"Publish Time": "={{ $json.snippet.publishedAt }}",
"Channel": "={{ $('When Executed by Another Workflow').item.json.channel_handle }}",
"Thumbnail": "={{ $json.snippet.thumbnails.high.url }}",
"Link": "=https://www.youtube.com/watch?v={{ $json.id }}",
"View Count": "={{ $json.statistics.viewCount }}",
"Like Count": "={{ $json.statistics.likeCount }}",
"Comment Count": "={{ $json.statistics.commentCount }}",
"Type": "={{ $json.isShort ? 'Short' : 'Video' }}",
"Seconds": "={{ $json.totalSeconds }}"
},
"matchingColumns": [
"Video ID"
],
"schema": [
{
"id": "Video ID",
"displayName": "Video ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Channel ID",
"displayName": "Channel ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Channel",
"displayName": "Channel",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Title",
"displayName": "Title",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Type",
"displayName": "Type",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Seconds",
"displayName": "Seconds",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Publish Time",
"displayName": "Publish Time",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Link",
"displayName": "Link",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Thumbnail",
"displayName": "Thumbnail",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "View Count",
"displayName": "View Count",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Like Count",
"displayName": "Like Count",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Comment Count",
"displayName": "Comment Count",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Transcript File ID",
"displayName": "Transcript File ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Transcript Link",
"displayName": "Transcript Link",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"useAppend": true
}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
768,
0
],
"id": "1f8f9209-c874-49f0-b487-c12572ffe015",
"name": "Append or update row in sheet",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "HngHdvL4ncK2MxZb",
"name": "Google Sheets account"
}
}
},
{
"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()"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
576,
0
],
"id": "295d05a5-c795-4fbe-ab31-03463a59e667",
"name": "Code in JavaScript"
}
],
"pinData": {},
"connections": {
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Get many videos",
"type": "main",
"index": 0
}
]
]
},
"Get many videos": {
"main": [
[
{
"node": "Get a video",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript": {
"main": [
[
{
"node": "Append or update row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Get a video": {
"main": [
[
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "ae71cc54-2b9b-4066-8953-880999a84f11",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "3f8f24ba926ad175fb3fa0b581d1ea7e580749c1a4da438e4b4b0f683c1dc9a3"
},
"id": "TNWFb0bmuBx683lR",
"tags": [
{
"updatedAt": "2025-12-18T01:15:55.084Z",
"createdAt": "2025-12-18T01:15:55.084Z",
"id": "CUSE04zgNpGLQlhR",
"name": "Ultimate Consultant"
}
]
}
{
"name": "Get Channel ID from Handle",
"nodes": [
{
"parameters": {
"inputSource": "jsonExample",
"jsonExample": "{\n \"handle\": \"KyleFrielTech\"\n}"
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"id": "b7720bfa-53b3-4600-997f-58343210a9ff",
"name": "When Executed by Another Workflow"
},
{
"parameters": {
"url": "https://youtube.com/results",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "search_query",
"value": "={{ $json.handle }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
192,
0
],
"id": "875cd0a8-0d88-42e2-908e-ca4ce16f2e0b",
"name": "Get Channel Search HTML"
},
{
"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(/^\\/?/, '').replace(/^@/, ''),\n });\n}\n\nreturn results.map(channel => ({ json: channel }));"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
384,
0
],
"id": "969bcfc2-2b71-47a5-a597-af4de2fe1c51",
"name": "Extract Channel ID"
}
],
"pinData": {
"When Executed by Another Workflow": [
{
"json": {
"handle": "KyleFrielTech"
}
}
]
},
"connections": {
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Get Channel Search HTML",
"type": "main",
"index": 0
}
]
]
},
"Get Channel Search HTML": {
"main": [
[
{
"node": "Extract Channel ID",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "48d8688e-4ede-4588-b364-4d5fb889b4a1",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "3f8f24ba926ad175fb3fa0b581d1ea7e580749c1a4da438e4b4b0f683c1dc9a3"
},
"id": "Vv0ohYZQtb4WPsBp",
"tags": [
{
"updatedAt": "2025-12-18T01:15:55.084Z",
"createdAt": "2025-12-18T01:15:55.084Z",
"id": "CUSE04zgNpGLQlhR",
"name": "Ultimate Consultant"
}
]
}
{
"name": "Influencer -> Personal Consultant",
"nodes": [
{
"parameters": {
"toolDescription": "Resolves a YouTube channel handle to its canonical channel_handle and channel_id.\nChecks a Google Sheet for existing records, fetches missing channel IDs when needed, updates the sheet, and returns the resolved values.\nUse this tool whenever a YouTube creator or channel is referenced before performing any video-related actions.",
"text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt__User_Message_', ``, 'string') }}",
"options": {
"systemMessage": "=# Role\nYou manage canonical storage and retrieval of YouTube channel data using a Google Sheet.\n\n# Input\n- A YouTube channel handle or a close variant of one.\n\n# Workflow\nWhen a channel handle is mentioned:\n1. Search the Google Sheet for an existing entry.\n2. If found and channel_id exists:\n - Return channel_handle and channel_id.\n3. If found but channel_id is missing:\n - Use the Get Channel ID tool.\n - Update the existing row.\n - Return channel_handle and channel_id.\n4. If not found:\n - Use the Get Channel ID tool.\n - Save a new row with the canonical handle and channel_id.\n - Return channel_handle and channel_id.\n\n# Matching Rules\n- If the provided handle is similar but not exact, use Get Channel ID to verify identity.\n- Always store and return the canonical handle returned by the tool.\n\n# Output\n- Return ONLY:\n - channel_handle\n - channel_id\n- No explanations, no follow-up questions."
}
},
"type": "@n8n/n8n-nodes-langchain.agentTool",
"typeVersion": 2.2,
"position": [
1072,
208
],
"id": "f3a76a83-f34c-44dc-9efc-0907b83e032e",
"name": "Channel Agent"
},
{
"parameters": {
"description": "Call this tool to get a channel id by passing in a channel handle. You must pass in a handle. The output will include a Channel ID and Channel Handle. If the channel handle doesn't line-up with the inputted channel handle, there might have been an error.",
"workflowId": {
"__rl": true,
"value": "Vv0ohYZQtb4WPsBp",
"mode": "list",
"cachedResultUrl": "/workflow/Vv0ohYZQtb4WPsBp",
"cachedResultName": "Get Channel ID from Handle"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"handle": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('handle', ``, 'string') }}"
},
"matchingColumns": [
"handle"
],
"schema": [
{
"id": "handle",
"displayName": "handle",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"typeVersion": 2.2,
"position": [
1232,
432
],
"id": "53b5bb14-bc1d-42a5-be6d-c4385ad5906f",
"name": "Get Channel ID"
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Append a new row in the google sheet for a channel",
"operation": "appendOrUpdate",
"documentId": {
"__rl": true,
"value": "1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM",
"mode": "list",
"cachedResultName": "Ultimate YT Consultant",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Channels",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit#gid=0"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Handle": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Handle', ``, 'string') }}",
"Channel ID": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Channel_ID', ``, 'string') }}"
},
"matchingColumns": [
"Handle"
],
"schema": [
{
"id": "Handle",
"displayName": "Handle",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Channel ID",
"displayName": "Channel ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.7,
"position": [
1472,
352
],
"id": "0dc52152-f4f8-4cc0-bd87-3a67c2d843fb",
"name": "Append or Update Channel Row",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "HngHdvL4ncK2MxZb",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"toolDescription": "Retrieves and stores videos for a given YouTube channel using channel_handle and channel_id.\nChecks a Google Sheet for existing videos, finds and adds missing videos without duplication, enriches videos with transcripts when required, and maintains transcript/vector indexing status.\nUse this tool for any request involving videos, video content, or creator knowledge derived from videos.",
"text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt__User_Message_', ``, 'string') }}",
"options": {
"systemMessage": "=# Role\nYou manage storage, enrichment, and retrieval of YouTube video data using a Google Sheet and a vector database.\n\n# Input\n- channel_handle\n- channel_id\n- video_id (when enriching an existing video)\n\n# Tools\n1. Get Videos from Sheet\n2. Find Videos and Add to Sheet\n3. Transcribe Video and Index\n - Transcribes a video\n - Uploads transcript to vector DB\n - Updates transcript/vector status in the Google Sheet\n\n# Workflow\n1. Always check the Google Sheet first.\n2. If videos exist, retrieve them.\n3. If videos are missing or more are requested:\n - Find and add new videos (avoid duplicates).\n4. If a video requires transcript-based intelligence:\n - Check transcript/vector status in the sheet.\n - If missing or outdated, call Transcribe Video and Index.\n5. Return only the relevant video data.\n\n# Rules\n- Never duplicate videos or transcripts.\n- Never resolve channels — assume channel inputs are valid.\n- Do not ask follow-up questions.\n- After retrieving any relevant videos, you MUST ensure transcripts are indexed for them unless the user explicitly requests metadata only."
}
},
"type": "@n8n/n8n-nodes-langchain.agentTool",
"typeVersion": 2.2,
"position": [
704,
304
],
"id": "8348abf8-99e6-4d1c-ab1d-a7c9db5e2782",
"name": "Videos Agent"
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM",
"mode": "list",
"cachedResultName": "Ultimate YT Consultant",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": 827493273,
"mode": "list",
"cachedResultName": "Videos",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit#gid=827493273"
},
"options": {}
},
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.7,
"position": [
736,
560
],
"id": "7444e514-8b7a-4afb-9269-3b6f3bb40bb2",
"name": "Get Videos from Sheet",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "HngHdvL4ncK2MxZb",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Get a youtube channel rows from the google sheet",
"documentId": {
"__rl": true,
"value": "1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM",
"mode": "list",
"cachedResultName": "Ultimate YT Consultant",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Channels",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit#gid=0"
},
"options": {}
},
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.7,
"position": [
1360,
480
],
"id": "041c074c-bb43-4cbb-bc64-ef1a668fb8ee",
"name": "Get Channels from Sheet",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "HngHdvL4ncK2MxZb",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"description": "Call this tool to find videos based on the channel_id and channel_handle, and have them added to the google sheet videos database",
"workflowId": {
"__rl": true,
"value": "TNWFb0bmuBx683lR",
"mode": "list",
"cachedResultUrl": "/workflow/TNWFb0bmuBx683lR",
"cachedResultName": "Find Videos and Add to Sheet"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"channel_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('channel_id', ``, 'string') }}",
"channel_handle": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('channel_handle', ``, 'string') }}",
"video_topic_query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('video_topic_query', `ONE WORD that best describes the query`, 'string') }}"
},
"matchingColumns": [],
"schema": [
{
"id": "channel_id",
"displayName": "channel_id",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string"
},
{
"id": "channel_handle",
"displayName": "channel_handle",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string"
},
{
"id": "video_topic_query",
"displayName": "video_topic_query",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string"
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"typeVersion": 2.2,
"position": [
896,
640
],
"id": "b02cf857-856f-455e-8f23-1deaf3d92cca",
"name": "Find Videos and Add to Sheet"
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-5.2",
"mode": "list",
"cachedResultName": "gpt-5.2"
},
"responsesApiEnabled": false,
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
1040,
368
],
"id": "630c2408-4b6b-465b-a7a7-3d9c25f29b7a",
"name": "GPT-5.2 (2)",
"credentials": {
"openAiApi": {
"id": "GeU4wllbobmfVPcj",
"name": "OpenAi account 4"
}
}
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-5.2",
"mode": "list",
"cachedResultName": "gpt-5.2"
},
"builtInTools": {},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
192,
224
],
"id": "afd16a2f-8225-43f7-8c96-50547c78057e",
"name": "GPT-5.2 (1)",
"credentials": {
"openAiApi": {
"id": "GeU4wllbobmfVPcj",
"name": "OpenAi account 4"
}
}
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"typeVersion": 1.2,
"position": [
288,
480
],
"id": "d78615c0-f464-477e-9a9d-8d5df0236650",
"name": "Embeddings OpenAI",
"credentials": {
"openAiApi": {
"id": "4QprS3T7aQ3Te4lg",
"name": "OpenAi account 2"
}
}
},
{
"parameters": {
"mode": "retrieve-as-tool",
"toolDescription": "Searches indexed YouTube video transcripts using semantic similarity to retrieve the most relevant transcript chunks for a given query.\nUse this tool only when a request requires understanding, summarizing, or answering questions based on video content for a specific channel.\nAssumes transcripts are already indexed; does not create or modify transcripts.\n",
"tableName": {
"__rl": true,
"value": "ultimate_yt_consultant",
"mode": "list",
"cachedResultName": "ultimate_yt_consultant"
},
"topK": 8,
"options": {
"queryName": "match_ultimate_yt_consultant",
"metadata": {
"metadataValues": [
{
"name": "channelId",
"value": "={{ fromAI(\"channel_id\") }}"
}
]
}
}
},
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"typeVersion": 1.3,
"position": [
336,
304
],
"id": "440609c4-b0b6-4f35-8bcc-cdfa33405dd3",
"name": "Video Transcript Vector Database",
"credentials": {
"supabaseApi": {
"id": "SqvlX6Mb6QjnneeU",
"name": "Supabase account 2"
}
}
},
{
"parameters": {
"workflowId": {
"__rl": true,
"value": "d9N4GTNwRUNCyUDL",
"mode": "list",
"cachedResultUrl": "/workflow/d9N4GTNwRUNCyUDL",
"cachedResultName": "Transcribe and Upload to VectorDB"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"video_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('video_id', ``, 'string') }}"
},
"matchingColumns": [
"video_id"
],
"schema": [
{
"id": "video_id",
"displayName": "video_id",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"typeVersion": 2.2,
"position": [
1056,
560
],
"id": "6c57b568-755f-4908-ba46-05a76b67a759",
"name": "Transcribe Video and Index"
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.text }}",
"options": {
"systemMessage": "=# Role\nYou are the orchestration agent that turns YouTube creators into personal assistants by coordinating specialized sub-agents and retrieval tools.\n\nYou do not manage YouTube channels, videos, transcripts, or storage directly.\n\n# Responsibilities\n- Interpret user intent.\n- Decide which sub-agents and tools to call, and in what order.\n- Assemble a final user-facing response using retrieved data.\n\n# Sub-Agents\n- Channel Agent\n - Resolves and stores canonical YouTube channel_handle and channel_id.\n- Videos Agent\n - Retrieves, enriches, and stores YouTube video data.\n - Ensures transcripts are indexed when required.\n\n# Tools\n- Vector DB Retrieval Tool\n - Retrieves transcript-based documents or chunks for semantic answering.\n\n# Decision Rules\n1. If a request references a YouTube creator or channel:\n - Call the Channel Agent to resolve channel_handle and channel_id.\n2. If a request involves videos:\n - Call the Videos Agent using the resolved channel_handle and channel_id.\n3. If a request requires understanding, summarizing, or answering questions based on video content:\n - Ensure videos are available via the Videos Agent.\n - Then call the Vector DB Retrieval Tool using the channel_id.\n4. Never call video or transcript-related tools directly — delegate to the Videos Agent.\n5. Never retrieve from the vector DB unless the user intent requires semantic understanding.\n\n# Output Rules\n- Do not expose internal agents, tools, or storage details.\n- Do not ask follow-up questions unless required information cannot be inferred or retrieved.\n- Return a clean, concise, user-facing response.\n- Show video sources data"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3,
"position": [
416,
0
],
"id": "9f2a82b1-9195-45bb-950a-3060fe0550bf",
"name": "Main Agent"
},
{
"parameters": {
"updates": [
"message"
],
"additionalFields": {
"chatIds": "7233189346"
}
},
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1.2,
"position": [
-512,
-32
],
"id": "2537f26d-da1e-4af2-9e24-66a9cdfceccb",
"name": "Telegram Trigger",
"webhookId": "0cb7fad1-e6a9-4eaa-9fb9-f4aa5fb04ce3",
"credentials": {
"telegramApi": {
"id": "CEwEw2HI6qQM6S5V",
"name": "Telegram account"
}
}
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"leftValue": "={{ $json.message.text }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"id": "e438fcb5-348c-4e40-9b80-5ea0ac7f600d"
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Text Input"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "993e8714-a5e9-4053-be8c-664f07822ed9",
"leftValue": "={{ $json.message.voice }}",
"rightValue": "",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Audio Input"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
-336,
-32
],
"id": "76a41c09-73f3-4700-afe7-a10c7087bf15",
"name": "Switch"
},
{
"parameters": {
"resource": "audio",
"operation": "transcribe",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
16,
48
],
"id": "4c61b83d-dc23-45b4-af90-b818ccd24b1a",
"name": "Transcribe Audio",
"credentials": {
"openAiApi": {
"id": "ttE233fjXBNaE9zY",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"resource": "file",
"fileId": "={{ $json.message.voice.file_id }}",
"additionalFields": {}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
-144,
48
],
"id": "9a148f2e-fe20-444b-a0c7-563a3335a5dd",
"name": "Get Audio File",
"webhookId": "147211d8-ec3d-40ec-a4bd-92249b54b277",
"credentials": {
"telegramApi": {
"id": "CEwEw2HI6qQM6S5V",
"name": "Telegram account"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "5e6dc9a3-c13e-4af0-81cd-f5909b285522",
"name": "text",
"value": "={{ $json.message.text }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-64,
-112
],
"id": "708c6b45-1820-498d-a1c4-c98005d36f2f",
"name": "Text"
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-5.2",
"mode": "list",
"cachedResultName": "gpt-5.2"
},
"responsesApiEnabled": false,
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
656,
448
],
"id": "7eccf3bd-3014-45a4-96bb-2512aab67624",
"name": "GPT-5.2 (3)",
"credentials": {
"openAiApi": {
"id": "GeU4wllbobmfVPcj",
"name": "OpenAi account 4"
}
}
},
{
"parameters": {
"content": "## Setup Guide\n### **Author**: Kyle Friel\n\n1. Download and import ALL 4 workflows and make sure they're connected to the \"call n8n Workflow tool\" nodes:\n- Influencer -> Personal Consultant (this one)\n- Get Channel ID from Handle\n- Transcribe and Upload to Vector DB\n- Find Videos and Add to Sheet\n\nMake sure to \"Publish\" the sub-workflows\n\n2. Make a copy of the [Google Sheet database](https://docs.google.com/spreadsheets/d/1lOQPla6HZU87AeKzITAjPKaMg03opNzGi9kyB4cmrpQ/edit?usp=sharing) (file -> make a copy)\n3. Setup Supabase Credentials & new vector db\nhttps://youtu.be/xzUb6ER5FkY?si=e6LkF0z-jdHLtsdD\nhttps://youtu.be/jW-FEW6d1M8?si=QA0cy1im5NJ7LTv_\n4. Setup OpenAI credentials\nhttps://platform.openai.com/settings/organization/api-keys\n5. Setup Google Cloud Credentials\nhttps://youtu.be/fb7Qze54x3g?si=t10ZR7EB3iIcyE87",
"height": 512,
"width": 448,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-992,
-768
],
"typeVersion": 1,
"id": "eb6e3092-7a19-4328-91cf-c56e8cc54d33",
"name": "Sticky Note"
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "={{ $json.output }}",
"additionalFields": {
"parse_mode": "HTML"
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
768,
0
],
"id": "a7177e09-c76a-486c-b720-081e98cdbd1f",
"name": "Send a text message",
"webhookId": "30b96392-f4b9-4aa6-a373-8fe6841b3369",
"credentials": {
"telegramApi": {
"id": "CEwEw2HI6qQM6S5V",
"name": "Telegram account"
}
}
}
],
"pinData": {},
"connections": {
"Channel Agent": {
"ai_tool": [
[
{
"node": "Main Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get Channel ID": {
"ai_tool": [
[
{
"node": "Channel Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Append or Update Channel Row": {
"ai_tool": [
[
{
"node": "Channel Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Videos Agent": {
"ai_tool": [
[
{
"node": "Main Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get Videos from Sheet": {
"ai_tool": [
[
{
"node": "Videos Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get Channels from Sheet": {
"ai_tool": [
[
{
"node": "Channel Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Find Videos and Add to Sheet": {
"ai_tool": [
[
{
"node": "Videos Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"GPT-5.2 (2)": {
"ai_languageModel": [
[
{
"node": "Channel Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"GPT-5.2 (1)": {
"ai_languageModel": [
[
{
"node": "Main Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Video Transcript Vector Database",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Video Transcript Vector Database": {
"ai_tool": [
[
{
"node": "Main Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Transcribe Video and Index": {
"ai_tool": [
[
{
"node": "Videos Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Text",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Audio File",
"type": "main",
"index": 0
}
]
]
},
"Get Audio File": {
"main": [
[
{
"node": "Transcribe Audio",
"type": "main",
"index": 0
}
]
]
},
"Text": {
"main": [
[
{
"node": "Main Agent",
"type": "main",
"index": 0
}
]
]
},
"Transcribe Audio": {
"main": [
[
{
"node": "Main Agent",
"type": "main",
"index": 0
}
]
]
},
"GPT-5.2 (3)": {
"ai_languageModel": [
[
{
"node": "Videos Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Main Agent": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "fdce1347-f22c-4cdf-a894-e96558195b56",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "3f8f24ba926ad175fb3fa0b581d1ea7e580749c1a4da438e4b4b0f683c1dc9a3"
},
"id": "WcElB0gF7Q77jYlR",
"tags": [
{
"updatedAt": "2025-12-18T01:15:55.084Z",
"createdAt": "2025-12-18T01:15:55.084Z",
"id": "CUSE04zgNpGLQlhR",
"name": "Ultimate Consultant"
}
]
}
{
"name": "Transcribe and Upload to VectorDB",
"nodes": [
{
"parameters": {
"workflowInputs": {
"values": [
{
"name": "video_id"
}
]
}
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
-144,
0
],
"id": "aa5eeefb-33de-45b9-897c-d7973ab52ae9",
"name": "When Executed by Another Workflow"
},
{
"parameters": {
"url": "=https://880e8f45be72.ngrok-free.app/transcript/{{ $json['Video ID'] }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
624,
0
],
"id": "9f1aff1f-e9d4-4dfd-bab8-1ee885e70b48",
"name": "Transcribe"
},
{
"parameters": {
"operation": "update",
"documentId": {
"__rl": true,
"value": "1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM",
"mode": "list",
"cachedResultName": "Ultimate YT Consultant",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": 827493273,
"mode": "list",
"cachedResultName": "Videos",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit#gid=827493273"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Transcript File ID": "={{ $json.id }}",
"Transcript Link": "=https://drive.google.com/file/d/{{ $json.id }}",
"Video ID": "={{ $('When Executed by Another Workflow').item.json.video_id }}"
},
"matchingColumns": [
"Video ID"
],
"schema": [
{
"id": "Video ID",
"displayName": "Video ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Channel ID",
"displayName": "Channel ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Channel",
"displayName": "Channel",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Title",
"displayName": "Title",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Type",
"displayName": "Type",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Seconds",
"displayName": "Seconds",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Publish Time",
"displayName": "Publish Time",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Link",
"displayName": "Link",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Thumbnail",
"displayName": "Thumbnail",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "View Count",
"displayName": "View Count",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Like Count",
"displayName": "Like Count",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Comment Count",
"displayName": "Comment Count",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Transcript File ID",
"displayName": "Transcript File ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Transcript Link",
"displayName": "Transcript Link",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Vector Status",
"displayName": "Vector Status",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "row_number",
"displayName": "row_number",
"required": false,
"defaultMatch": false,
"display": true,
"type": "number",
"canBeUsedToMatch": true,
"readOnly": true,
"removed": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
1216,
-144
],
"id": "c91bd738-ecb1-4847-9c0e-0cc89d690a87",
"name": "Update row in sheet",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "HngHdvL4ncK2MxZb",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"operation": "toJson",
"mode": "each",
"options": {
"fileName": "={{ $json.videoId }}.json"
}
},
"type": "n8n-nodes-base.convertToFile",
"typeVersion": 1.1,
"position": [
864,
-144
],
"id": "8871be6a-bd49-4ac3-8f97-912b1cd88d5b",
"name": "Convert to File"
},
{
"parameters": {
"name": "=",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"value": "1SX6_8rTYKY4tnJ4YkYr3ayDljmf4sUTK",
"mode": "list",
"cachedResultName": "ultimate yt consultant transcripts",
"cachedResultUrl": "https://drive.google.com/drive/folders/1SX6_8rTYKY4tnJ4YkYr3ayDljmf4sUTK"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
1040,
-144
],
"id": "0fc47925-8980-41ed-a57b-eed223226941",
"name": "Upload file",
"credentials": {
"googleDriveOAuth2Api": {
"id": "kKFjcq5OGFjxf4fD",
"name": "Google Drive account 3"
}
}
},
{
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const segments = $json.segments;\nconst videoTitle = $('Get Video').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};"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
864,
80
],
"id": "6fc8bbc1-46c2-478b-829f-342961afdd62",
"name": "Code in JavaScript1"
},
{
"parameters": {
"mode": "insert",
"tableName": {
"__rl": true,
"value": "ultimate_yt_consultant",
"mode": "list",
"cachedResultName": "ultimate_yt_consultant"
},
"options": {
"queryName": "match_ultimate_yt_consultant"
}
},
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"typeVersion": 1.3,
"position": [
1040,
80
],
"id": "ba68c86d-07ee-41f8-9ffd-7fa24f52dd9b",
"name": "Supabase Vector Store",
"credentials": {
"supabaseApi": {
"id": "SqvlX6Mb6QjnneeU",
"name": "Supabase account 2"
}
}
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"typeVersion": 1.2,
"position": [
1008,
272
],
"id": "219f9925-0941-4a48-99a4-f0be756c5b05",
"name": "Embeddings OpenAI",
"credentials": {
"openAiApi": {
"id": "4QprS3T7aQ3Te4lg",
"name": "OpenAi account 2"
}
}
},
{
"parameters": {
"jsonMode": "expressionData",
"jsonData": "={{ $json.fullText }}",
"textSplittingMode": "custom",
"options": {
"metadata": {
"metadataValues": [
{
"name": "type",
"value": "={{ $('Get Video').item.json.Type }}"
},
{
"name": "title",
"value": "={{ $('Get Video').item.json.Title }}"
},
{
"name": "channel",
"value": "={{ $('Get Video').item.json.Channel }}"
},
{
"name": "videoId",
"value": "={{ $('Get Video').item.json['Video ID'] }}"
},
{
"name": "channelId",
"value": "={{ $('Get Video').item.json['Channel ID'] }}"
},
{
"name": "likeCount",
"value": "={{ $('Get Video').item.json['Like Count'] }}"
},
{
"name": "viewCount",
"value": "={{ $('Get Video').item.json['View Count'] }}"
},
{
"name": "publishedAt",
"value": "={{ $('Get Video').item.json['Publish Time'] }}"
},
{
"name": "commentCount",
"value": "={{ $('Get Video').item.json['Comment Count'] }}"
},
{
"name": "durationInSeconds",
"value": "={{ $('Get Video').item.json.Seconds }}"
}
]
}
}
},
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"typeVersion": 1.1,
"position": [
1184,
288
],
"id": "3bb3b866-cf4e-459b-899e-96a43f2b30d3",
"name": "Default Data Loader"
},
{
"parameters": {
"separator": "||"
},
"type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
"typeVersion": 1,
"position": [
1280,
496
],
"id": "3679e117-ddab-4e86-b209-feee0e0a9b1e",
"name": "Character Text Splitter"
},
{
"parameters": {
"operation": "update",
"documentId": {
"__rl": true,
"value": "1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM",
"mode": "list",
"cachedResultName": "Ultimate YT Consultant",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": 827493273,
"mode": "list",
"cachedResultName": "Videos",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit#gid=827493273"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Vector Status": "Added",
"Video ID": "={{ $('When Executed by Another Workflow').item.json.video_id }}"
},
"matchingColumns": [
"Video ID"
],
"schema": [
{
"id": "Video ID",
"displayName": "Video ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Channel ID",
"displayName": "Channel ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Channel",
"displayName": "Channel",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Title",
"displayName": "Title",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Type",
"displayName": "Type",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Seconds",
"displayName": "Seconds",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Publish Time",
"displayName": "Publish Time",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Link",
"displayName": "Link",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Thumbnail",
"displayName": "Thumbnail",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "View Count",
"displayName": "View Count",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Like Count",
"displayName": "Like Count",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Comment Count",
"displayName": "Comment Count",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Transcript File ID",
"displayName": "Transcript File ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Transcript Link",
"displayName": "Transcript Link",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Vector Status",
"displayName": "Vector Status",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "row_number",
"displayName": "row_number",
"required": false,
"defaultMatch": false,
"display": true,
"type": "number",
"canBeUsedToMatch": true,
"readOnly": true,
"removed": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
1648,
-16
],
"id": "e0d7379f-6a70-4803-a252-07c9be907488",
"name": "Update row in sheet2",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "HngHdvL4ncK2MxZb",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"mode": "chooseBranch"
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
1488,
-16
],
"id": "7a8a28ff-e600-4ad2-9f59-f8d904245318",
"name": "Merge1"
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM",
"mode": "list",
"cachedResultName": "Ultimate YT Consultant",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": 827493273,
"mode": "list",
"cachedResultName": "Videos",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HjizuLGOWYX5_0_BRvekKLf80MTQd0vmwX5oqsSP6vM/edit#gid=827493273"
},
"filtersUI": {
"values": [
{
"lookupColumn": "Video ID",
"lookupValue": "={{ $json.video_id }}"
}
]
},
"options": {
"returnFirstMatch": true
}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
80,
0
],
"id": "dc0c4d13-2564-4f2b-a78a-96f4bc866266",
"name": "Get Video",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "HngHdvL4ncK2MxZb",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "e42b6880-f7ef-42d9-8aba-bbad51d89115",
"leftValue": "={{ $json['Transcript File ID'] }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
288,
0
],
"id": "f973488f-64f6-485d-aaf9-abaf89253c6a",
"name": "If"
},
{
"parameters": {
"actorSource": "store",
"actorId": {
"__rl": true,
"value": "h7sDV53CddomktSi5",
"mode": "list",
"cachedResultName": "YouTube Scraper (streamers/youtube-scraper)",
"cachedResultUrl": "https://console.apify.com/actors/h7sDV53CddomktSi5/input"
},
"customBody": "{\n \n}"
},
"type": "@apify/n8n-nodes-apify.apify",
"typeVersion": 1,
"position": [
592,
224
],
"id": "732bb24c-d4f3-441e-b7f3-4c3b409b548b",
"name": "Run an Actor",
"credentials": {
"apifyApi": {
"id": "V0yYbqNjmabBd7gQ",
"name": "Apify account"
}
}
}
],
"pinData": {
"When Executed by Another Workflow": [
{
"json": {
"video_id": "BhaWb6AHqFU"
}
}
]
},
"connections": {
"Transcribe": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
},
{
"node": "Code in JavaScript1",
"type": "main",
"index": 0
}
]
]
},
"Convert to File": {
"main": [
[
{
"node": "Upload file",
"type": "main",
"index": 0
}
]
]
},
"Upload file": {
"main": [
[
{
"node": "Update row in sheet",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Get Video",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript1": {
"main": [
[
{
"node": "Supabase Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Supabase Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Supabase Vector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"Merge1": {
"main": [
[
{
"node": "Update row in sheet2",
"type": "main",
"index": 0
}
]
]
},
"Update row in sheet": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 0
}
]
]
},
"Supabase Vector Store": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 1
}
]
]
},
"Get Video": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "Transcribe",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "b0d8e356-2239-4657-bb24-1ca9465a0cbf",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "3f8f24ba926ad175fb3fa0b581d1ea7e580749c1a4da438e4b4b0f683c1dc9a3"
},
"id": "d9N4GTNwRUNCyUDL",
"tags": [
{
"updatedAt": "2025-12-18T01:15:55.084Z",
"createdAt": "2025-12-18T01:15:55.084Z",
"id": "CUSE04zgNpGLQlhR",
"name": "Ultimate Consultant"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment