{ "id": "TApiWf46MeetingPrep01", "name": "Meeting Prep Research Pack (TranscriptAPI)", "nodes": [ { "parameters": {}, "id": "46464646-4646-4646-8646-464646464601", "name": "Start", "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [ -300, 0 ] }, { "parameters": { "assignments": { "assignments": [ { "id": "46464646-4646-4646-8646-4646464646a1", "name": "searchQuery", "value": "REPLACE_WITH_COMPANY_NAME", "type": "string" } ] }, "options": {} }, "id": "46464646-4646-4646-8646-464646464602", "name": "Set Company", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ -80, 0 ] }, { "parameters": { "url": "https://transcriptapi.com/api/v2/youtube/search", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "q", "value": "={{ $json.searchQuery }}" }, { "name": "type", "value": "video" } ] }, "options": {} }, "id": "46464646-4646-4646-8646-464646464603", "name": "Search Videos (TranscriptAPI)", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 140, 0 ], "credentials": { "httpHeaderAuth": { "id": "REPLACE_TRANSCRIPTAPI_CRED_ID", "name": "TranscriptAPI - Authorization Bearer" } } }, { "parameters": { "jsCode": "const data = $input.first().json;\nreturn (data.results || []).filter((r) => r.hasCaptions).map((r) => ({ json: { videoId: r.videoId, title: r.title || null, videoUrl: 'https://www.youtube.com/watch?v=' + r.videoId } }));" }, "id": "46464646-4646-4646-8646-464646464604", "name": "Extract Captioned Results", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 360, 0 ] }, { "parameters": { "maxItems": 4 }, "id": "46464646-4646-4646-8646-464646464605", "name": "Keep Top 4", "type": "n8n-nodes-base.limit", "typeVersion": 1, "position": [ 580, 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": "46464646-4646-4646-8646-464646464606", "name": "Get Transcript (TranscriptAPI)", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 800, 0 ], "credentials": { "httpHeaderAuth": { "id": "REPLACE_TRANSCRIPTAPI_CRED_ID", "name": "TranscriptAPI - Authorization Bearer" } }, "onError": "continueRegularOutput" }, { "parameters": { "jsCode": "const MAX = 6000; const sources = []; const blocks = [];\nfor (const item of $input.all()) {\n const d = item.json; const seg = Array.isArray(d.transcript) ? d.transcript : [];\n if (seg.length === 0) continue;\n const meta = d.metadata || {}; const vid = d.video_id; const title = meta.title || vid;\n const text = seg.map((s) => s.text).join(' ').slice(0, MAX);\n sources.push({ title, videoUrl: 'https://www.youtube.com/watch?v=' + vid });\n blocks.push('### ' + title + '\\n' + text);\n}\nreturn [ { json: { company: $('Set Company').first().json.searchQuery, sources, sourceCount: sources.length, combinedText: blocks.join('\\n\\n') } } ];" }, "id": "46464646-4646-4646-8646-464646464607", "name": "Collect Transcripts", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 1020, 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 a sales/BD researcher preparing a meeting. Using ONLY the supplied transcripts of the company\\u2019s videos, respond with a JSON object with keys: company_narrative (3-4 sentences), recent_announcements (array), customer_pain_points (array the company says it solves), likely_objections (array a prospect might raise), discovery_questions (array of 6-8 good questions to ask in the meeting). Do not invent facts not in the transcripts.' }, { role: 'user', content: 'Company: ' + $json.company + '\\n\\nCompany videos (transcripts):\\n\\n' + $json.combinedText } ] }) }}", "options": {} }, "id": "46464646-4646-4646-8646-464646464608", "name": "Meeting Prep Brief (LLM)", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 1240, 0 ], "credentials": { "httpHeaderAuth": { "id": "REPLACE_OPENAI_CRED_ID", "name": "OpenAI - Authorization Bearer" } } }, { "parameters": { "jsCode": "const raw = ($json.choices && $json.choices[0] && $json.choices[0].message.content) || '';\nlet r; try { r = JSON.parse(raw); } catch (e) { r = {}; }\nconst src = $('Collect Transcripts').first().json;\nreturn [ { json: { company: src.company, companyNarrative: r.company_narrative || null, recentAnnouncements: r.recent_announcements || [], customerPainPoints: r.customer_pain_points || [], likelyObjections: r.likely_objections || [], discoveryQuestions: r.discovery_questions || [], sources: src.sources } } ];" }, "id": "46464646-4646-4646-8646-464646464609", "name": "Format Brief", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 1460, 0 ] } ], "connections": { "Start": { "main": [ [ { "node": "Set Company", "type": "main", "index": 0 } ] ] }, "Set Company": { "main": [ [ { "node": "Search Videos (TranscriptAPI)", "type": "main", "index": 0 } ] ] }, "Search Videos (TranscriptAPI)": { "main": [ [ { "node": "Extract Captioned Results", "type": "main", "index": 0 } ] ] }, "Extract Captioned Results": { "main": [ [ { "node": "Keep Top 4", "type": "main", "index": 0 } ] ] }, "Keep Top 4": { "main": [ [ { "node": "Get Transcript (TranscriptAPI)", "type": "main", "index": 0 } ] ] }, "Get Transcript (TranscriptAPI)": { "main": [ [ { "node": "Collect Transcripts", "type": "main", "index": 0 } ] ] }, "Collect Transcripts": { "main": [ [ { "node": "Meeting Prep Brief (LLM)", "type": "main", "index": 0 } ] ] }, "Meeting Prep Brief (LLM)": { "main": [ [ { "node": "Format Brief", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": { "executionOrder": "v1" }, "pinData": {} }