This workflow follows the Google Drive → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"updatedAt": "2025-11-22T15:51:39.654Z",
"createdAt": "2025-11-03T14:43:18.540Z",
"id": "L9KsnRjS7XVzSoAW",
"name": "YouTube Automation Pipeline - Notion + Gemini + CometAPI + JSON2Video",
"description": null,
"active": false,
"isArchived": false,
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutesInterval": 15
}
]
}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Schedule Trigger - Check for Queued Videos",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-2432,
72
],
"typeVersion": 1.2,
"notesInFlow": true,
"notes": "Runs every 15 minutes to check for queued videos. Adjust interval in node settings."
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "gemini-api-key",
"name": "Gemini API Key",
"type": "string",
"value": ""
},
{
"id": "comet-api-key",
"name": "CometAPI Key",
"type": "string",
"value": ""
},
{
"id": "elevenlabs-api-key",
"name": "ElevenLabs API Key",
"type": "string",
"value": ""
},
{
"id": "json2video-api-key",
"name": "JSON2Video API Key",
"type": "string",
"value": ""
},
{
"id": "telegram-bot-token",
"name": "Telegram Bot Token",
"type": "string",
"value": ""
},
{
"id": "telegram-chat-id",
"name": "Telegram Chat ID",
"type": "string",
"value": ""
},
{
"id": "drive-folder-id",
"name": "Google Drive Folder ID",
"type": "string",
"value": ""
},
{
"id": "upload-post-api-key",
"name": "Upload-Post.com API Key",
"type": "string",
"value": "{{YOUR_JWT_TOKEN}}"
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Set API Keys",
"type": "n8n-nodes-base.set",
"position": [
-2208,
72
],
"notesInFlow": true,
"typeVersion": 3.4,
"notes": "SET BEFORE STARTING: Add all API keys and credentials here"
},
{
"parameters": {
"resource": "database",
"operation": "getAll"
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Load Queued Videos from Notion",
"type": "n8n-nodes-base.notion",
"position": [
-1984,
72
],
"typeVersion": 2.1,
"credentials": {
"notionApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "// Split Script, ImagePrompts, and VideoPrompts by ---scene--- delimiter\nconst items = $input.all();\nconst processedItems = [];\n\nfor (const item of items) {\n const script = item.json.properties?.Script?.rich_text?.[0]?.plain_text || '';\n const imagePrompts = item.json.properties?.ImagePrompts?.rich_text?.[0]?.plain_text || '';\n const videoPrompts = item.json.properties?.VideoPrompts?.rich_text?.[0]?.plain_text || '';\n const videoType = item.json.properties?.Type?.select?.name || 'Short';\n \n // Split by scene delimiter\n const scriptScenes = script.split('---scene---').map(s => s.trim()).filter(s => s !== '');\n const imageScenes = imagePrompts.split('---scene---').map(s => s.trim()).filter(s => s !== '');\n const videoScenes = videoPrompts.split('---scene---').map(s => s.trim()).filter(s => s !== '');\n \n // Validate scene counts match\n if (scriptScenes.length !== imageScenes.length || scriptScenes.length !== videoScenes.length) {\n processedItems.push({\n json: {\n ...item.json,\n error: `Scene count mismatch: Script(${scriptScenes.length}), ImagePrompts(${imageScenes.length}), VideoPrompts(${videoScenes.length})`,\n scenes_valid: false\n }\n });\n } else {\n // Create one item per scene\n for (let i = 0; i < scriptScenes.length; i++) {\n processedItems.push({\n json: {\n ...item.json,\n scene_index: i,\n scene_count: scriptScenes.length,\n scene_script: scriptScenes[i],\n scene_image_prompt: imageScenes[i],\n scene_video_prompt: videoScenes[i],\n video_type: videoType,\n scenes_valid: true\n }\n });\n }\n }\n}\n\nreturn processedItems;"
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Split Scenes and Validate",
"type": "n8n-nodes-base.code",
"position": [
-1760,
72
],
"typeVersion": 2
},
{
"parameters": {
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "scene-validation-check",
"operator": {
"name": "filter.operator.equals",
"type": "boolean",
"operation": "equals"
},
"leftValue": "={{ $json.scenes_valid }}",
"rightValue": true
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Validate Scene Counts",
"type": "n8n-nodes-base.if",
"position": [
-1536,
80
],
"typeVersion": 2.2
},
{
"parameters": {
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "video-type-check",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.video_type }}",
"rightValue": "Short"
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Branch: Short vs Long",
"type": "n8n-nodes-base.if",
"position": [
-1312,
-168
],
"typeVersion": 2.2
},
{
"parameters": {
"method": "POST",
"url": "=https://generativelanguage.googleapis.com/v1beta/models/imagen-3.0-generate-001:generateImages?key={{ $('Set API Keys').item.json['Gemini API Key'] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"contentType": "raw",
"rawContentType": "application/json",
"body": "={\n \"prompt\": \"{{ $json.scene_image_prompt }}\",\n \"numberOfImages\": 1,\n \"aspectRatio\": \"{{ $json.video_type === 'Short' ? 'VERTICAL_9_16' : 'HORIZONTAL_16_9' }}\",\n \"safetyFilterLevel\": \"block_some\",\n \"personGeneration\": \"allow_all\"\n}",
"options": {
"response": {
"response": {
"responseFormat": "json"
}
}
}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Generate Image with Gemini",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1088,
-408
],
"retryOnFail": true,
"typeVersion": 4.2,
"waitBetweenTries": 3000,
"maxTries": 3
},
{
"parameters": {
"jsCode": "// Extract image URL or base64 from Gemini response\nconst item = $input.first();\nconst geminiResponse = item.json;\n\nlet imageUrl = null;\nlet imageBase64 = null;\n\n// Check for image URL in response\nif (geminiResponse.generatedImages && geminiResponse.generatedImages[0]) {\n const imageData = geminiResponse.generatedImages[0];\n if (imageData.imageBase64) {\n imageBase64 = imageData.imageBase64;\n } else if (imageData.imageUrl) {\n imageUrl = imageData.imageUrl;\n }\n}\n\nreturn [{\n json: {\n ...item.json,\n image_url: imageUrl,\n image_base64: imageBase64,\n needs_upload: !!imageBase64\n }\n}];"
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Extract Gemini Image URL",
"type": "n8n-nodes-base.code",
"position": [
-864,
-408
],
"typeVersion": 2
},
{
"parameters": {
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "needs-upload-check",
"operator": {
"name": "filter.operator.equals",
"type": "boolean",
"operation": "equals"
},
"leftValue": "={{ $json.needs_upload }}",
"rightValue": true
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Check if Image Needs Upload",
"type": "n8n-nodes-base.if",
"position": [
-640,
-408
],
"typeVersion": 2.2
},
{
"parameters": {
"name": "=scene-{{ $json.scene_index }}-image.png",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Set API Keys').item.json['Google Drive Folder ID'] }}"
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Upload Image to Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
-416,
-480
],
"typeVersion": 3,
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "share",
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"permissionsUi": {
"permissionsValues": {
"role": "reader",
"type": "anyone"
}
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Share Image on Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
-192,
-480
],
"typeVersion": 3,
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"method": "POST",
"url": "https://api.cometapi.com/v1/clips",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('Set API Keys').item.json['CometAPI Key'] }}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"contentType": "raw",
"rawContentType": "application/json",
"body": "={\n \"prompt\": \"{{ $json.scene_video_prompt }}\",\n \"duration\": 5,\n \"resolution\": \"{{ $json.video_type === 'Short' ? '1080x1920' : '1920x1080' }}\",\n \"style\": \"ugc\",\n \"aspect_ratio\": \"{{ $json.video_type === 'Short' ? '9:16' : '16:9' }}\"\n}",
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Create Clip with CometAPI",
"type": "n8n-nodes-base.httpRequest",
"position": [
-864,
120
],
"retryOnFail": true,
"typeVersion": 4.2,
"waitBetweenTries": 5000,
"maxTries": 3
},
{
"parameters": {
"amount": 30
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Wait for CometAPI Processing",
"type": "n8n-nodes-base.wait",
"position": [
-640,
120
],
"typeVersion": 1.1
},
{
"parameters": {
"url": "=https://api.cometapi.com/v1/clips/{{ $json.clip_id || $json.id }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('Set API Keys').item.json['CometAPI Key'] }}"
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Check CometAPI Clip Status",
"type": "n8n-nodes-base.httpRequest",
"position": [
-416,
48
],
"typeVersion": 4.2
},
{
"parameters": {
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "status-complete-check",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "completed"
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Check if Clip Complete",
"type": "n8n-nodes-base.if",
"position": [
-192,
120
],
"typeVersion": 2.2
},
{
"parameters": {
"method": "POST",
"url": "=https://api.elevenlabs.io/v1/text-to-speech/{{ $json.properties?.VoiceModel?.rich_text?.[0]?.plain_text || 'onwK4e9ZLuTAKqWW03F9' }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "xi-api-key",
"value": "={{ $('Set API Keys').item.json['ElevenLabs API Key'] }}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "text",
"value": "={{ $json.scene_script }}"
},
{
"name": "voice_settings",
"value": "={\"stability\": 0.5, \"similarity_boost\": 0.6}"
}
]
},
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Generate Voiceover with ElevenLabs",
"type": "n8n-nodes-base.httpRequest",
"position": [
-416,
-144
],
"retryOnFail": true,
"typeVersion": 4.2,
"waitBetweenTries": 3000,
"maxTries": 3
},
{
"parameters": {
"name": "=scene-{{ $json.scene_index }}-voiceover.mp3",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Set API Keys').item.json['Google Drive Folder ID'] }}"
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Upload Voiceover to Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
-192,
-144
],
"typeVersion": 3,
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "share",
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"permissionsUi": {
"permissionsValues": {
"role": "reader",
"type": "anyone"
}
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Share Voiceover on Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
32,
-48
],
"typeVersion": 3,
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"mode": "combine",
"combineBy": "combineByPosition",
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Merge Image and Clip",
"type": "n8n-nodes-base.merge",
"position": [
32,
-240
],
"typeVersion": 3
},
{
"parameters": {
"mode": "combine",
"combineBy": "combineByPosition",
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Merge All Scene Assets",
"type": "n8n-nodes-base.merge",
"position": [
256,
-120
],
"typeVersion": 3
},
{
"parameters": {
"jsCode": "// Merge image, clip, and voice data for each scene\nconst items = $input.all();\nconst merged = {};\n\nfor (const item of items) {\n const sceneKey = `${item.json.id || item.json.properties?.id?.title?.[0]?.plain_text}-${item.json.scene_index}`;\n if (!merged[sceneKey]) {\n merged[sceneKey] = {\n ...item.json,\n video_id: item.json.id || item.json.properties?.id?.title?.[0]?.plain_text,\n scene_index: item.json.scene_index,\n scene_script: item.json.scene_script,\n video_type: item.json.video_type || item.json.properties?.Type?.select?.name\n };\n }\n \n // Merge asset URLs\n if (item.json.image_url || item.json.webContentLink) {\n merged[sceneKey].image_url = item.json.image_url || item.json.webContentLink;\n }\n if (item.json.video_url || item.json.url) {\n merged[sceneKey].clip_url = item.json.video_url || item.json.url;\n }\n if (item.json.webContentLink && item.json.name && item.json.name.includes('voiceover')) {\n merged[sceneKey].voice_url = item.json.webContentLink;\n }\n}\n\nreturn Object.values(merged).map(scene => ({ json: scene }));"
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Prepare Scene Data",
"type": "n8n-nodes-base.code",
"position": [
480,
-120
],
"typeVersion": 2
},
{
"parameters": {
"jsCode": "// Group scenes back together by video ID\nconst items = $input.all();\nconst grouped = {};\n\nfor (const item of items) {\n const videoId = item.json.video_id;\n if (!grouped[videoId]) {\n grouped[videoId] = {\n video_id: videoId,\n video_type: item.json.video_type,\n scenes: []\n };\n }\n \n grouped[videoId].scenes.push({\n index: item.json.scene_index,\n script: item.json.scene_script,\n image_url: item.json.image_url,\n clip_url: item.json.clip_url,\n voice_url: item.json.voice_url\n });\n}\n\n// Sort scenes by index\nfor (const videoId in grouped) {\n grouped[videoId].scenes.sort((a, b) => a.index - b.index);\n}\n\nreturn Object.values(grouped).map(video => ({ json: video }));"
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Group Scenes by Video",
"type": "n8n-nodes-base.code",
"position": [
704,
-120
],
"typeVersion": 2
},
{
"parameters": {
"method": "POST",
"url": "https://api.json2video.com/v2/movies",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('Set API Keys').item.json['JSON2Video API Key'] }}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"contentType": "raw",
"rawContentType": "application/json",
"body": "={\n \"scenes\": {{ $json.scenes.map((scene, idx) => ({\n \"id\": idx + 1,\n \"elements\": [\n {\n \"type\": \"video\",\n \"src\": scene.clip_url || scene.image_url,\n \"start\": idx * 5,\n \"duration\": 5\n },\n {\n \"type\": \"audio\",\n \"src\": scene.voice_url,\n \"start\": idx * 5,\n \"duration\": 5\n },\n {\n \"type\": \"text\",\n \"text\": scene.script,\n \"start\": idx * 5,\n \"duration\": 5,\n \"style\": {\n \"fontSize\": 48,\n \"color\": \"#FFFFFF\",\n \"backgroundColor\": \"rgba(0,0,0,0.7)\"\n }\n }\n ]\n })) }},\n \"settings\": {\n \"aspectRatio\": \"{{ $json.video_type === 'Short' ? '9:16' : '16:9' }}\",\n \"resolution\": \"{{ $json.video_type === 'Short' ? '1080x1920' : '1920x1080' }}\",\n \"fps\": 30\n }\n}",
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Create JSON2Video Render",
"type": "n8n-nodes-base.httpRequest",
"position": [
928,
-120
],
"executeOnce": true,
"typeVersion": 4.2
},
{
"parameters": {
"amount": 60
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Wait for JSON2Video Render",
"type": "n8n-nodes-base.wait",
"position": [
1152,
-120
],
"typeVersion": 1.1
},
{
"parameters": {
"url": "=https://api.json2video.com/v2/movies/{{ $json.movie_id || $json.id }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('Set API Keys').item.json['JSON2Video API Key'] }}"
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Check JSON2Video Status",
"type": "n8n-nodes-base.httpRequest",
"position": [
1376,
-192
],
"executeOnce": true,
"typeVersion": 4.2
},
{
"parameters": {
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "render-complete-check",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "completed"
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Check if Render Complete",
"type": "n8n-nodes-base.if",
"position": [
1600,
-120
],
"typeVersion": 2.2
},
{
"parameters": {
"url": "={{ $json.video_url || $json.url }}",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Download Final Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
1824,
-120
],
"typeVersion": 4.2
},
{
"parameters": {
"name": "={{ $json.video_id || 'final-video' }}-{{ Date.now() }}.mp4",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Set API Keys').item.json['Google Drive Folder ID'] }}"
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Upload Final Video to Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
2048,
-120
],
"typeVersion": 3,
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "share",
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"permissionsUi": {
"permissionsValues": {
"role": "reader",
"type": "anyone"
}
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Share Final Video",
"type": "n8n-nodes-base.googleDrive",
"position": [
2272,
-120
],
"typeVersion": 3,
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"fileName": "={{ $json.name.replaceAll(\" \", \"_\") }}",
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Write Video to Disk",
"type": "n8n-nodes-base.writeBinaryFile",
"position": [
2496,
-120
],
"typeVersion": 1
},
{
"parameters": {
"resource": "audio",
"operation": "transcribe",
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Extract Audio from Video",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2720,
-120
],
"notesInFlow": true,
"retryOnFail": true,
"typeVersion": 1,
"waitBetweenTries": 5000,
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"notes": "Extract audio from video for description generation"
},
{
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "GPT-4O"
},
"messages": {
"values": [
{
"content": "You are an expert assistant in creating engaging social media video titles and descriptions.",
"role": "system"
},
{
"content": "=I'm going to upload a video to social media. Here are some examples of descriptions that have worked well on Instagram:\n\nFollow and save for later. Discover InfluencersDe, the AI tool that automates TikTok creation and publishing to drive traffic to your website. Perfect for entrepreneurs and brands.\n#digitalmarketing #ugc #tiktok #ai #influencersde #contentcreation\n\nDiscover the video marketing revolution with InfluencersDe!\n.\n.\n.\n#socialmedia #videomarketing #ai #tiktok #influencersde #growthhacking\n\nDon't miss InfluencersDe, the tool that transforms your marketing strategy with just one click!\n.\n.\n.\n#ugc #ai #tiktok #digitalmarketing #influencersde #branding\n\nCan you create another title for the Instagram post based on this recognized audio from the video?\n\nAudio: {{ $('Extract Audio from Video').item.json.text }}\n\nIMPORTANT: Reply only with the description, don't add anything else."
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Generate Social Media Description",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2944,
-120
],
"notesInFlow": true,
"retryOnFail": true,
"typeVersion": 1.4,
"waitBetweenTries": 5000,
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"notes": "Generate description for social media posts based on video audio"
},
{
"parameters": {
"filePath": "={{ $('Write Video to Disk').first().json.originalFilename.replaceAll(\" \", \"_\") }}"
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Read Video from Google Drive",
"type": "n8n-nodes-base.readBinaryFile",
"position": [
3296,
-120
],
"typeVersion": 1
},
{
"parameters": {
"method": "POST",
"url": "https://api.upload-post.com/api/upload",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Apikey {{ $('Set API Keys').item.json['Upload-Post.com API Key'] }}"
}
]
},
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "title",
"value": "={{ $('Generate Social Media Description').item.json.message.content.replaceAll(\"\\\"\", \"\") }}"
},
{
"name": "platform[]",
"value": "tiktok"
},
{
"parameterType": "formBinaryData",
"name": "video",
"inputDataFieldName": "data"
},
{
"name": "user",
"value": "Add user generated in upload-post"
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Publish to TikTok",
"type": "n8n-nodes-base.httpRequest",
"position": [
3520,
-432
],
"notesInFlow": true,
"typeVersion": 4.2,
"notes": "Upload-post.com API - API key configured in Set API Keys node"
},
{
"parameters": {
"method": "POST",
"url": "https://api.upload-post.com/api/upload",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Apikey {{ $('Set API Keys').item.json['Upload-Post.com API Key'] }}"
}
]
},
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "title",
"value": "={{ $('Generate Social Media Description').item.json.message.content.replaceAll(\"\\\"\", \"\") }}"
},
{
"name": "platform[]",
"value": "instagram"
},
{
"parameterType": "formBinaryData",
"name": "video",
"inputDataFieldName": "data"
},
{
"name": "user",
"value": "Add user generated in upload-post"
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Publish to Instagram",
"type": "n8n-nodes-base.httpRequest",
"position": [
3520,
-240
],
"notesInFlow": true,
"typeVersion": 4.2,
"notes": "Upload-post.com API - API key configured in Set API Keys node"
},
{
"parameters": {
"method": "POST",
"url": "https://api.upload-post.com/api/upload",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Apikey {{ $('Set API Keys').item.json['Upload-Post.com API Key'] }}"
}
]
},
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "title",
"value": "={{ $('Generate Social Media Description').item.json.message.content.replaceAll(\"\\\"\", \"\").substring(0, 70) }}"
},
{
"name": "platform[]",
"value": "youtube"
},
{
"parameterType": "formBinaryData",
"name": "video",
"inputDataFieldName": "data"
},
{
"name": "user",
"value": "Add user generated in upload-post"
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Publish to YouTube",
"type": "n8n-nodes-base.httpRequest",
"position": [
3520,
-48
],
"notesInFlow": true,
"typeVersion": 4.2,
"notes": "Upload-post.com API - API key configured in Set API Keys node"
},
{
"parameters": {
"method": "POST",
"url": "https://api.upload-post.com/api/upload",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Apikey {{ $('Set API Keys').item.json['Upload-Post.com API Key'] }}"
}
]
},
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "title",
"value": "={{ $('Generate Social Media Description').item.json.message.content.replaceAll(\"\\\"\", \"\") }}"
},
{
"name": "platform[]",
"value": "facebook"
},
{
"parameterType": "formBinaryData",
"name": "video",
"inputDataFieldName": "data"
},
{
"name": "user",
"value": "Add user generated in upload-post"
},
{
"name": "facebook_page_id",
"value": "={{ $json.properties?.FacebookPageID?.rich_text?.[0]?.plain_text || '' }}"
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Publish to Facebook",
"type": "n8n-nodes-base.httpRequest",
"position": [
3520,
144
],
"notesInFlow": true,
"typeVersion": 4.2,
"notes": "Upload-post.com API - API key configured in Set API Keys node"
},
{
"parameters": {
"method": "POST",
"url": "https://api.upload-post.com/api/upload",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Apikey {{ $('Set API Keys').item.json['Upload-Post.com API Key'] }}"
}
]
},
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "title",
"value": "={{ $('Generate Social Media Description').item.json.message.content.replaceAll(\"\\\"\", \"\") }}"
},
{
"name": "platform[]",
"value": "linkedin"
},
{
"parameterType": "formBinaryData",
"name": "video",
"inputDataFieldName": "data"
},
{
"name": "user",
"value": "Add user generated in upload-post"
}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Publish to LinkedIn",
"type": "n8n-nodes-base.httpRequest",
"position": [
3520,
336
],
"notesInFlow": true,
"typeVersion": 4.2,
"notes": "Upload-post.com API - API key configured in Set API Keys node"
},
{
"parameters": {
"jsCode": "// Collect all publishing results from multiple inputs\nconst allItems = $input.all();\nconst results = {\n tiktok: null,\n instagram: null,\n youtube: null,\n facebook: null,\n linkedin: null\n};\n\n// Track which nodes processed which items\nlet baseData = null;\n\nfor (const item of allItems) {\n // Get the node name from execution data or check URL/platform in response\n const responseData = item.json;\n \n // Check response for platform indicators\n if (responseData.platform === 'tiktok' || responseData.url?.includes('tiktok')) {\n results.tiktok = responseData.url || responseData.link || responseData.id || 'Published';\n } else if (responseData.platform === 'instagram' || responseData.url?.includes('instagram')) {\n results.instagram = responseData.url || responseData.link || responseData.id || 'Published';\n } else if (responseData.platform === 'youtube' || responseData.url?.includes('youtube')) {\n results.youtube = responseData.url || responseData.link || responseData.id || 'Published';\n } else if (responseData.platform === 'facebook' || responseData.url?.includes('facebook')) {\n results.facebook = responseData.url || responseData.link || responseData.id || 'Published';\n } else if (responseData.platform === 'linkedin' || responseData.url?.includes('linkedin')) {\n results.linkedin = responseData.url || responseData.link || responseData.id || 'Published';\n }\n \n // Keep first item as base data (should have video_id, webContentLink, etc.)\n if (!baseData && (responseData.video_id || responseData.webContentLink)) {\n baseData = responseData;\n }\n}\n\n// Use base data or first item\nconst finalData = baseData || allItems[0].json;\n\nreturn [{\n json: {\n ...finalData,\n publishing_results: results,\n publishing_status: 'Published'\n }\n}];"
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Collect Publishing Results",
"type": "n8n-nodes-base.code",
"position": [
3744,
-240
],
"typeVersion": 2
},
{
"parameters": {
"resource": "databasePage",
"operation": "update",
"pageId": {
"__rl": true,
"value": "https://www.notion.so/faa68ebd30a4457f820c48bad480cd85?v=3789ecbf63034818ad96aa184e24af30&source=copy_link",
"mode": "url"
},
"propertiesUi": {
"propertyValues": [
{},
{}
]
},
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Update Notion - Success",
"type": "n8n-nodes-base.notion",
"position": [
3968,
-240
],
"typeVersion": 2.1,
"credentials": {
"notionApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"method": "POST",
"url": "=https://api.telegram.org/bot{{ $('Set API Keys').item.json['Telegram Bot Token'] }}/sendMessage",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"contentType": "raw",
"rawContentType": "application/json",
"body": "={\n \"chat_id\": \"{{ $('Set API Keys').item.json['Telegram Chat ID'] }}\",\n \"text\": \"\u2705 Video production complete!\\n\\nVideo ID: {{ $json.video_id }}\\nType: {{ $json.video_type }}\\nFinal URL: {{ $json.webContentLink }}\\n\\nPublishing Results:\\nTikTok: {{ $json.publishing_results?.tiktok || 'Pending' }}\\nInstagram: {{ $json.publishing_results?.instagram || 'Pending' }}\\nYouTube: {{ $json.publishing_results?.youtube || 'Pending' }}\\nFacebook: {{ $json.publishing_results?.facebook || 'Pending' }}\\nLinkedIn: {{ $json.publishing_results?.linkedin || 'Pending' }}\\n\\nView in Notion: https://notion.so/{{ $json.video_id }}\",\n \"parse_mode\": \"Markdown\"\n}",
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Notify Telegram - Success",
"type": "n8n-nodes-base.httpRequest",
"position": [
4192,
-240
],
"typeVersion": 4.2
},
{
"parameters": {
"resource": "database",
"databaseId": {
"__rl": true,
"value": "{{YOUR_NOTION_PAGE_ID}}",
"mode": "list",
"cachedResultName": "YouTube AI Content Generator",
"cachedResultUrl": "https://www.notion.so/2542621edc9981c590cbfbc20cc1c7cd"
}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Update Notion - Error",
"type": "n8n-nodes-base.notion",
"position": [
-1312,
288
],
"typeVersion": 2.1,
"credentials": {
"notionApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"method": "POST",
"url": "=https://api.telegram.org/bot{{ $('Set API Keys').item.json['Telegram Bot Token'] }}/sendMessage",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"contentType": "raw",
"rawContentType": "application/json",
"body": "={\n \"chat_id\": \"{{ $('Set API Keys').item.json['Telegram Chat ID'] }}\",\n \"text\": \"\u274c Video production failed!\\n\\nVideo ID: {{ $json.video_id || $json.id }}\\nError: {{ $json.error || 'Unknown error' }}\\n\\nCheck Notion for details.\",\n \"parse_mode\": \"Markdown\"\n}",
"options": {}
},
"id": "{{YOUR_NOTION_PAGE_ID}}",
"name": "Notify Telegram - Error",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1088,
288
],
"typeVersion": 4.2
}
],
"connections": {
"Schedule Trigger - Check for Queued Videos": {
"main": [
[
{
"node": "Set API Keys",
"type": "main",
"index": 0
}
]
]
},
"Set API Keys": {
"main": [
[
{
"node": "Load Queued Videos from Notion",
"type": "main",
"index": 0
}
]
]
},
"Load Queued Videos from Notion": {
"main": [
[
{
"node": "Split Scenes and Validate",
"type": "main",
"index": 0
}
]
]
},
"Split Scenes and Validate": {
"main": [
[
{
"node": "Validate Scene Counts",
"type": "main",
"index": 0
}
]
]
},
"Validate Scene Counts": {
"main": [
[
{
"node": "Branch: Short vs Long",
"type": "main",
"index": 0
}
],
[
{
"node": "Update Notion - Error",
"type": "main",
"index": 0
}
]
]
},
"Branch: Short vs Long": {
"main": [
[
{
"node": "Generate Image with Gemini",
"type": "main",
"index": 0
},
{
"node": "Create Clip with CometAPI",
"type": "main",
"index": 0
},
{
"node": "Generate Voiceover with ElevenLabs",
"type": "main",
"index": 0
}
],
[
{
"node": "Generate Image with Gemini",
"type": "main",
"index": 0
},
{
"node": "Generate Voiceover with ElevenLabs",
"type": "main",
"index": 0
}
]
]
},
"Generate Image with Gemini": {
"main": [
[
{
"node": "Extract Gemini Image URL",
"type": "main",
"index": 0
}
]
]
},
"Extract Gemini Image URL": {
"main": [
[
{
"node": "Check if Image Needs Upload",
"type": "main",
"index": 0
}
]
]
},
"Check if Image Needs Upload": {
"main": [
[
{
"node": "Upload Image to Google Drive",
"type": "main",
"index": 0
}
],
[
{
"node": "Merge Image and Clip",
"type": "main",
"index": 0
}
]
]
},
"Upload Image to Google Drive": {
"main": [
[
{
"node": "Share Image on Drive",
"type": "main",
"index": 0
}
]
]
},
"Share Image on Drive": {
"main": [
[
{
"node": "Merge Image and Clip",
"type": "main",
"index": 0
}
]
]
},
"Create Clip with CometAPI": {
"main": [
[
{
"node": "Wait for CometAPI Processing",
"type": "main",
"index": 0
}
]
]
},
"Wait for CometAPI Processing": {
"main": [
[
{
"node": "Check CometAPI Clip Status",
"type": "main",
"index": 0
}
]
]
},
"Check CometAPI Clip Status": {
"main": [
[
{
"node": "Check if Clip Complete",
"type": "main",
"index": 0
}
]
]
},
"Check if Clip Complete": {
"main": [
[
{
"node": "Merge Image and Clip",
"type": "main",
"index": 1
}
],
[
{
"node": "Wait for CometAPI Processing",
"type": "main",
"index": 0
}
]
]
},
"Generate Voiceover with ElevenLabs": {
"main": [
[
{
"node": "Upload Voiceover to Drive",
"type": "main",
"index": 0
}
]
]
},
"Upload Voiceover to Drive": {
"main": [
[
{
"node": "Share Voiceover on Drive",
"type": "main",
"index": 0
}
]
]
},
"Share Voiceover on Drive": {
"main": [
[
{
"node": "Merge All Scene Assets",
"type": "main",
"index": 1
}
]
]
},
"Merge Image and Clip": {
"main": [
[
{
"node": "Merge All Scene Assets",
"type": "main",
"index": 0
}
]
]
},
"Merge All Scene Assets": {
"main": [
[
{
"node": "Prepare Scene Data",
"type": "main",
"index": 0
}
]
]
},
"Prepare Scene Data": {
"main": [
[
{
"node": "Group Scenes by Video",
"type": "main",
"index": 0
}
]
]
},
"Group Scenes by Video": {
"main": [
[
{
"node": "Create JSON2Video Render",
"type": "main",
"index": 0
}
]
]
},
"Create JSON2Video Render": {
"main": [
[
{
"node": "Wait for JSON2Video Render",
"type": "main",
"index": 0
}
]
]
},
"Wait for JSON2Video Render": {
"main": [
[
{
"node": "Check JSON2Video Status",
"type": "main",
"index": 0
}
]
]
},
"Check JSON2Video Status": {
"main": [
[
{
"node": "Check if Render Complete",
"type": "main",
"index": 0
}
]
]
},
"Check if Render Complete": {
"main": [
[
{
"node": "Download Final Video",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait for JSON2Video Render",
"type": "main",
"index": 0
}
]
]
},
"Download Final Video": {
"main": [
[
{
"node": "Upload Final Video to Drive",
"type": "main",
"index": 0
}
]
]
},
"Upload Final Video to Drive": {
"main": [
[
{
"node": "Share Final Video",
"type": "main",
"index": 0
}
]
]
},
"Share Final Video": {
"main": [
[
{
"node": "Write Video to Disk",
"type": "main",
"index": 0
}
]
]
},
"Write Video to Disk": {
"main": [
[
{
"node": "Extract Audio from Video",
"type": "main",
"index": 0
}
]
]
},
"Extract Audio from Video": {
"main": [
[
{
"node": "Generate Social Media Description",
"type": "main",
"index": 0
}
]
]
},
"Generate Social Media Description": {
"main": [
[
{
"node": "Read Video from Google Drive",
"type": "main",
"index": 0
}
]
]
},
"Read Video from Google Drive": {
"main": [
[
{
"node": "Publish to TikTok",
"type": "main",
"index": 0
},
{
"node": "Publish to Instagram",
"type": "main",
"index": 0
},
{
"node": "Publish to YouTube",
"type": "main",
"index": 0
},
{
"node": "Publish to Facebook",
"type": "main",
"index": 0
},
{
"node": "Publish to LinkedIn",
"type": "main",
"index": 0
}
]
]
},
"Publish to TikTok": {
"main": [
[
{
"node": "Collect Publishing Results",
"type": "main",
"index": 0
}
]
]
},
"Publish to Instagram": {
"main": [
[
{
"node": "Collect Publishing Results",
"type": "main",
"index": 0
}
]
]
},
"Publish to YouTube": {
"main": [
[
{
"node": "Collect Publishing Results",
"type": "main",
"index": 0
}
]
]
},
"Publish to Facebook": {
"main": [
[
{
"node": "Collect Publishing Results",
"type": "main",
"index": 0
}
]
]
},
"Publish to LinkedIn": {
"main": [
[
{
"node": "Collect Publishing Results",
"type": "main",
"index": 0
}
]
]
},
"Collect Publishing Results": {
"main": [
[
{
"node": "Update Notion - Success",
"type": "main",
"index": 0
}
]
]
},
"Update Notion - Success": {
"main": [
[
{
"node": "Notify Telegram - Success",
"type": "main",
"index": 0
}
]
]
},
"Update Notion - Error": {
"main": [
[
{
"node": "Notify Telegram - Error",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"versionId": "{{YOUR_NOTION_PAGE_ID}}",
"activeVersionId": null,
"versionCounter": 1,
"triggerCount": 0,
"shared": [
{
"updatedAt": "2025-11-03T14:43:18.540Z",
"createdAt": "2025-11-03T14:43:18.540Z",
"role": "workflow:owner",
"workflowId": "L9KsnRjS7XVzSoAW",
"projectId": "7NOiDJlVGtj6HHEb",
"project": {
"updatedAt": "2025-01-26T16:28:33.630Z",
"createdAt": "2025-01-26T11:37:02.698Z",
"id": "7NOiDJlVGtj6HHEb",
"name": "Rayan Ratego <rayanratego@gmail.com>",
"type": "personal",
"icon": null,
"description": null,
"creatorId": "{{YOUR_NOTION_PAGE_ID}}",
"projectRelations": [
{
"updatedAt": "2025-01-26T11:37:02.698Z",
"createdAt": "2025-01-26T11:37:02.698Z",
"userId": "{{YOUR_NOTION_PAGE_ID}}",
"projectId": "7NOiDJlVGtj6HHEb",
"user": {
"updatedAt": "2026-05-06T14:08:54.748Z",
"createdAt": "2025-01-26T11:36:47.660Z",
"id": "{{YOUR_NOTION_PAGE_ID}}",
"email": "rayanratego@gmail.com",
"firstName": "Rayan",
"lastName": "Ratego",
"personalizationAnswers": {
"version": "v4",
"personalization_survey_submitted_at": "2025-01-26T16:29:57.338Z",
"personalization_survey_n8n_version": "1.75.2",
"companyIndustryExtended": [
"it-industry",
"healthcare",
"marketing-industry",
"media-industry"
],
"companySize": "<20",
"companyType": "other",
"role": "business-owner",
"reportedSource": "youtube"
},
"settings": {
"userActivated": true,
"easyAIWorkflowOnboarded": true,
"firstSuccessfulWorkflowId": "qyOU7EgejsL50BFL",
"userActivatedAt": 1757343922037,
"npsSurvey": {
"responded": true,
"lastShownAt": 1771221135008
}
},
"disabled": false,
"mfaEnabled": false,
"lastActiveAt": "2026-05-06",
"isPending": false
}
}
]
}
}
],
"tags": [],
"activeVersion": null
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleDriveOAuth2ApinotionApiopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
YouTube Automation Pipeline - Notion + Gemini + CometAPI + JSON2Video. Uses notion, httpRequest, googleDrive, writeBinaryFile. Scheduled trigger; 43 nodes.
Source: https://gist.github.com/Iaminfitite/1e5a83832c6cb0b441c10f6bcf395272 — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This comprehensive n8n automation template orchestrates a complete end-to-end workflow for generating engaging short-form Point-of-View (POV) style videos using multiple AI services and automatically
Virtual-Weather-Caster-Workflow. Uses httpRequest, googleDrive, openAi, gmail. Scheduled trigger; 20 nodes.
What it is An automated LinkedIn content system that takes a simple form (idea + optional file), generates LinkedIn posts with OpenAI, stores them in Notion, builds Google Slides carousels, and auto-p
Daily trigger scans your Notion database for unpublished blog ideas AI generates complete blog posts + engaging LinkedIn content using OpenAI (Blog Posting is not implemented yet) Creates custom image
This workflow is an AI-powered lighting and look development pipeline designed for VFX production. It transforms a single lighting brief into multiple high-quality cinematic lighting references using