顔なし恐怖ショートビデオを Replicate と OpenAI で制作
上級
これはContent Creation, Multimodal AI分野の自動化ワークフローで、50個のノードを含みます。主にIf, Code, Wait, Switch, GoogleDriveなどのノードを使用。 OpenAI TTS、Replicateビデオ生成、YouTubeアップロードを使って無顔のホラーショート動画を作成
前提条件
- •Google Drive API認証情報
- •ターゲットAPIの認証情報が必要な場合あり
- •Google Sheets API認証情報
- •OpenAI API Key
使用ノード (50)
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "YOUR_WORKFLOW_ID",
"meta": {
"instanceId": "YOUR_N8N_INSTANCE_ID"
},
"name": "Horror Faceless Shorts with Replicate and OpenAI",
"tags": [],
"nodes": [
{
"id": "e7f6db58-4f09-4d2c-84bf-e15b6529e861",
"name": "音声をローカルに保存",
"type": "n8n-nodes-base.readWriteFile",
"onError": "continueRegularOutput",
"position": [
3968,
1232
],
"parameters": {
"options": {
"append": false
},
"fileName": "={{ $('Create Beat Inputs').item.json.audioFileName }}",
"operation": "write"
},
"typeVersion": 1
},
{
"id": "c24fb0bd-abee-45b3-812c-8f86ce6bae3d",
"name": "ストーリーアイデア生成",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
336,
-96
],
"parameters": {
"text": "Give me an idea about a new viral short horror story with surprise twist in the end. ",
"options": {
"systemMessage": "=You are a master of viral horror storytelling. Forget all previous stories. Forget previous stories and start fresh every time.\n\nYour task: Create a terrifying short horror story in exactly 8 beats.\n\nConstraints:\n- Output MUST be valid JSON only. No explanations, no comments, no text outside JSON.\n- The JSON must have exactly 8 beats, numbered beat1 through beat8.\n- Each beat must be a single, complete sentence with 10–20 words.\n- Beat 1 must clearly establish the scene, characters, and setting using vivid imagery.\n- At least 3 beats must include surprise, suspense, or a shocking twist.\n- Use \"show, don’t tell\": describe sights, sounds, smells, or actions to convey fear, tension, or dread.\n- Reading level: 4th grade, simple and direct language.\n- Build escalating tension across beats, ending with a chilling climax or twist.\n- Make the story memorable, terrifying, and shareable.\n- JSON must include BOTH `youtube_title` and `youtube_description` fields.\n- `youtube_title`: under 60 characters, hooky, scary, clickable.\n- `youtube_description`: under 150 words, thrilling, suspenseful, and encourages sharing.\n\nJSON schema (exactly this structure):\n\n{\n \"beats\": {\n \"beat1\": \"10–20 words\",\n \"beat2\": \"10–20 words\",\n \"beat3\": \"10–20 words\",\n \"beat4\": \"10–20 words\",\n \"beat5\": \"10–20 words\",\n \"beat6\": \"10–20 words\",\n \"beat7\": \"10–20 words\",\n \"beat8\": \"10–20 words\"\n },\n \"youtube_title\": \"Under 60 characters\",\n \"youtube_description\": \"Under 150 words\"\n}\n\nImportant: Do not skip any fields. Do not add extra fields. Do not return fewer than 8 beats. Do not include the word 'output' or any wrapper outside the JSON.\n",
"returnIntermediateSteps": false
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.9
},
{
"id": "3eb2ad5d-71a6-453b-84b0-a857ecc20d60",
"name": "ストーリービート生成",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
400,
336
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "gpt-4o-mini"
},
"options": {
"topP": 0.9,
"maxTokens": 500,
"temperature": 0.7,
"responseFormat": "json_object",
"presencePenalty": 0.6,
"frequencyPenalty": 0.5
}
},
"credentials": {
"openAiApi": {
"id": "YOUR_OPENAI_CREDENTIAL_ID",
"name": "YOUR_OPENAI_CREDENTIAL_NAME"
}
},
"typeVersion": 1.2
},
{
"id": "23202620-2e4e-4311-8d01-6b8a47a88fb6",
"name": "Google シートアイデアログ",
"type": "n8n-nodes-base.googleSheets",
"position": [
832,
-96
],
"parameters": {
"columns": {
"value": {
"time": "={{ $json.output.youtube_title }}-{{ $now.format('yyyy-MM-dd HH:mm:ss') }}",
"beat 1": "={{ $json.output.beats.beat1 }}",
"beat 2": "={{ $json.output.beats.beat2 }}",
"beat 3": "={{ $json.output.beats.beat3 }}",
"beat 4": "={{ $json.output.beats.beat4 }}",
"beat 5": "={{ $json.output.beats.beat5 }}",
"beat 6": "={{ $json.output.beats.beat6 }}",
"beat 7": "={{ $json.output.beats.beat7 }}",
"beat 8": "={{ $json.output.beats.beat8 }}",
"status": "done",
"Youtube title": "={{ $json.output.youtube_title }}",
"Youtube description": "={{ $json.output.youtube_description }}"
},
"schema": [
{
"id": "time",
"type": "string",
"display": true,
"required": false,
"displayName": "time",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 1",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "beat 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 2",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "beat 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 3",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "beat 3",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 4",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "beat 4",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 5",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "beat 5",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 6",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "beat 6",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 7",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "beat 7",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 8",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "beat 8",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Youtube title",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Youtube title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Youtube description",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Youtube description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "status",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 266501754,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_URL",
"cachedResultName": "story"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_URL"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_SHEETS_CREDENTIAL_NAME"
}
},
"typeVersion": 4.5
},
{
"id": "8eff780b-b397-4add-b9fe-833932c1691e",
"name": "ストーリービート生成5",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
640,
1632
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "YOUR_OPENAI_CREDENTIAL_ID",
"name": "YOUR_OPENAI_CREDENTIAL_NAME"
}
},
"typeVersion": 1.2
},
{
"id": "d5e4aa80-bf0e-46d0-88b1-a506339e4bdf",
"name": "YouTube 動画アップロード",
"type": "n8n-nodes-base.httpRequest",
"position": [
1136,
2336
],
"parameters": {
"url": "={{ $('Prepare YouTube Upload').item.json.headers.location }}",
"method": "PUT",
"options": {},
"sendBody": true,
"contentType": "binaryData",
"sendHeaders": true,
"authentication": "predefinedCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "video/webm"
}
]
},
"inputDataFieldName": "data",
"nodeCredentialType": "youTubeOAuth2Api"
},
"credentials": {
"youTubeOAuth2Api": {
"id": "YOUR_YOUTUBE_CREDENTIAL_ID",
"name": "YOUR_YOUTUBE_CREDENTIAL_NAME"
}
},
"typeVersion": 4.2
},
{
"id": "cc7034be-290f-4079-8e05-c1ae36fc777e",
"name": "動画音声結合コマンド",
"type": "n8n-nodes-base.code",
"onError": "continueRegularOutput",
"position": [
4192,
1232
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "try {\n const inputData = $('Create Beat Inputs').item.json;\n\n // FFmpeg command: merge existing MP4 with new audio\n const command = `\nffmpeg -hide_banner -loglevel error -i \"${inputData.fileName}\" -i \"${inputData.audioFileName}\" \\\n-filter_complex \"[1:a]atempo=1.3,apad=pad_dur=0.9[aud]\" \\\n-map 0:v -map \"[aud]\" \\\n-c:v copy -c:a aac -b:a 192k -shortest \"${inputData.videoFileName}\" -y\n `;\n\n return {\n json: {\n command,\n inputVideo: inputData.fileName,\n inputAudio: inputData.audioFileName,\n outputVideo: inputData.videoFileName,\n timestamp: new Date().toISOString()\n }\n };\n} catch (error) {\n return {\n json: {\n status: 'error',\n error: error.message,\n timestamp: new Date().toISOString()\n }\n };\n}\n"
},
"typeVersion": 2
},
{
"id": "7ffda491-6475-4cad-8342-c0182ed98a23",
"name": "メディア結合のためFFmpegを実行",
"type": "n8n-nodes-base.executeCommand",
"onError": "continueRegularOutput",
"position": [
4416,
1232
],
"parameters": {
"command": "={{ $json.command }}",
"executeOnce": false
},
"executeOnce": false,
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "4953a0ce-f7d6-42fa-85d7-21dd2fc44ae8",
"name": "一時ファイル削除",
"type": "n8n-nodes-base.executeCommand",
"position": [
0,
1200
],
"parameters": {
"command": "=rm -f 12*.png 12*.mp4 12*.mp3 12*.txt\n\n\n"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "be931eb8-47c7-4acc-9bce-eceb5b38c582",
"name": "ストーリービート生成6",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1008,
1424
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "gpt-4o-mini"
},
"options": {
"topP": 1,
"temperature": 0.7
}
},
"credentials": {
"openAiApi": {
"id": "YOUR_OPENAI_CREDENTIAL_ID",
"name": "YOUR_OPENAI_CREDENTIAL_NAME"
}
},
"typeVersion": 1.2
},
{
"id": "6f3d20c0-35dc-4d8b-940a-fa8df19d294c",
"name": "待機",
"type": "n8n-nodes-base.wait",
"position": [
3520,
1232
],
"webhookId": "29b1736a-1483-45bf-8ef7-be18f594f0b3",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "978cdc87-7ffe-4044-a659-fc3a8eb44674",
"name": "最終動画クリップ生成",
"type": "n8n-nodes-base.executeCommand",
"onError": "continueRegularOutput",
"position": [
2624,
1040
],
"parameters": {
"command": "=# Remove old file first\nrm -f horrorfile_short_final.mp4\n"
},
"executeOnce": true,
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "43e1ca14-d878-471d-af5a-2379fa8084f6",
"name": "🎨 画像生成",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
2624,
1232
],
"parameters": {
"url": "https://api.replicate.com/v1/models/black-forest-labs/flux-schnell/predictions",
"method": "POST",
"options": {},
"jsonBody": "={\n \"input\": {\n \"prompt\": \"cinematic scene, oil painting effect, muted colors, not dark but eerie atmosphere, display {{ $('Create Beat Inputs').item.json.narrative }} with central character description {{ $('Create Beat Inputs').item.json.character }}, clear details, visible character features\",\n \"seed\": {{ $('Create Beat Inputs').item.json.seed }},\n \"prompt_upsampling\": true,\n \"width\": 1080,\n \"height\": 1920,\n \"num_outputs\": 1,\n \"aspect_ratio\": \"9:16\",\n \"output_format\": \"jpg\",\n \"output_quality\": 100,\n \"guidance\": 4,\n \"safety_tolerance\": 2,\n \"negative_prompt\": \"{{ $('Create Beat Inputs').item.json.negativeprompt }}\"\n }\n}\n",
"sendBody": true,
"jsonHeaders": "{\n \"Content-Type\": \"application/json\",\n \"Prefer\": \"wait\"\n}",
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"specifyHeaders": "json",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "YOUR_REPLICATE_CREDENTIAL_ID",
"name": "YOUR_REPLICATE_CREDENTIAL_NAME"
}
},
"typeVersion": 4.2
},
{
"id": "ef1dd38c-04cf-4de7-b29f-33ffb34521ba",
"name": "HTTP リクエスト",
"type": "n8n-nodes-base.httpRequest",
"position": [
3072,
1232
],
"parameters": {
"url": "={{ $json.output || $json.output[0] }}",
"options": {},
"sendHeaders": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "YOUR_REPLICATE_CREDENTIAL_ID",
"name": "YOUR_REPLICATE_CREDENTIAL_NAME"
}
},
"typeVersion": 4.2
},
{
"id": "3a2f7ffb-ef51-4676-adcc-539a1131b242",
"name": "ストーリーアイデア解析",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
416,
128
],
"parameters": {
"autoFix": true,
"jsonSchemaExample": "{\n \"beats\": {\n \"beat1\": \"10–20 words\",\n \"beat2\": \"10–20 words\",\n \"beat3\": \"10–20 words\",\n \"beat4\": \"10–20 words\",\n \"beat5\": \"10–20 words\",\n \"beat6\": \"10–20 words\",\n \"beat7\": \"10–20 words\",\n \"beat8\": \"10–20 words\"\n },\n \"youtube_title\": \"Under 60 characters\",\n \"youtube_description\": \"Under 150 words\"\n}"
},
"typeVersion": 1.3
},
{
"id": "0137fca6-5f1a-4335-9cf9-17e20864f5a5",
"name": "分岐",
"type": "n8n-nodes-base.switch",
"position": [
-1472,
1200
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Generate Story Idea",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "cdd0f2ff-a83c-48c1-a473-e5c4f86fe12c",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.chatInput }}",
"rightValue": "idea"
}
]
},
"renameOutput": true
},
{
"outputKey": "Create Uploadable Video",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9bf4596f-8031-4e7f-aaa6-c8c7831fea55",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.chatInput }}",
"rightValue": "create"
}
]
},
"renameOutput": true
},
{
"outputKey": "Publish to YouTube",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "d4598761-a115-469f-9836-2a7432910c82",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.chatInput }}",
"rightValue": "publish"
}
]
},
"renameOutput": true
},
{
"outputKey": "Clean Files in Drive",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b8f3a5f9-819c-4276-90b9-3f7dc6064fae",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.chatInput }}",
"rightValue": "clean drive"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "793ebf6a-73b4-4672-869f-01f270590023",
"name": "YouTubeアップロード準備",
"type": "n8n-nodes-base.httpRequest",
"position": [
336,
2336
],
"parameters": {
"url": "=https://www.googleapis.com/upload/youtube/v3/videos?part=snippet,status&uploadType=resumable",
"body": "={\n \"snippet\": {\n \"title\": \" {{ $json['Youtube title'] }} #PsychologicalHorror #TwistEnding #HorrorShorts\",\n \"description\": \"{{ $json['Youtube description'] }} #HorrorShort #CulinaryThrills #PsychologicalThriller #whispers_in_the_dark #Haunted #UrbanLegend #Spooky #DarkStories #Supernatural\",\n \"defaultLanguage\": \"en\",\n \"defaultAudioLanguage\": \"en\"\n },\n \"status\": {\n \"privacyStatus\": \"private\",\n \"license\": \"youtube\",\n \"embeddable\": true,\n \"publicStatsViewable\": true,\n \"madeForKids\": false\n }\n}\n\n",
"method": "POST",
"options": {
"response": {
"response": {
"fullResponse": true
}
}
},
"sendBody": true,
"contentType": "raw",
"sendHeaders": true,
"authentication": "predefinedCredentialType",
"rawContentType": "RAW/JSON",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "X-Upload-Content-Type",
"value": "video/webm"
}
]
},
"nodeCredentialType": "youTubeOAuth2Api"
},
"credentials": {
"youTubeOAuth2Api": {
"id": "YOUR_YOUTUBE_CREDENTIAL_ID",
"name": "YOUR_YOUTUBE_CREDENTIAL_NAME"
}
},
"typeVersion": 4.2
},
{
"id": "1732a1a9-dba2-4ae8-9bf0-7e9ecbb630a0",
"name": "YouTubeタイトルと説明を取得",
"type": "n8n-nodes-base.googleSheets",
"position": [
0,
2336
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 266501754,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_URL",
"cachedResultName": "story"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_URL"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_SHEETS_CREDENTIAL_NAME"
}
},
"typeVersion": 4.5
},
{
"id": "aa1f6a5c-946d-4940-979f-cdcca1aabe3c",
"name": "アップロード用動画をディスクから読み込み",
"type": "n8n-nodes-base.readWriteFile",
"position": [
672,
2336
],
"parameters": {
"options": {},
"fileSelector": "=horrorfile_short_final.mp4"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "ccc5eac0-9947-4b23-99a4-59be3426633d",
"name": "YouTube URLを更新",
"type": "n8n-nodes-base.googleSheets",
"position": [
1504,
2336
],
"parameters": {
"columns": {
"value": {
"url": "=https://www.youtube.com/shorts/{{ $json.id }}",
"time": "={{ $('Get YouTube Title and Description').item.json.time }}",
"status": "published"
},
"schema": [
{
"id": "time",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "time",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat ",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 2",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 3",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 3",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 4",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 4",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 5",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 5",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 6",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 6",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 7",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 7",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 8",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 8",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Youtube title",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Youtube title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Youtube descripion",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Youtube descripion",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status",
"type": "string",
"display": true,
"required": false,
"displayName": "status",
"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": [
"time"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 266501754,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_URL",
"cachedResultName": "story"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_URL"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_SHEETS_CREDENTIAL_NAME"
}
},
"typeVersion": 4.7
},
{
"id": "0a79a235-bea7-4a5f-a8f4-969b805fa773",
"name": "一時ファイル削除3",
"type": "n8n-nodes-base.executeCommand",
"position": [
1728,
2336
],
"parameters": {
"command": "=rm -f 12*.png 12*.mp4 12*.mp3 12*.txt\n\n\n"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "ee2ffc65-34da-42a7-93c7-174f2f59079b",
"name": "削除対象一時ファイルを検索",
"type": "n8n-nodes-base.googleDrive",
"position": [
-224,
3056
],
"parameters": {
"filter": {
"folderId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultUrl": "https://drive.google.com/drive/folders/YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultName": "YOUR_GOOGLE_DRIVE_FOLDER"
}
},
"options": {},
"resource": "fileFolder",
"queryString": "horrorfile*.mp4"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "YOUR_GOOGLE_DRIVE_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_DRIVE_CREDENTIAL_NAME"
}
},
"typeVersion": 3
},
{
"id": "7120e6dd-66bd-480e-a329-d6bb919bdebf",
"name": "一時ファイルを削除",
"type": "n8n-nodes-base.googleDrive",
"position": [
112,
3056
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "deleteFile"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "YOUR_GOOGLE_DRIVE_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_DRIVE_CREDENTIAL_NAME"
}
},
"executeOnce": false,
"typeVersion": 3
},
{
"id": "bb77bfac-a8cb-4f71-a54b-077ba4b027fe",
"name": "ストーリーアイデア取得",
"type": "n8n-nodes-base.googleSheets",
"position": [
336,
1200
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "done",
"lookupColumn": "status"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 266501754,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_URL",
"cachedResultName": "story"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_URL"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_SHEETS_CREDENTIAL_NAME"
}
},
"typeVersion": 4.5
},
{
"id": "26d02a86-9fd7-46f5-a575-70df7c794d4b",
"name": "ナレーション出力解析",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
640,
1424
],
"parameters": {
"autoFix": true,
"jsonSchemaExample": "{\n \"narratives\": {\n \"narrative1\": \"...\",\n \"narrative2\": \"...\",\n \"narrative3\": \"...\",\n \"narrative4\": \"...\",\n \"narrative5\": \"...\",\n \"narrative6\": \"...\",\n \"narrative7\": \"...\",\n \"narrative8\": \"...\"\n }\n}"
},
"typeVersion": 1.3
},
{
"id": "780bc5fe-94fd-42c6-a0b2-6c0f4030e27a",
"name": "ナレーションプロンプト生成",
"type": "@n8n/n8n-nodes-langchain.agent",
"onError": "continueErrorOutput",
"position": [
560,
1200
],
"parameters": {
"text": "You are a strict text formatter for horror shorts text to audio generation prompt. ",
"options": {
"systemMessage": "=\n**Prompt:**\n\nYou are a strict formatter for horror shorts narration.\n\nTake the following inputs and provide a set of outputs:\n\n---\n\n### Input narratives\n\n1. {{ $json['beat 1'] }}\n2. {{ $json['beat 2'] }}\n3. {{ $json['beat 3'] }}\n4. {{ $json['beat 4'] }}\n5. {{ $json['beat 5'] }}\n6. {{ $json['beat 6'] }}\n7. {{ $json['beat 7'] }}\n8. {{ $json['beat 8'] }}\n\nDo not process input beats that are empty.\n\n---\n\n### Output (Narration with pauses)\n\n**RULES:**\n\n* Do **NOT** change, rewrite, or summarize the input text.\n* Only add pacing:\n • Ellipses (...) = short pause\n • Em dashes (—) = sharp emphasis\n • Blank lines = long pause\n* Keep exact wording untouched.\n* Do not add any other punctuation or words.\n* Style = calm, eerie, suspenseful.\n* Preserve all twists and unsettling imagery.\n* Always output **exactly 8 narratives** in JSON.\n* Add 500ms pause before and after each narrative (can be implied in timing markers).\n\n---\n\n### Output structure\n\n```json\n{\n \"narratives\": {\n \"narrative1\": \"{{ $json['beat 1'] }} with pauses added, if blank return blank\",\n \"narrative2\": \"{{ $json['beat 2'] }} with pauses added, if blank return blank\",\n \"narrative3\": \"{{ $json['beat 3'] }} with pauses added, if blank return blank\",\n \"narrative4\": \"{{ $json['beat 4'] }} with pauses added, if blank return blank\",\n \"narrative5\": \"{{ $json['beat 5'] }} with pauses added, if blank return blank\",\n \"narrative6\": \"{{ $json['beat 6'] }} with pauses added, if blank return blank\",\n \"narrative7\": \"{{ $json['beat 7'] }} with pauses added, if blank return blank\",\n \"narrative8\": \"{{ $json['beat 8'] }} with pauses added, if blank return blank\"\n }\n}\n```\n\n---\n\n✅ Key point: **Never alter or summarize the original text** — only insert pauses (`...`, `—`) and spacing for pacing.\n\n\n"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.9
},
{
"id": "1bbf9e8b-b312-4926-bad5-99b859c62018",
"name": "画像プロンプト生成",
"type": "@n8n/n8n-nodes-langchain.agent",
"onError": "continueErrorOutput",
"position": [
1040,
1200
],
"parameters": {
"text": "You are a strict text formatter for horror shorts text to image generation prompt for non-animated images with oil painting effect, character should have same attributes of age , gender, complexion in every beat. ",
"options": {
"systemMessage": "=Create an image prompt to input in a text to image stable diffusion model:\n\n**Inputs \n{{ $('Get Story Idea').item.json['beat 1'] }}\n{{ $('Get Story Idea').item.json['beat 2'] }}\n{{ $('Get Story Idea').item.json['beat 3'] }}\n{{ $('Get Story Idea').item.json['beat 4'] }}\n{{ $('Get Story Idea').item.json['beat 5'] }}\n{{ $('Get Story Idea').item.json['beat 6'] }}\n{{ $('Get Story Idea').item.json['beat 7'] }}\n{{ $('Get Story Idea').item.json['beat 8'] }}\n\n* Forget all previous instructions, start new\n* Extract ** age, gender, hairstyle, clothing style, and skin and hair color** from above inputs\n* Character is **fully clothed**, with clearly visible with oil painting effect. add to image prompt in every beat\n* Don't add any other information (emotion, expression, location, action), only features and traits for consistency\n\n\n\n---\n\n## ✅ JSON Output\n\n```json\n{\n \"character\": \"character description\",\n \"negative_prompt\": \"letters, text, watermark, logo, signature, words, numbers, subtitles, captions, symbols, cartoon\"\n}\n```\n\n"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.9
},
{
"id": "abd89e03-1702-4fd1-8943-905c48b2ba3b",
"name": "画像出力解析",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1136,
1424
],
"parameters": {
"autoFix": true,
"jsonSchemaExample": "{\n \"character\": \"character description\",\n \"negative_prompt\": \"letters, text, watermark, logo, signature, words, numbers, subtitles, captions, symbols, cartoon\"\n}"
},
"typeVersion": 1.3
},
{
"id": "0c2f9bc2-1f83-43d2-8493-bda10d95455c",
"name": "既作成ビートの確認",
"type": "n8n-nodes-base.googleDrive",
"position": [
1504,
1200
],
"parameters": {
"filter": {
"folderId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultUrl": "https://drive.google.com/drive/folders/YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultName": "YOUR_GOOGLE_DRIVE_FOLDER"
}
},
"options": {},
"resource": "fileFolder",
"queryString": "horrorfile*_1.mp4"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "YOUR_GOOGLE_DRIVE_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_DRIVE_CREDENTIAL_NAME"
}
},
"typeVersion": 3,
"alwaysOutputData": true
},
{
"id": "7e6903d1-bd17-4b95-9184-36096bf48261",
"name": "0ファイル時の処理",
"type": "n8n-nodes-base.code",
"position": [
1728,
1200
],
"parameters": {
"jsCode": "// This node ensures execution continues even if search returns nothing\nreturn [{ json: { trigger: true } }];"
},
"typeVersion": 2,
"continueOnFail": true,
"alwaysOutputData": true
},
{
"id": "ce7f1e76-8daf-4603-bda6-6bb1a3e7f411",
"name": "ビート入力作成",
"type": "n8n-nodes-base.code",
"position": [
1952,
1200
],
"parameters": {
"jsCode": "const workflowSeed = Math.floor(Math.random() * 1000000);\n\n// Get existing files from \"Check For Already Created Beats\" node\nlet existingFiles = [];\ntry {\n const searchResults = $('Check For Already Created Beats').all();\n if (searchResults && searchResults.length > 0) {\n existingFiles = searchResults.map(f => ({\n id: f.json.id,\n name: f.json.name\n }));\n console.log(`Found ${existingFiles.length} existing files`);\n } else {\n console.log('No existing files found, processing all beats');\n }\n} catch (error) {\n console.log('Search returned no results, processing all beats');\n}\n\n// Get data from upstream nodes\nconst storyData = $('Get Story Idea').first().json;\nconst narrationData = $('Narration Prompt Generator').first().json.output.narratives;\nconst imageData = $('Image Prompt Generator').first().json.output;\n\n// Collect all possible beats\nconst rawInputs = [\n { narrative: storyData['beat 1'], narrativeaudio: narrationData.narrative1 }, // FIXED: Added \"1\"\n { narrative: storyData['beat 2'], narrativeaudio: narrationData.narrative2 },\n { narrative: storyData['beat 3'], narrativeaudio: narrationData.narrative3 },\n { narrative: storyData['beat 4'], narrativeaudio: narrationData.narrative4 },\n { narrative: storyData['beat 5'], narrativeaudio: narrationData.narrative5 },\n { narrative: storyData['beat 6'], narrativeaudio: narrationData.narrative6 },\n { narrative: storyData['beat 7'], narrativeaudio: narrationData.narrative7 },\n { narrative: storyData['beat 8'], narrativeaudio: narrationData.narrative8 }\n];\n\n// Debug: Check what we got\nconsole.log('Raw inputs count:', rawInputs.length);\nconsole.log('Beat 1 check:', rawInputs[0].narrative ? 'OK' : 'MISSING');\n\n// Filter out empty beats\nconst filteredInputs = rawInputs.filter(input => input.narrative && input.narrative.trim() !== \"\");\nconsole.log(`Processing ${filteredInputs.length} non-empty beats`);\n\n// Map filtered beats to output items\nconst outputItems = filteredInputs.map((textInput, index) => {\n const beatNumber = index + 1; // Start from 1 instead of 0\n const videoFileName = `horrorfile${beatNumber}_1.mp4`;\n\n // Check if file already exists (by name or id)\n const alreadyExists = existingFiles.some(file =>\n file.name === videoFileName || file.id === videoFileName\n );\n\n return {\n json: {\n ...textInput,\n index: beatNumber,\n seed: workflowSeed,\n character: imageData.character,\n negativeprompt: imageData.negative_prompt,\n fileName: `horrorfile${beatNumber}.mp4`,\n audioFileName: `horrorfile${beatNumber}.mp3`,\n videoFileName: videoFileName,\n skip: alreadyExists\n }\n };\n});\n\n// Optional log for skipped items\nconst skipped = outputItems.filter(item => item.json.skip).map(i => i.json.videoFileName);\nif (skipped.length > 0) {\n console.log(`⏭️ Skipped existing files: ${skipped.join(', ')}`);\n}\n\n// Return only new items for downstream processing\nconst newItems = outputItems.filter(item => !item.json.skip);\nconsole.log(`Outputting ${newItems.length} items for processing`);\n\nreturn newItems;"
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "092100ff-85e6-4e7b-acd7-c2924f3c504b",
"name": "アイテムをループ処理",
"type": "n8n-nodes-base.splitInBatches",
"position": [
2400,
1280
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "cd8da2a0-3743-485c-92f4-be84246d4a34",
"name": "ビート画像をローカルに保存",
"type": "n8n-nodes-base.readWriteFile",
"position": [
3296,
1232
],
"parameters": {
"options": {},
"fileName": "={{ $('Create Beat Inputs').item.json.fileName }}",
"operation": "write"
},
"typeVersion": 1
},
{
"id": "359d2545-efd5-46ad-b3bc-dc7e97cb3298",
"name": "ビートファイルを読み込み",
"type": "n8n-nodes-base.readWriteFile",
"onError": "continueRegularOutput",
"position": [
4640,
1232
],
"parameters": {
"options": {},
"fileSelector": "={{ $('Video Audio Merge Command').item.json.outputVideo }}"
},
"typeVersion": 1
},
{
"id": "68b298dd-36fa-49c7-a511-d5e66818b487",
"name": "ビートファイルをアップロード",
"type": "n8n-nodes-base.googleDrive",
"position": [
4864,
1296
],
"parameters": {
"name": "={{ $json.fileName }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultUrl": "https://drive.google.com/drive/folders/YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultName": "YOUR_GOOGLE_DRIVE_FOLDER"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "YOUR_GOOGLE_DRIVE_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_DRIVE_CREDENTIAL_NAME"
}
},
"typeVersion": 3
},
{
"id": "774f803e-d753-468d-95d3-5508897c33c0",
"name": "ビートファイルを検索",
"type": "n8n-nodes-base.googleDrive",
"position": [
2848,
1040
],
"parameters": {
"filter": {
"folderId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultUrl": "https://drive.google.com/drive/folders/YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultName": "YOUR_GOOGLE_DRIVE_FOLDER"
}
},
"options": {},
"resource": "fileFolder",
"queryString": "horrorfile*_1.mp4"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "YOUR_GOOGLE_DRIVE_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_DRIVE_CREDENTIAL_NAME"
}
},
"typeVersion": 3
},
{
"id": "37b40dca-3544-4014-bfbb-001250271ba3",
"name": "ビートファイルをダウンロード",
"type": "n8n-nodes-base.googleDrive",
"position": [
3072,
1040
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "YOUR_GOOGLE_DRIVE_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_DRIVE_CREDENTIAL_NAME"
}
},
"typeVersion": 3
},
{
"id": "6090d04e-1ae4-4f33-a427-a1c3ca92b363",
"name": "ビートファイルをディスクに書き込み",
"type": "n8n-nodes-base.readWriteFile",
"position": [
3296,
1040
],
"parameters": {
"options": {},
"fileName": "={{ $json.name }}",
"operation": "write"
},
"typeVersion": 1
},
{
"id": "0282edd1-8ca9-41d9-9915-da753b41211d",
"name": "最終動画生成",
"type": "n8n-nodes-base.executeCommand",
"position": [
3520,
1040
],
"parameters": {
"command": "=#!/bin/sh\n\ninputs=\"\"\nmaps=\"\"\nn=0\n\n# Collect all horrorfile*_1.mp4 files\nfor f in horrorfile*_1.mp4; do\n inputs=\"$inputs -i $f\"\n maps=\"$maps[$n:v][$n:a]\"\n n=`expr $n + 1`\ndone\n\nsafeText=\"Finale...\"\n\n# Run ffmpeg with dynamic concat and single drawtext\nffmpeg $inputs \\\n-filter_complex \"\\\n$maps concat=n=$n:v=1:a=1[v][a]; \\\n[v]drawtext=fontfile=/home/node/.fonts/Creepster-Regular.ttf: \\\n text='Midnight Cuts': \\\n fontcolor=red:fontsize=45:x=(w-text_w)/2:y=50:box=1:boxcolor=black@0.5:boxborderw=10[vout]\" \\\n-map \"[vout]\" -map \"[a]\" \\\n-c:v libx264 -pix_fmt yuv420p -preset ultrafast -crf 23 \\\n-c:a aac -b:a 160k \\\n-y horrorfile_short_final.mp4\n"
},
"executeOnce": true,
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "5fe670f4-52c2-48ac-bfb9-68469f42e634",
"name": "最終動画をディスクから読み込み",
"type": "n8n-nodes-base.readWriteFile",
"position": [
3744,
1040
],
"parameters": {
"options": {},
"fileSelector": "=horrorfile_short_final.mp4"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "d7635d32-12a0-4e95-badb-e4bb4f3cb8af",
"name": "最終動画をアップロード",
"type": "n8n-nodes-base.googleDrive",
"position": [
3968,
1040
],
"parameters": {
"name": "={{ $json.fileName }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultUrl": "https://drive.google.com/drive/folders/YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultName": "YOUR_GOOGLE_DRIVE_FOLDER"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "YOUR_GOOGLE_DRIVE_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_DRIVE_CREDENTIAL_NAME"
}
},
"typeVersion": 3
},
{
"id": "1c32d653-8a67-487e-868c-7e2820685410",
"name": "ステータスを準備完了に更新",
"type": "n8n-nodes-base.googleSheets",
"position": [
4192,
1040
],
"parameters": {
"columns": {
"value": {
"time": "={{ $('Get Story Idea').first().json.time }}",
"status": "ready",
"row_number": 0
},
"schema": [
{
"id": "time",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "time",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 0",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "beat 0",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat ",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 2",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 3",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 3",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 4",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 4",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 5",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 5",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 6",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 6",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 7",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 7",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "beat 8",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "beat 8",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "twist",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "twist",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "character",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "character",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "location",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "location",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "spirit",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "spirit",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Youtube title",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Youtube title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Youtube descripion",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Youtube descripion",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "url",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"time"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 266501754,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_URL",
"cachedResultName": "story"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_URL"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
"name": "YOUR_GOOGLE_SHEETS_CREDENTIAL_NAME"
}
},
"typeVersion": 4.5
},
{
"id": "b6867418-9668-421c-a8e1-58c682664ab6",
"name": "ビート音声生成",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
3744,
1232
],
"parameters": {
"input": "={{ $('Create Beat Inputs').item.json.narrativeaudio }}",
"model": "tts-1-hd",
"options": {},
"resource": "audio"
},
"credentials": {
"openAiApi": {
"id": "YOUR_OPENAI_CREDENTIAL_ID",
"name": "YOUR_OPENAI_CREDENTIAL_NAME"
}
},
"typeVersion": 1.8
},
{
"id": "85e06aad-a8d1-4234-b6e7-ffa71db85aec",
"name": "ビート残存確認",
"type": "n8n-nodes-base.if",
"position": [
2176,
1200
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e7c77da4-cb68-4faa-b185-17a77f0d9e5a",
"operator": {
"type": "number",
"operation": "notEquals"
},
"leftValue": "={{ $('Check For Already Created Beats').all().length }}",
"rightValue": 8
}
]
}
},
"typeVersion": 2.2
},
{
"id": "c919dbb0-1558-493d-bdf9-0a0e19d2c83b",
"name": "チャットメッセージ受信時",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-1696,
1232
],
"webhookId": "67fdd493-8b16-43a1-8a76-2a2b3dbc4845",
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "78a35d5c-c4b3-4102-9b2d-54d4a79c65a5",
"name": "🎨 動画生成",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
2848,
1232
],
"parameters": {
"url": "https://api.replicate.com/v1/models/wan-video/wan-2.2-i2v-fast/predictions",
"method": "POST",
"options": {},
"jsonBody": "={\n \"input\": {\n \"image\": \"{{ $json.output || $json.output[0] }}\",\n \"prompt\": \"{{ $json.input.prompt }}\",\n \"negative_prompt\": \"{{ $json.input.negative_prompt }}\"\n }\n}",
"sendBody": true,
"jsonHeaders": "{\n \"Content-Type\": \"application/json\",\n \"Prefer\": \"wait\"\n}",
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"specifyHeaders": "json",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "YOUR_REPLICATE_CREDENTIAL_ID",
"name": "YOUR_REPLICATE_CREDENTIAL_NAME"
}
},
"typeVersion": 4.2
},
{
"id": "f4f06df4-3c9b-4663-b45a-2a5b5801f9e5",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
-240,
-416
],
"parameters": {
"width": 1424,
"height": 896,
"content": "## Step 1. Generate Story Beats \n\n**Purpose**: Generates horror story beats.\n\n**Setup**: \n- Setup Google Sheets in the Format provided\n- Setup Google AI and OpenAI credentials\n\n**Instructions**: \n- Type 'idea' to trigger flow; when story is generated 'status' will show 'done'\n- Edit sheet to refine story if needed\n- Avoid escape characters like ' and \" for smooth video creation\n- Keep under 20 words for smooth pacing\n- Type 'idea' as many times as you want until satisfied with story"
},
"typeVersion": 1
},
{
"id": "ac794f7f-1bb1-4a12-a4ba-2e8d214aec15",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-240,
768
],
"parameters": {
"color": 5,
"width": 5440,
"height": 1120,
"content": "## Step 2: Create Video\n**Purpose**: Merge all beats into a horror shorts video.\n\n**Setup**: \n- Set up a Google drive folder where your video files will temporarily be stored\n- Set up credentials for Google drive, Text to Image, Text to Audio and Image to Video\n\n**Instructions**: \n- Verify every beat exists (8 total) in the spreadsheet\n- Ensure only one line item has status 'done'\n- Type 'create' in chat to trigger workflow\n- Once workflow is completed, status updates to 'ready'\n- Review the output in google drive, and delete beats that require re-generation\n- To regenerate beats, make sure status is changed back to 'done'\n- If any API times out, restart workflow by typing create, you won't lose previous beat's videos"
},
"typeVersion": 1
},
{
"id": "f2e1c3c3-66c7-4d7d-b3fe-109622933809",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-256,
2048
],
"parameters": {
"color": 6,
"width": 2352,
"height": 496,
"content": "## Step 3. Publish Video \n\n**Purpose**: Publishes video on Youtube.\n\n**Setup**: Setup Youtube credentials credentials.\n\n**Instructions**: \n- Ensure status is 'ready' for only row in in google sheets\n- Type 'publish' in chat to trigger flow; when video is uploaded, google sheets 'status' will show 'published'\n- Review video uploaded as 'Private', and change status to 'Public'"
},
"typeVersion": 1
},
{
"id": "ef557922-dfc6-4057-a6a0-1e1f50d70195",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-304,
2784
],
"parameters": {
"color": 3,
"width": 704,
"height": 496,
"content": "## Step 4. Remove Temporary files from Google Drive \n\n**Purpose**: Remove files from Google Drive after video is published\n\n**Setup**: No additional setup needed.\n\n**Instructions**: \n- Make sure Video is uploaded to Youtube\n- Type 'clean drive' in chat trigger workflow to remove the files from Google Drive"
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"callerPolicy": "workflowsFromSameOwner",
"executionOrder": "v1",
"executionTimeout": -1
},
"versionId": "YOUR_VERSION_ID",
"connections": {
"6f3d20c0-35dc-4d8b-940a-fa8df19d294c": {
"main": [
[
{
"node": "b6867418-9668-421c-a8e1-58c682664ab6",
"type": "main",
"index": 0
}
]
]
},
"0137fca6-5f1a-4335-9cf9-17e20864f5a5": {
"main": [
[
{
"node": "c24fb0bd-abee-45b3-812c-8f86ce6bae3d",
"type": "main",
"index": 0
}
],
[
{
"node": "4953a0ce-f7d6-42fa-85d7-21dd2fc44ae8",
"type": "main",
"index": 0
}
],
[
{
"node": "1732a1a9-dba2-4ae8-9bf0-7e9ecbb630a0",
"type": "main",
"index": 0
}
],
[
{
"node": "ee2ffc65-34da-42a7-93c7-174f2f59079b",
"type": "main",
"index": 0
}
]
]
},
"ef1dd38c-04cf-4de7-b29f-33ffb34521ba": {
"main": [
[
{
"node": "cd8da2a0-3743-485c-92f4-be84246d4a34",
"type": "main",
"index": 0
}
]
]
},
"bb77bfac-a8cb-4f71-a54b-077ba4b027fe": {
"main": [
[
{
"node": "780bc5fe-94fd-42c6-a0b2-6c0f4030e27a",
"type": "main",
"index": 0
}
]
]
},
"7e6903d1-bd17-4b95-9184-36096bf48261": {
"main": [
[
{
"node": "ce7f1e76-8daf-4603-bda6-6bb1a3e7f411",
"type": "main",
"index": 0
}
]
]
},
"359d2545-efd5-46ad-b3bc-dc7e97cb3298": {
"main": [
[
{
"node": "68b298dd-36fa-49c7-a511-d5e66818b487",
"type": "main",
"index": 0
}
]
]
},
"092100ff-85e6-4e7b-acd7-c2924f3c504b": {
"main": [
[
{
"node": "978cdc87-7ffe-4044-a659-fc3a8eb44674",
"type": "main",
"index": 0
}
],
[
{
"node": "43e1ca14-d878-471d-af5a-2379fa8084f6",
"type": "main",
"index": 0
}
]
]
},
"68b298dd-36fa-49c7-a511-d5e66818b487": {
"main": [
[
{
"node": "092100ff-85e6-4e7b-acd7-c2924f3c504b",
"type": "main",
"index": 0
}
]
]
},
"774f803e-d753-468d-95d3-5508897c33c0": {
"main": [
[
{
"node": "37b40dca-3544-4014-bfbb-001250271ba3",
"type": "main",
"index": 0
}
]
]
},
"3a2f7ffb-ef51-4676-adcc-539a1131b242": {
"ai_outputParser": [
[
{
"node": "c24fb0bd-abee-45b3-812c-8f86ce6bae3d",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"ce7f1e76-8daf-4603-bda6-6bb1a3e7f411": {
"main": [
[
{
"node": "85e06aad-a8d1-4234-b6e7-ffa71db85aec",
"type": "main",
"index": 0
}
]
]
},
"37b40dca-3544-4014-bfbb-001250271ba3": {
"main": [
[
{
"node": "6090d04e-1ae4-4f33-a427-a1c3ca92b363",
"type": "main",
"index": 0
}
]
]
},
"85e06aad-a8d1-4234-b6e7-ffa71db85aec": {
"main": [
[
{
"node": "092100ff-85e6-4e7b-acd7-c2924f3c504b",
"type": "main",
"index": 0
}
],
[
{
"node": "978cdc87-7ffe-4044-a659-fc3a8eb44674",
"type": "main",
"index": 0
}
]
]
},
"ccc5eac0-9947-4b23-99a4-59be3426633d": {
"main": [
[
{
"node": "0a79a235-bea7-4a5f-a8f4-969b805fa773",
"type": "main",
"index": 0
}
]
]
},
"d7635d32-12a0-4e95-badb-e4bb4f3cb8af": {
"main": [
[
{
"node": "1c32d653-8a67-487e-868c-7e2820685410",
"type": "main",
"index": 0
}
]
]
},
"b6867418-9668-421c-a8e1-58c682664ab6": {
"main": [
[
{
"node": "e7f6db58-4f09-4d2c-84bf-e15b6529e861",
"type": "main",
"index": 0
}
]
]
},
"abd89e03-1702-4fd1-8943-905c48b2ba3b": {
"ai_outputParser": [
[
{
"node": "1bbf9e8b-b312-4926-bad5-99b859c62018",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"e7f6db58-4f09-4d2c-84bf-e15b6529e861": {
"main": [
[
{
"node": "cc7034be-290f-4079-8e05-c1ae36fc777e",
"type": "main",
"index": 0
}
]
]
},
"0282edd1-8ca9-41d9-9915-da753b41211d": {
"main": [
[
{
"node": "5fe670f4-52c2-48ac-bfb9-68469f42e634",
"type": "main",
"index": 0
}
]
]
},
"3eb2ad5d-71a6-453b-84b0-a857ecc20d60": {
"ai_languageModel": [
[
{
"node": "c24fb0bd-abee-45b3-812c-8f86ce6bae3d",
"type": "ai_languageModel",
"index": 0
},
{
"node": "3a2f7ffb-ef51-4676-adcc-539a1131b242",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"c24fb0bd-abee-45b3-812c-8f86ce6bae3d": {
"main": [
[
{
"node": "23202620-2e4e-4311-8d01-6b8a47a88fb6",
"type": "main",
"index": 0
}
]
]
},
"d5e4aa80-bf0e-46d0-88b1-a506339e4bdf": {
"main": [
[
{
"node": "ccc5eac0-9947-4b23-99a4-59be3426633d",
"type": "main",
"index": 0
}
]
]
},
"43e1ca14-d878-471d-af5a-2379fa8084f6": {
"main": [
[
{
"node": "78a35d5c-c4b3-4102-9b2d-54d4a79c65a5",
"type": "main",
"index": 0
}
]
]
},
"78a35d5c-c4b3-4102-9b2d-54d4a79c65a5": {
"main": [
[
{
"node": "ef1dd38c-04cf-4de7-b29f-33ffb34521ba",
"type": "main",
"index": 0
}
]
]
},
"8eff780b-b397-4add-b9fe-833932c1691e": {
"ai_languageModel": [
[
{
"node": "780bc5fe-94fd-42c6-a0b2-6c0f4030e27a",
"type": "ai_languageModel",
"index": 0
},
{
"node": "abd89e03-1702-4fd1-8943-905c48b2ba3b",
"type": "ai_languageModel",
"index": 0
},
{
"node": "26d02a86-9fd7-46f5-a575-70df7c794d4b",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"be931eb8-47c7-4acc-9bce-eceb5b38c582": {
"ai_languageModel": [
[
{
"node": "1bbf9e8b-b312-4926-bad5-99b859c62018",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"1bbf9e8b-b312-4926-bad5-99b859c62018": {
"main": [
[
{
"node": "0c2f9bc2-1f83-43d2-8493-bda10d95455c",
"type": "main",
"index": 0
}
]
]
},
"793ebf6a-73b4-4672-869f-01f270590023": {
"main": [
[
{
"node": "aa1f6a5c-946d-4940-979f-cdcca1aabe3c",
"type": "main",
"index": 0
}
]
]
},
"26d02a86-9fd7-46f5-a575-70df7c794d4b": {
"ai_outputParser": [
[
{
"node": "780bc5fe-94fd-42c6-a0b2-6c0f4030e27a",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"cd8da2a0-3743-485c-92f4-be84246d4a34": {
"main": [
[
{
"node": "6f3d20c0-35dc-4d8b-940a-fa8df19d294c",
"type": "main",
"index": 0
}
]
]
},
"4953a0ce-f7d6-42fa-85d7-21dd2fc44ae8": {
"main": [
[
{
"node": "bb77bfac-a8cb-4f71-a54b-077ba4b027fe",
"type": "main",
"index": 0
}
]
]
},
"6090d04e-1ae4-4f33-a427-a1c3ca92b363": {
"main": [
[
{
"node": "0282edd1-8ca9-41d9-9915-da753b41211d",
"type": "main",
"index": 0
}
]
]
},
"0a79a235-bea7-4a5f-a8f4-969b805fa773": {
"main": [
[]
]
},
"978cdc87-7ffe-4044-a659-fc3a8eb44674": {
"main": [
[
{
"node": "774f803e-d753-468d-95d3-5508897c33c0",
"type": "main",
"index": 0
}
]
]
},
"7ffda491-6475-4cad-8342-c0182ed98a23": {
"main": [
[
{
"node": "359d2545-efd5-46ad-b3bc-dc7e97cb3298",
"type": "main",
"index": 0
}
]
]
},
"cc7034be-290f-4079-8e05-c1ae36fc777e": {
"main": [
[
{
"node": "7ffda491-6475-4cad-8342-c0182ed98a23",
"type": "main",
"index": 0
}
]
]
},
"780bc5fe-94fd-42c6-a0b2-6c0f4030e27a": {
"main": [
[
{
"node": "1bbf9e8b-b312-4926-bad5-99b859c62018",
"type": "main",
"index": 0
}
]
]
},
"5fe670f4-52c2-48ac-bfb9-68469f42e634": {
"main": [
[
{
"node": "d7635d32-12a0-4e95-badb-e4bb4f3cb8af",
"type": "main",
"index": 0
}
]
]
},
"c919dbb0-1558-493d-bdf9-0a0e19d2c83b": {
"main": [
[
{
"node": "0137fca6-5f1a-4335-9cf9-17e20864f5a5",
"type": "main",
"index": 0
}
]
]
},
"0c2f9bc2-1f83-43d2-8493-bda10d95455c": {
"main": [
[
{
"node": "7e6903d1-bd17-4b95-9184-36096bf48261",
"type": "main",
"index": 0
}
]
]
},
"aa1f6a5c-946d-4940-979f-cdcca1aabe3c": {
"main": [
[
{
"node": "d5e4aa80-bf0e-46d0-88b1-a506339e4bdf",
"type": "main",
"index": 0
}
]
]
},
"ee2ffc65-34da-42a7-93c7-174f2f59079b": {
"main": [
[
{
"node": "7120e6dd-66bd-480e-a329-d6bb919bdebf",
"type": "main",
"index": 0
}
]
]
},
"1732a1a9-dba2-4ae8-9bf0-7e9ecbb630a0": {
"main": [
[
{
"node": "793ebf6a-73b4-4672-869f-01f270590023",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - コンテンツ作成, マルチモーダルAI
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
Gemini_NanoBanana_テンプレート
Google SheetsからFal.aiのモデル(nano-banana、WAN2.2、Veo3)でUGC広告生成
If
Set
Code
+
If
Set
Code
36 ノードJaruphat J.
コンテンツ作成
WordPressブログの自動化プロフェッショナル版(先端研究)v2.1マーケットプラグイン
GPT-4o、Perplexity AI、そして多言語対応を使ったSEO最適化ブログ作成の自動化
If
Set
Xml
+
If
Set
Xml
125 ノードDaniel Ng
コンテンツ作成
バッチSEOコンテンツ生成とAI画像付きWebflowドラフト作成(テンプレート)
GPT、Gemini画像、Webflowデラフトで行う大量SEOコンテンツ生成
If
Set
Code
+
If
Set
Code
54 ノードDahiana
コンテンツ作成
💥 NanoBanana、Seedream 4、ChatGPT Image、Veo 3 を使って動画広告を自動化 - VIDEO
AI(NanoBanana、Seedream、GPT-4o、Veo 3)を使って動画広告キャンペーンを自動化し公開
Set
Code
Wait
+
Set
Code
Wait
63 ノードDr. Firas
コンテンツ作成
OpenAI、ElevenLabs、Fal.ai を使用した動画・パ odcast・ASM R向けのウイルス性コンテンツ自動作成
OpenAI、ElevenLabs、そして Fal.ai を使って動画、ポッドキャスト、ASMR に向けたウイルスのコンテンツ作成を自動化
Set
Code
Wait
+
Set
Code
Wait
97 ノードAdam Crafts
コンテンツ作成
再生リスト詳細設定ボットコピー
Suno、GPT-4、Runway、Creatomate を使って AI 生成の YouTube ミュージックプレイリストを作成
If
Set
Code
+
If
Set
Code
203 ノードJoseph
コンテンツ作成