{
  "name": "Generate horror faceless shorts with OpenAI TTS, Replicate Video, and YouTube upload",
  "nodes": [
    {
      "id": "e7f6db58-4f09-4d2c-84bf-e15b6529e861",
      "name": "Save Speech Locally",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        3968,
        1232
      ]
    },
    {
      "id": "c24fb0bd-abee-45b3-812c-8f86ce6bae3d",
      "name": "Story Idea Generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        336,
        -96
      ]
    },
    {
      "id": "3eb2ad5d-71a6-453b-84b0-a857ecc20d60",
      "name": "Story Beat Generator",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        400,
        336
      ]
    },
    {
      "id": "23202620-2e4e-4311-8d01-6b8a47a88fb6",
      "name": "Google Sheet Idea Log",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        832,
        -96
      ]
    },
    {
      "id": "8eff780b-b397-4add-b9fe-833932c1691e",
      "name": "Story Beat Generator5",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        640,
        1632
      ]
    },
    {
      "id": "d5e4aa80-bf0e-46d0-88b1-a506339e4bdf",
      "name": "YouTube Video Upload",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1136,
        2336
      ]
    },
    {
      "id": "cc7034be-290f-4079-8e05-c1ae36fc777e",
      "name": "Video Audio Merge Command",
      "type": "n8n-nodes-base.code",
      "position": [
        4192,
        1232
      ]
    },
    {
      "id": "7ffda491-6475-4cad-8342-c0182ed98a23",
      "name": "Run FFmpeg to Merge Media",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        4416,
        1232
      ]
    },
    {
      "id": "4953a0ce-f7d6-42fa-85d7-21dd2fc44ae8",
      "name": "Temporary Files Cleanup",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        0,
        1200
      ]
    },
    {
      "id": "be931eb8-47c7-4acc-9bce-eceb5b38c582",
      "name": "Story Beat Generator6",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1008,
        1424
      ]
    },
    {
      "id": "6f3d20c0-35dc-4d8b-940a-fa8df19d294c",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        3520,
        1232
      ]
    },
    {
      "id": "978cdc87-7ffe-4044-a659-fc3a8eb44674",
      "name": "Generate Final Video Clip",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        2624,
        1040
      ]
    },
    {
      "id": "43e1ca14-d878-471d-af5a-2379fa8084f6",
      "name": "🎨 Image Generator",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2624,
        1232
      ]
    },
    {
      "id": "ef1dd38c-04cf-4de7-b29f-33ffb34521ba",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3072,
        1232
      ]
    },
    {
      "id": "3a2f7ffb-ef51-4676-adcc-539a1131b242",
      "name": "Story Idea Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        416,
        128
      ]
    },
    {
      "id": "0137fca6-5f1a-4335-9cf9-17e20864f5a5",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1472,
        1200
      ]
    },
    {
      "id": "793ebf6a-73b4-4672-869f-01f270590023",
      "name": "Prepare YouTube Upload",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        336,
        2336
      ]
    },
    {
      "id": "1732a1a9-dba2-4ae8-9bf0-7e9ecbb630a0",
      "name": "Get YouTube Title and Description",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        0,
        2336
      ]
    },
    {
      "id": "aa1f6a5c-946d-4940-979f-cdcca1aabe3c",
      "name": "Read Video for Upload from Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        672,
        2336
      ]
    },
    {
      "id": "ccc5eac0-9947-4b23-99a4-59be3426633d",
      "name": "Update YouTube Url",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1504,
        2336
      ]
    },
    {
      "id": "0a79a235-bea7-4a5f-a8f4-969b805fa773",
      "name": "Temporary Files Cleanup3",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        1728,
        2336
      ]
    },
    {
      "id": "ee2ffc65-34da-42a7-93c7-174f2f59079b",
      "name": "Search Temporary Files to Delete",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -224,
        3056
      ]
    },
    {
      "id": "7120e6dd-66bd-480e-a329-d6bb919bdebf",
      "name": "Delete Temporary Files",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        112,
        3056
      ]
    },
    {
      "id": "bb77bfac-a8cb-4f71-a54b-077ba4b027fe",
      "name": "Get Story Idea",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        336,
        1200
      ]
    },
    {
      "id": "26d02a86-9fd7-46f5-a575-70df7c794d4b",
      "name": "Narration Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        640,
        1424
      ]
    },
    {
      "id": "780bc5fe-94fd-42c6-a0b2-6c0f4030e27a",
      "name": "Narration Prompt Generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        560,
        1200
      ]
    },
    {
      "id": "1bbf9e8b-b312-4926-bad5-99b859c62018",
      "name": "Image Prompt Generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1040,
        1200
      ]
    },
    {
      "id": "abd89e03-1702-4fd1-8943-905c48b2ba3b",
      "name": "Image Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1136,
        1424
      ]
    },
    {
      "id": "0c2f9bc2-1f83-43d2-8493-bda10d95455c",
      "name": "Check For Already Created Beats",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1504,
        1200
      ]
    },
    {
      "id": "7e6903d1-bd17-4b95-9184-36096bf48261",
      "name": "Handle 0 Files",
      "type": "n8n-nodes-base.code",
      "position": [
        1728,
        1200
      ]
    },
    {
      "id": "ce7f1e76-8daf-4603-bda6-6bb1a3e7f411",
      "name": "Create Beat Inputs",
      "type": "n8n-nodes-base.code",
      "position": [
        1952,
        1200
      ]
    },
    {
      "id": "092100ff-85e6-4e7b-acd7-c2924f3c504b",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2400,
        1280
      ]
    },
    {
      "id": "cd8da2a0-3743-485c-92f4-be84246d4a34",
      "name": "Save Beat Image Locally",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        3296,
        1232
      ]
    },
    {
      "id": "359d2545-efd5-46ad-b3bc-dc7e97cb3298",
      "name": "Read Beat File",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        4640,
        1232
      ]
    },
    {
      "id": "68b298dd-36fa-49c7-a511-d5e66818b487",
      "name": "Upload Beat File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        4864,
        1296
      ]
    },
    {
      "id": "774f803e-d753-468d-95d3-5508897c33c0",
      "name": "Search Beat Files",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2848,
        1040
      ]
    },
    {
      "id": "37b40dca-3544-4014-bfbb-001250271ba3",
      "name": "Download Beat File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        3072,
        1040
      ]
    },
    {
      "id": "6090d04e-1ae4-4f33-a427-a1c3ca92b363",
      "name": "Write Beat File to Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        3296,
        1040
      ]
    },
    {
      "id": "0282edd1-8ca9-41d9-9915-da753b41211d",
      "name": "Generate Final Video",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        3520,
        1040
      ]
    },
    {
      "id": "5fe670f4-52c2-48ac-bfb9-68469f42e634",
      "name": "Read Final Video from Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        3744,
        1040
      ]
    },
    {
      "id": "d7635d32-12a0-4e95-badb-e4bb4f3cb8af",
      "name": "Upload Final Video",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        3968,
        1040
      ]
    },
    {
      "id": "1c32d653-8a67-487e-868c-7e2820685410",
      "name": "Update Status to Ready",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        4192,
        1040
      ]
    },
    {
      "id": "b6867418-9668-421c-a8e1-58c682664ab6",
      "name": "Generate Beat Audio",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3744,
        1232
      ]
    },
    {
      "id": "85e06aad-a8d1-4234-b6e7-ffa71db85aec",
      "name": "If Beats Remaining",
      "type": "n8n-nodes-base.if",
      "position": [
        2176,
        1200
      ]
    },
    {
      "id": "c919dbb0-1558-493d-bdf9-0a0e19d2c83b",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1696,
        1232
      ]
    },
    {
      "id": "78a35d5c-c4b3-4102-9b2d-54d4a79c65a5",
      "name": "🎨 Video Generator",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2848,
        1232
      ]
    },
    {
      "id": "f4f06df4-3c9b-4663-b45a-2a5b5801f9e5",
      "name": "Sticky Note",
      "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- Ty"
      }
    },
    {
      "id": "ac794f7f-1bb1-4a12-a4ba-2e8d214aec15",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        768
      ],
      "parameters": {
        "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 "
      }
    },
    {
      "id": "f2e1c3c3-66c7-4d7d-b3fe-109622933809",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        2048
      ],
      "parameters": {
        "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-"
      }
    },
    {
      "id": "ef557922-dfc6-4057-a6a0-1e1f50d70195",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        2784
      ],
      "parameters": {
        "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"
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Generate Beat Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Story Idea Generator",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Temporary Files Cleanup",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get YouTube Title and Description",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Search Temporary Files to Delete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Save Beat Image Locally",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Story Idea": {
      "main": [
        [
          {
            "node": "Narration Prompt Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Handle 0 Files": {
      "main": [
        [
          {
            "node": "Create Beat Inputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Beat File": {
      "main": [
        [
          {
            "node": "Upload Beat File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Generate Final Video Clip",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "🎨 Image Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Beat File": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Beat Files": {
      "main": [
        [
          {
            "node": "Download Beat File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Story Idea Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Story Idea Generator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Create Beat Inputs": {
      "main": [
        [
          {
            "node": "If Beats Remaining",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Beat File": {
      "main": [
        [
          {
            "node": "Write Beat File to Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Beats Remaining": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate Final Video Clip",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update YouTube Url": {
      "main": [
        [
          {
            "node": "Temporary Files Cleanup3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Final Video": {
      "main": [
        [
          {
            "node": "Update Status to Ready",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Beat Audio": {
      "main": [
        [
          {
            "node": "Save Speech Locally",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Image Prompt Generator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Save Speech Locally": {
      "main": [
        [
          {
            "node": "Video Audio Merge Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Final Video": {
      "main": [
        [
          {
            "node": "Read Final Video from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Story Beat Generator": {
      "ai_languageModel": [
        [
          {
            "node": "Story Idea Generator",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Story Idea Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Story Idea Generator": {
      "main": [
        [
          {
            "node": "Google Sheet Idea Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "YouTube Video Upload": {
      "main": [
        [
          {
            "node": "Update YouTube Url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🎨 Image Generator": {
      "main": [
        [
          {
            "node": "🎨 Video Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🎨 Video Generator": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Story Beat Generator5": {
      "ai_languageModel": [
        [
          {
            "node": "Narration Prompt Generator",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Image Output Parser",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Narration Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Story Beat Generator6": {
      "ai_languageModel": [
        [
          {
            "node": "Image Prompt Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Image Prompt Generator": {
      "main": [
        [
          {
            "node": "Check For Already Created Beats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare YouTube Upload": {
      "main": [
        [
          {
            "node": "Read Video for Upload from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Narration Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Narration Prompt Generator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Save Beat Image Locally": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Temporary Files Cleanup": {
      "main": [
        [
          {
            "node": "Get Story Idea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Beat File to Disk": {
      "main": [
        [
          {
            "node": "Generate Final Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Temporary Files Cleanup3": {
      "main": [
        []
      ]
    },
    "Generate Final Video Clip": {
      "main": [
        [
          {
            "node": "Search Beat Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run FFmpeg to Merge Media": {
      "main": [
        [
          {
            "node": "Read Beat File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video Audio Merge Command": {
      "main": [
        [
          {
            "node": "Run FFmpeg to Merge Media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Narration Prompt Generator": {
      "main": [
        [
          {
            "node": "Image Prompt Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Final Video from Disk": {
      "main": [
        [
          {
            "node": "Upload Final Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check For Already Created Beats": {
      "main": [
        [
          {
            "node": "Handle 0 Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Video for Upload from Disk": {
      "main": [
        [
          {
            "node": "YouTube Video Upload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Temporary Files to Delete": {
      "main": [
        [
          {
            "node": "Delete Temporary Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get YouTube Title and Description": {
      "main": [
        [
          {
            "node": "Prepare YouTube Upload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}