This workflow corresponds to n8n.io template #9843 β we link there as the canonical source.
This workflow follows the Agent β Chat Trigger 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 β
{
"id": "l0DWacMq9HsRdfZK",
"name": "My workflow 9_old",
"tags": [],
"nodes": [
{
"id": "db899b52-e3ef-4902-aef7-d00d768604fa",
"name": "Sheet Row Added",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-2368,
240
],
"parameters": {
"event": "rowAdded",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1x-2u3o5ZTbF9LkdJ0r9U0wQXdTX5nk2VTRexECb-qcU"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "e0d4bd28-2dc5-4a21-b032-f9662aaf9224",
"name": "Chat Input",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-1888,
432
],
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "6298a14e-cf94-44b7-89cd-7ee04261fe68",
"name": "Normalize Input",
"type": "n8n-nodes-base.set",
"position": [
-1696,
320
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "prompt_id",
"name": "Prompt",
"type": "string",
"value": "={{ $json.Prompt || $json.chatInput }}"
},
{
"id": "source_id",
"name": "source",
"type": "string",
"value": "={{ $json.Prompt ? 'sheet' : 'chat' }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e3ff7b59-a0d7-4d3b-98dc-2508c79d4c21",
"name": "Generate Video Parameters",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1472,
320
],
"parameters": {
"text": "=You will receive ONE free-text prompt from a Google Sheet:\n\nRAW_PROMPT: \"{{$json.Prompt}}\"\n\nGoal: Produce ONLY a valid JSON body for MagicHour Text-to-Video (no prose, no backticks). Infer missing details from context and common sense.\n\nDefaults (if not stated or implied):\n- end_seconds: 5\n- orientation: \"landscape\" (use \"portrait\" if RAW_PROMPT implies vertical / mobile, e.g., \"vertical\", \"reel\", \"tiktok\", \"portrait\"; use \"square\" if it says \"square\")\n- resolution: \"720p\" (use \"720p\" if RAW_PROMPT mentions HD; use \"1080p\" if it mentions Full HD / 1080)\n- fps: 24\n- guidance_scale: 7.5\n- model: \"magichour-v1\"\n- music: false\n- seed: omit unless explicitly given\n- negative_prompt: omit unless clearly implied (e.g., \"no blur\", \"avoid text\")\n\nInterpretation rules:\n- Clean grammar; turn shorthand into a clear cinematic description.\n- Expand vague phrases into specific, natural language visuals (subject, action, setting, lighting, mood).\n- Respect indirect hints: \n - \"handheld\", \"POV\", \"selfie\" \u2192 informal, closer framing.\n - \"cinematic\", \"film look\", \"bokeh\", \"depth of field\" \u2192 add cinematic phrasing.\n - Time of day words (sunset/night/morning) \u2192 include lighting.\n - Platform hints (\"vertical\", \"reel\", \"story\") \u2192 orientation \"portrait\".\n- Never add brands, gore, or unsafe/NSFW content.\n\nOutput schema (ONLY these keys):\n{\n \"name\": string, // short job name based on the prompt\n \"end_seconds\": integer, // 1\u2013120\n \"orientation\": \"landscape\"|\"portrait\"|\"square\",\n \"resolution\": \"480p\"|\"720p\"|\"1080p\",\n \"fps\": integer, // 12\u201360\n \"guidance_scale\": number, // 0\u201320\n \"model\": string,\n \"music\": boolean,\n \"style\": {\n \"prompt\": string, // enriched, camera-ready description\n \"negative_prompt\": string // OPTIONAL; omit if none\n },\n \"webhook_url\": string // OPTIONAL; omit if unknown\n}\n\nNaming rule:\n- name = first 5\u20138 meaningful words of the enriched prompt, lower case.\n\nReturn ONLY the JSON object.",
"options": {
"systemMessage": "You are an assistant inside an n8n workflow. Your job is to read a single Google Sheet row and produce a STRICT JSON object that matches the Text-to-Video request body for the MagicHour API.\n\nRules:\n- Output ONLY JSON (no prose, no backticks).\n- Validate and normalize user inputs. Apply sensible defaults when values are missing or invalid.\n- Do not invent fields that are not in the schema below.\n- Trim whitespace; coalesce empty strings to null; remove keys whose value becomes null unless required.\n\nReturn EXACTLY one JSON object conforming to the schema provided in the Structured Output Parser."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "e1ab9b74-77e1-495c-b17d-1c165f6edd02",
"name": "Video Params Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-1312,
544
],
"parameters": {
"jsonSchemaExample": "{\n \"name\": \"video clip\",\n \"end_seconds\": 5,\n \"orientation\": \"landscape\",\n \"resolution\": \"720p\",\n \"fps\": 24,\n \"guidance_scale\": 7.5,\n \"model\": \"magichour-v1\",\n \"music\": false,\n \"style\": {\n \"prompt\": \"cinematic description\"\n }\n}"
},
"typeVersion": 1.3
},
{
"id": "3fa0edce-0495-4cd6-b684-d71b02db889d",
"name": "Create Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1120,
320
],
"parameters": {
"url": "https://api.magichour.ai/v1/text-to-video",
"method": "POST",
"options": {},
"jsonBody": "={{ $json.output }}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"typeVersion": 4.2,
"continueOnFail": true
},
{
"id": "52246df7-31a1-4b16-a64b-e7aa83505dda",
"name": "Initialize Retry Counter",
"type": "n8n-nodes-base.set",
"position": [
-896,
320
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "video_id",
"name": "video_id",
"type": "string",
"value": "={{ $json.id }}"
},
{
"id": "retry_count",
"name": "retry_count",
"type": "number",
"value": "=0"
},
{
"id": "max_retries",
"name": "max_retries",
"type": "number",
"value": "=20"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "0d180549-7797-4676-a536-e71b9e23d44e",
"name": "Check Video Status",
"type": "n8n-nodes-base.httpRequest",
"position": [
-672,
320
],
"parameters": {
"url": "=https://api.magichour.ai/v1/video-projects/{{ $json.video_id }}",
"options": {
"timeout": 10000
},
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.2,
"continueOnFail": true
},
{
"id": "ca6c413d-e2a4-4ff9-a49c-164e4a204d15",
"name": "Video Complete?",
"type": "n8n-nodes-base.if",
"position": [
-448,
304
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6b723249-19f5-4d67-b2b2-8cff4d2f3b44",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "complete"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "526d14c8-8a6f-495e-b90d-885652ffce9b",
"name": "Wait & Retry",
"type": "n8n-nodes-base.wait",
"position": [
-224,
496
],
"parameters": {
"amount": 30
},
"typeVersion": 1.1
},
{
"id": "b2732e93-2aa5-4631-bcf3-a02b685cd962",
"name": "Download Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
-224,
160
],
"parameters": {
"url": "={{ $json.downloads[0].url }}",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"typeVersion": 4.2,
"continueOnFail": true
},
{
"id": "6660692e-54a6-4b75-9faf-59bfeedd0070",
"name": "Prepare Metadata",
"type": "n8n-nodes-base.set",
"position": [
0,
304
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "original_prompt",
"name": "original_prompt",
"type": "string",
"value": "={{ $('Normalize Input').item.json.Prompt }}"
},
{
"id": "video_description",
"name": "video_description",
"type": "string",
"value": "={{ $('Generate Video Parameters').item.json.output.style.prompt }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "8f92cd49-26a2-4f05-a24e-54c03bd1c019",
"name": "Generate YouTube Data",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
224,
304
],
"parameters": {
"text": "=Generate YouTube metadata for this video:\n\n**Original Prompt:** {{ $json.original_prompt }}\n**Video Description:** {{ $json.video_description }}\n\nCreate an engaging YouTube title (max 100 chars), detailed description (include keywords naturally), and relevant tags (comma-separated).\n\nReturn ONLY a JSON object with this exact structure:\n{\n \"youtube_title\": \"Your title here\",\n \"youtube_description\": \"Your description here\",\n \"youtube_tags\": \"tag1, tag2, tag3, tag4, tag5\"\n}",
"options": {
"systemMessage": "You are a YouTube SEO expert. Generate optimized metadata for videos. Always return ONLY valid JSON without any additional text or formatting."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "0eeffa8c-9896-42b9-a402-18d07d1de200",
"name": "YouTube JSON Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
368,
528
],
"parameters": {
"jsonSchemaExample": "{\n \"youtube_title\": \"Amazing Video Title\",\n \"youtube_description\": \"Detailed description...\",\n \"youtube_tags\": \"tag1, tag2, tag3\"\n}"
},
"typeVersion": 1.3
},
{
"id": "9ddabdd7-c757-4271-9990-e9edf69d8b83",
"name": "Prepare Sheet Update",
"type": "n8n-nodes-base.set",
"position": [
1248,
160
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "youtube_url",
"name": "Youtube URL",
"type": "string",
"value": "=https://www.youtube.com/watch?v={{ $json.uploadId }}"
},
{
"id": "upload_status",
"name": "upload_status",
"type": "string",
"value": "complete"
},
{
"id": "video_title",
"name": "Youtube Title",
"type": "string",
"value": "={{ $('Generate YouTube Data').item.json.output.youtube_title }}"
},
{
"id": "uploaded_at",
"name": "uploaded_at",
"type": "string",
"value": "={{ new Date().toISOString() }}"
},
{
"id": "ae7a42b3-7066-44ef-aa84-510c8f261756",
"name": "Youtube Tags",
"type": "string",
"value": "={{ $('Generate YouTube Data').item.json.output.youtube_tags }}"
},
{
"id": "e64805ec-aa6a-4672-b64e-e346cb254048",
"name": "Youtube Description",
"type": "string",
"value": "={{ $('Generate YouTube Data').item.json.output.youtube_description }}"
},
{
"id": "63b49ec9-999d-4bdf-bcd0-15e989849314",
"name": "Download URL",
"type": "string",
"value": "={{ $('Check Video Status').item.json.downloads[0].url }}"
},
{
"id": "54ca1aba-85ec-496e-8468-7745f1d5994c",
"name": "Prompt",
"type": "string",
"value": "={{ $('Normalize Input').item.json.Prompt }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "f02805ee-fc64-4ea9-ab20-27c765c24fef",
"name": "Update Results",
"type": "n8n-nodes-base.googleSheets",
"position": [
1472,
160
],
"parameters": {
"columns": {
"value": {
"Prompt": "={{ $json.Prompt }}",
"Youtube URL": "={{ $json['Youtube URL'] }}",
"Download URL": "={{ $json['Download URL'] }}",
"Youtube Tags": "={{ $json['Youtube Tags'] }}",
"Youtube Title": "={{ $json['Youtube Title'] }}",
"Youtube Description": "={{ $json['Youtube Description'] }}"
},
"schema": [
{
"id": "Prompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Download URL",
"type": "string",
"display": true,
"required": false,
"displayName": "Download URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Youtube Title",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Youtube Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Youtube Tags",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Youtube Tags",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Youtube Description",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Youtube Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Youtube URL",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Youtube URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Prompt"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0"
},
"documentId": {
"__rl": true,
"value": "1x-2u3o5ZTbF9LkdJ0r9U0wQXdTX5nk2VTRexECb-qcU"
}
},
"typeVersion": 4.7
},
{
"id": "42be420e-d832-4e24-a4c8-048d10991d6c",
"name": "Gemini AI Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
240,
528
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "abb1a3f1-4f7c-4d0e-9636-43fc09703208",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
-1472,
544
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "36aca885-9df1-45e0-b729-95c319acaa0f",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
592,
160
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineAll"
},
"typeVersion": 3.2
},
{
"id": "324140f6-6443-4734-b9ea-fdee1b3f5b9d",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
0,
560
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "dcc88ab6-4c5e-4b2b-b92f-bde26c5fcd00",
"name": "video_id",
"type": "string",
"value": "={{ $('Initialize Retry Counter').item.json.video_id }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "2d74bb48-2c46-4af6-8e6c-071db4ddd660",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
-2144,
240
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "d850f36e-8dc0-475d-a8bc-87f7b61bbba8",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json[\"Download URL\"] }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "abbb3edf-0de7-4264-9766-c3088be7270a",
"name": "Limit",
"type": "n8n-nodes-base.limit",
"position": [
-1920,
224
],
"parameters": {},
"typeVersion": 1
},
{
"id": "92e396db-e6bb-4277-b8a3-a9470df8f77a",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
800,
160
],
"parameters": {
"amount": 20
},
"typeVersion": 1.1
},
{
"id": "775fd4f0-074e-4780-b133-be549e6cf36f",
"name": "Upload a video",
"type": "n8n-nodes-base.youTube",
"position": [
1024,
160
],
"parameters": {
"title": "={{ $json.output.youtube_title }}",
"options": {
"tags": "={{ $json.output.youtube_tags }}",
"description": "={{ $json.output.youtube_description }}",
"privacyStatus": "public"
},
"resource": "video",
"operation": "upload",
"categoryId": "17",
"regionCode": "IN"
},
"typeVersion": 1
},
{
"id": "97029081-9c96-4050-a4c1-6d474b349a03",
"name": "MixAudio audio",
"type": "n8n-nodes-mediafx.mediaFX",
"position": [
288,
0
],
"parameters": {
"resource": "audio",
"operation": "mixAudio",
"mixAudioSourceUrl": "https://freepd.com/music/Adventure.mp3",
"mixVideoSourceUrl": "={{ $json.videoUrl }}"
},
"typeVersion": 1
},
{
"id": "0723650f-fe54-47ed-9bac-7521cd061fa4",
"name": "Code in JavaScript",
"type": "n8n-nodes-base.code",
"position": [
0,
0
],
"parameters": {
"jsCode": "// Get binary video data\nconst binaryData = $input.first().binary?.data;\n\nif (!binaryData) {\n throw new Error(\"No binary data found\");\n}\n\n// Create data URL\nconst base64Video = binaryData.data;\nconst mimeType = binaryData.mimeType || 'video/mp4';\nconst dataUrl = `data:${mimeType};base64,${base64Video}`;\n\nreturn {\n json: {\n videoUrl: dataUrl\n }\n};\n"
},
"typeVersion": 2
},
{
"id": "0f8f6cd3-920c-4c8c-8638-c927dfedd7c2",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2496,
368
],
"parameters": {
"width": 352,
"height": 544,
"content": "Google Sheet Should have Youtube URL, Youtube Title, Youtube Tags, Youtube Description, Download URL, and matches by the original Prompt value to update the correct row.\n\nFor Shorts, the user only needs to mention it in the prompt (e.g., \u201cmake a shorts of \u2026\u201d). The AI in this workflow automatically handles orientation, duration, and metadata tagging so that the video is uploaded as a YouTube Short.\n\nYou should add your own spreadsheet you can watch video online to add your own spreadsheet\nor\nGo to Google Cloud Console \u2192 create/select a project.\nEnable APIs: Google Sheets API and Google Drive API.\nConfigure OAuth consent screen (External/Internal as needed).\nCreate OAuth client credentials (Web application). Add Authorized redirect URI: https://<your-n8n-domain>/rest/oauth2-credential/callback\nIn n8n \u2192 Credentials \u2192 Google Sheets OAuth2: connect your Google account and grant scopes.\nUse this credential in: Sheet Row Added (trigger) and Update Results nodes.\n\n"
},
"typeVersion": 1
},
{
"id": "a785fb65-46db-45ed-a4f3-999efed0c8cf",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1568,
672
],
"parameters": {
"width": 288,
"height": 176,
"content": "Create a key in Google AI Studio (or set up Vertex AI + API key/service account).\nIn n8n \u2192 Credentials \u2192 Google PaLM/Gemini: paste your API key.\nSelect this credential in the Gemini model nodes used by the LangChain agents.\n"
},
"typeVersion": 1
},
{
"id": "58d63a90-befa-44ca-8649-b918943239fd",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1104,
496
],
"parameters": {
"width": 528,
"height": 272,
"content": "Sign up / log in to MagicHour and open the Developer/API dashboard.\nCreate an API key. Copy it safely (some dashboards display a secret only once).\nIn n8n \u2192 Credentials \u2192 New \u2192 HTTP Bearer YOUR_TOKEN_HERE: paste the token as the bearer value.\nAttach these credentials to both HTTP Request nodes (Create Video, Check Video Status).\nHeaders are handled by the credential; requests will send: Authorization: Bearer <your_token>\n"
},
"typeVersion": 1
},
{
"id": "cede0ba1-9b30-4467-9cde-9a54ebd6f8d3",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
912,
336
],
"parameters": {
"width": 320,
"height": 256,
"content": "In the same Google Cloud project, enable YouTube Data API v3.\nCreate OAuth client credentials (Web application) and use the same n8n redirect URI.\nIn n8n \u2192 Credentials \u2192 YouTube OAuth2: authorize with your Google account that has a YouTube channel.\nGrant necessary scopes for upload.\nIn the YouTube node, set regionCode, categoryId, privacyStatus, and map the metadata fields.\n"
},
"typeVersion": 1
},
{
"id": "38203cda-bb9a-44d5-b125-e5c009206c95",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
224,
-144
],
"parameters": {
"content": "this is free audio which can only work if you have n8n pro or host it on your PC \n\ncan change music as you like"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "51bed7a3-b2da-4764-937c-22dd7b024ace",
"connections": {
"If": {
"main": [
[
{
"node": "Limit",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Upload a video",
"type": "main",
"index": 0
}
]
]
},
"Limit": {
"main": [
[
{
"node": "Normalize Input",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Chat Input": {
"main": [
[
{
"node": "Normalize Input",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Check Video Status",
"type": "main",
"index": 0
}
]
]
},
"Create Video": {
"main": [
[
{
"node": "Initialize Retry Counter",
"type": "main",
"index": 0
}
]
]
},
"Wait & Retry": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Download Video": {
"main": [
[
{
"node": "Prepare Metadata",
"type": "main",
"index": 0
},
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
},
"MixAudio audio": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Upload a video": {
"main": [
[
{
"node": "Prepare Sheet Update",
"type": "main",
"index": 0
}
]
]
},
"Gemini AI Model": {
"ai_languageModel": [
[
{
"node": "Generate YouTube Data",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Normalize Input": {
"main": [
[
{
"node": "Generate Video Parameters",
"type": "main",
"index": 0
}
]
]
},
"Sheet Row Added": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Video Complete?": {
"main": [
[
{
"node": "Download Video",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait & Retry",
"type": "main",
"index": 0
}
]
]
},
"Prepare Metadata": {
"main": [
[
{
"node": "Generate YouTube Data",
"type": "main",
"index": 0
}
]
]
},
"Check Video Status": {
"main": [
[
{
"node": "Video Complete?",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript": {
"main": [
[
{
"node": "MixAudio audio",
"type": "main",
"index": 0
}
]
]
},
"Video Params Parser": {
"ai_outputParser": [
[
{
"node": "Generate Video Parameters",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"YouTube JSON Parser": {
"ai_outputParser": [
[
{
"node": "Generate YouTube Data",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Prepare Sheet Update": {
"main": [
[
{
"node": "Update Results",
"type": "main",
"index": 0
}
]
]
},
"Generate YouTube Data": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Generate Video Parameters",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Initialize Retry Counter": {
"main": [
[
{
"node": "Check Video Status",
"type": "main",
"index": 0
}
]
]
},
"Generate Video Parameters": {
"main": [
[
{
"node": "Create Video",
"type": "main",
"index": 0
}
]
]
}
}
}
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.
googleSheetsTriggerOAuth2ApihttpBearerAuth
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
πͺ Prompt To Video (MagicHour API) with Music & YouTube
Source: https://n8n.io/workflows/9843/ β 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 automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos β all triggered from a simple Telegram chat and managed via Google Sheets.
This n8n automation creates and publishes LinkedIn posts with AI-generated images automatically. It's a complete end-to-end solution that transforms simple post titles into engaging social media conte
This Shopify AI automation is an advanced n8n-powered workflow that transforms Shopify product collections into SEO-optimized blog articles with images, while maintaining full visibility and control t
This workflow is designed for marketers, content creators, agencies, and solo founders who want to publish longβform posts with visuals on autopilot using n8n and AI agents. β
LinkedIn URL β Scrape β Match β Screen β Decide, all automated