{
  "name": "TranscriptFetch: chat with any video",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "id": "add472ce-4b65-4e6d-b827-5861f0116719",
      "name": "Chat",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "webhookId": "87e08db1-fc14-4828-bcd8-28b759040f5f"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You help people work with online videos. When the user gives you a YouTube, TikTok or Instagram link, fetch its transcript with the Get transcript tool before answering, and quote it when that helps. When they ask what a channel or a topic covers, use Search videos to find videos, then fetch the transcripts you need. Never invent what a video says."
        }
      },
      "id": "f079d256-0675-4749-9608-73fdf6cf51aa",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        240,
        0
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4.1-mini",
          "mode": "list",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {}
      },
      "id": "a645c638-d320-4cc7-86b3-303a2087a208",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        120,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Fetch the transcript of a YouTube, TikTok or Instagram video, or of a direct link to an audio or video file.",
        "resource": "transcript",
        "operation": "getVideo",
        "video": "={{ $fromAI('video', 'The video URL or YouTube video id', 'string') }}",
        "videoOptions": {
          "timestamps": false
        }
      },
      "id": "ba9e215b-e00a-4d4c-9054-a705b1d4d96c",
      "name": "Get transcript",
      "type": "n8n-nodes-transcriptfetch.transcriptFetchTool",
      "typeVersion": 2,
      "position": [
        340,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Search YouTube for videos by keyword. Each result has a url you can pass to Get transcript.",
        "resource": "transcript",
        "operation": "search",
        "query": "={{ $fromAI('query', 'What to search for', 'string') }}",
        "platform": "youtube",
        "limit": 5
      },
      "id": "845a7f29-ea05-4e9c-a6de-c183bd85d2cb",
      "name": "Search videos",
      "type": "n8n-nodes-transcriptfetch.transcriptFetchTool",
      "typeVersion": 2,
      "position": [
        500,
        220
      ]
    }
  ],
  "connections": {
    "Chat": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get transcript": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Search videos": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  }
}
