{ "id": "TApiWf44Archiver01", "name": "Conference / Talk Archiver (TranscriptAPI)", "nodes": [ { "parameters": {}, "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4d01", "name": "Start", "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [ -340, 0 ] }, { "parameters": { "assignments": { "assignments": [ { "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4da1", "name": "channel", "value": "REPLACE_WITH_CONFERENCE_CHANNEL_HANDLE_OR_ID", "type": "string" } ] }, "options": {} }, "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4d02", "name": "Set Channel", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ -120, 0 ] }, { "parameters": { "url": "https://transcriptapi.com/api/v2/youtube/channel/resolve", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "input", "value": "={{ $json.channel }}" } ] }, "options": {} }, "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4d03", "name": "Resolve Channel", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 100, 0 ], "credentials": { "httpHeaderAuth": { "id": "REPLACE_TRANSCRIPTAPI_CRED_ID", "name": "TranscriptAPI - Authorization Bearer" } } }, { "parameters": { "url": "https://transcriptapi.com/api/v2/youtube/channel/videos", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "channel", "value": "={{ $json.channel_id }}" } ] }, "options": {} }, "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4d04", "name": "List Channel Videos", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 320, 0 ], "credentials": { "httpHeaderAuth": { "id": "REPLACE_TRANSCRIPTAPI_CRED_ID", "name": "TranscriptAPI - Authorization Bearer" } } }, { "parameters": { "jsCode": "const data = $input.first().json;\nreturn (data.results || []).map((v) => ({ json: { videoId: v.videoId, videoTitle: v.title || null, videoUrl: 'https://www.youtube.com/watch?v=' + v.videoId } }));" }, "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4d05", "name": "Extract Video List", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 540, 0 ] }, { "parameters": { "maxItems": 5 }, "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4d06", "name": "Keep First 5", "type": "n8n-nodes-base.limit", "typeVersion": 1, "position": [ 760, 0 ] }, { "parameters": { "url": "https://transcriptapi.com/api/v2/youtube/transcript", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "video_url", "value": "={{ $json.videoUrl }}" }, { "name": "format", "value": "json" }, { "name": "send_metadata", "value": "true" } ] }, "options": {} }, "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4d07", "name": "Get Transcript (TranscriptAPI)", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 980, 0 ], "credentials": { "httpHeaderAuth": { "id": "REPLACE_TRANSCRIPTAPI_CRED_ID", "name": "TranscriptAPI - Authorization Bearer" } }, "onError": "continueRegularOutput" }, { "parameters": { "mode": "runOnceForEachItem", "jsCode": "const d = $json; const seg = Array.isArray(d.transcript) ? d.transcript : []; const meta = d.metadata || {};\nconst transcriptText = seg.map((s) => s.text).join(' ');\nconst vid = d.video_id;\nreturn {\n json: {\n title: meta.title || vid,\n videoUrl: 'https://www.youtube.com/watch?v=' + vid,\n transcriptApiUrl: 'https://transcriptapi.com/api/v2/youtube/transcript?video_url=https://www.youtube.com/watch?v=' + vid,\n transcriptText,\n hasTranscript: transcriptText.length > 0,\n },\n};" }, "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4d08", "name": "Build Talk Input", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 1200, 0 ] }, { "parameters": { "conditions": { "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "strict" }, "conditions": [ { "id": "c4d4d4d4-4d4d-444d-844d-4d4d4d4d4ccc", "leftValue": "={{ $json.hasTranscript }}", "rightValue": true, "operator": { "type": "boolean", "operation": "true", "singleValue": true } } ], "combinator": "and" }, "options": {} }, "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4d09", "name": "Has Transcript?", "type": "n8n-nodes-base.filter", "typeVersion": 2, "position": [ 1420, 0 ] }, { "parameters": { "method": "POST", "url": "https://api.openai.com/v1/chat/completions", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendBody": true, "specifyBody": "json", "jsonBody": "={{ JSON.stringify({ model: 'gpt-4o-mini', response_format: { type: 'json_object' }, messages: [ { role: 'system', content: 'You are archiving a conference talk. From the transcript, respond with a JSON object with keys: speaker (best guess of the speaker name, or null), company (their company/org if stated, or null), summary (3-4 sentences), tags (array of 4-6 topic tags). Use only what is in the transcript; use null when unknown.' }, { role: 'user', content: 'Talk title: ' + ($json.title || '') + '\\n\\nTranscript:\\n' + $json.transcriptText } ] }) }}", "options": {} }, "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4d10", "name": "Archive Fields (LLM)", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 1640, 0 ], "credentials": { "httpHeaderAuth": { "id": "REPLACE_OPENAI_CRED_ID", "name": "OpenAI - Authorization Bearer" } } }, { "parameters": { "mode": "runOnceForEachItem", "jsCode": "const raw = ($json.choices && $json.choices[0] && $json.choices[0].message.content) || '';\nlet a; try { a = JSON.parse(raw); } catch (e) { a = {}; }\nconst src = $('Build Talk Input').item.json;\nreturn {\n json: {\n talkTitle: src.title,\n speaker: a.speaker || null,\n company: a.company || null,\n summary: a.summary || null,\n tags: a.tags || [],\n videoUrl: src.videoUrl,\n transcriptApiUrl: src.transcriptApiUrl,\n },\n};" }, "id": "4d4d4d4d-4d4d-444d-844d-4d4d4d4d4d11", "name": "Format Archive Row", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 1860, 0 ] } ], "connections": { "Start": { "main": [ [ { "node": "Set Channel", "type": "main", "index": 0 } ] ] }, "Set Channel": { "main": [ [ { "node": "Resolve Channel", "type": "main", "index": 0 } ] ] }, "Resolve Channel": { "main": [ [ { "node": "List Channel Videos", "type": "main", "index": 0 } ] ] }, "List Channel Videos": { "main": [ [ { "node": "Extract Video List", "type": "main", "index": 0 } ] ] }, "Extract Video List": { "main": [ [ { "node": "Keep First 5", "type": "main", "index": 0 } ] ] }, "Keep First 5": { "main": [ [ { "node": "Get Transcript (TranscriptAPI)", "type": "main", "index": 0 } ] ] }, "Get Transcript (TranscriptAPI)": { "main": [ [ { "node": "Build Talk Input", "type": "main", "index": 0 } ] ] }, "Build Talk Input": { "main": [ [ { "node": "Has Transcript?", "type": "main", "index": 0 } ] ] }, "Has Transcript?": { "main": [ [ { "node": "Archive Fields (LLM)", "type": "main", "index": 0 } ] ] }, "Archive Fields (LLM)": { "main": [ [ { "node": "Format Archive Row", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": { "executionOrder": "v1" }, "pinData": {} }