{
"id": "LIAes1kWVZAWZBX2",
"meta": {
"instanceId": "31e69f7f4a77bf465b805824e303232f0227212ae922d12133a0f96ffeab4fef",
"templateCredsSetupCompleted": true
},
"name": "🎥 Analyze YouTube Video for Summaries, Transcripts & Content + Google Gemini AI",
"tags": [],
"nodes": [
{
"id": "6d96092e-a12e-42e7-9700-63d19c3f2403",
"name": "Config",
"type": "n8n-nodes-base.set",
"position": [
2760,
540
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "24e9b1c3-2955-4e0b-9b4b-a6b9d046fb72",
"name": "google_api_key",
"type": "string",
"value": "={{ $env.GOOGLE_API_KEY }}"
},
{
"id": "b6600a42-1b8d-486a-a51d-0868bc45452e",
"name": "youtube_url",
"type": "string",
"value": "=https://www.youtube.com/watch?v={{ $json[\"YouTube Video Id\"] }}"
},
{
"id": "ce9a9a40-5ae4-4106-ae61-0daba2ec185f",
"name": "prompt_type",
"type": "string",
"value": "={{ $json[\"Prompt Type\"] }}"
},
{
"id": "47094d96-2e89-4294-b6da-7ee66917bd98",
"name": "video_id",
"type": "string",
"value": "={{ $json[\"YouTube Video Id\"] }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "4b4373dd-6b54-41c5-a490-91ec78afdb0b",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2320,
760
],
"parameters": {
"width": 300,
"height": 600,
"content": "### Prompt Options\n\n- **default**: Summarizes the video with emphasis on actionable insights, tools, strategies, and resources mentioned.\n\n- **transcribe**: Provides verbatim transcription of all spoken dialogue in the video without additional commentary.\n\n- **timestamps**: Creates a timestamped transcript of the video dialogue in [hh:mm:ss] format.\n\n- **summary**: Generates a concise bullet-point summary of the video's main points.\n\n- **scene**: Provides a comprehensive visual description of the video scene including setting, objects, people, lighting, colors, and camera techniques.\n\n- **clips**: Identifies shareable video segments with timestamps, transcripts, and explanations of their social media appeal.\n\n\n"
},
"typeVersion": 1
},
{
"id": "41605c14-9936-43f2-8f06-c411bfddda99",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
2660,
420
],
"parameters": {
"color": 7,
"width": 300,
"height": 300,
"content": "## Set Workflow Config Variables"
},
"typeVersion": 1
},
{
"id": "fdc9aeb2-35b4-4f33-9438-00a10f0cb0d5",
"name": "Get Video Audience MetaData",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
3440,
540
],
"parameters": {
"url": "=https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key={{ $('Config').item.json.google_api_key }}",
"method": "POST",
"options": {},
"jsonBody": "={{ JSON.stringify({\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": $json.meta_prompt\n },\n { \n \"file_data\": { \n \"file_uri\": $('Config').item.json.youtube_url\n } \n }\n ]\n }\n ],\n \"generationConfig\": {\n \"temperature\": 0.2,\n \"topP\": 0.8,\n \"topK\": 40,\n \"maxOutputTokens\": 2048,\n },\n \"model\": \"gemini-1.5-flash\"\n}) }}\n",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "8cd500b5-7c78-4ae0-be2a-79862e599da3",
"name": "Compose Prompts",
"type": "n8n-nodes-base.set",
"position": [
2760,
980
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "90bd636a-aa19-4f6b-80b3-bb236f29b317",
"name": "content",
"type": "string",
"value": "=
{{ $('Merge').item.json.items[0].snippet.title }}
\n{{ $('Merge').item.json.items[0].id }}
\n\n