{
  "name": "Automate UGC video creation with Sora 2, OpenAI, and Gemini",
  "nodes": [
    {
      "id": "38d1b4e7-9d7a-4135-9ea8-990f8dc7a07a",
      "name": "form_trigger",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        400,
        -1232
      ]
    },
    {
      "id": "15bc2819-ed85-4c89-916a-892dd2cee5e9",
      "name": "convert_product_to_image",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        848,
        -1232
      ]
    },
    {
      "id": "4d1963b2-3b9c-450d-bb73-2afd606025b6",
      "name": "check_status",
      "type": "n8n-nodes-base.if",
      "position": [
        1120,
        -176
      ]
    },
    {
      "id": "9231b7bc-66e4-4ed8-b653-b65a1a2121f6",
      "name": "delay",
      "type": "n8n-nodes-base.wait",
      "position": [
        672,
        -176
      ]
    },
    {
      "id": "81919ddb-9e1d-42cc-a478-9a9d7589a579",
      "name": "set_frame_result",
      "type": "n8n-nodes-base.set",
      "position": [
        736,
        -544
      ]
    },
    {
      "id": "3c858488-bd4a-42a3-b253-ddeb777f9056",
      "name": "upload_video",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1648,
        -192
      ]
    },
    {
      "id": "57748cef-a1e7-44ae-b95c-53d43728e942",
      "name": "generate_ad_prompts",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        512,
        -848
      ]
    },
    {
      "id": "7b39f207-f1c5-4bb1-97b2-a3d62dac47f5",
      "name": "Convert To Base 64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        624,
        -1232
      ]
    },
    {
      "id": "6ec21e78-3cf0-42c4-9953-18944d5127f2",
      "name": "Generate Ideal Persona",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1072,
        -1232
      ]
    },
    {
      "id": "3f83b87d-23b5-4cf5-9c6b-ae8281e491db",
      "name": "Persona Prompt Setup",
      "type": "n8n-nodes-base.set",
      "position": [
        1296,
        -1232
      ]
    },
    {
      "id": "3b628adf-faf6-4b05-9878-9ecf365efc68",
      "name": "UGC Video Prompts Setup",
      "type": "n8n-nodes-base.set",
      "position": [
        1520,
        -1232
      ]
    },
    {
      "id": "d1f330b7-4d19-4311-af47-885ee5c01a63",
      "name": "Extract Prompts",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        720,
        -848
      ]
    },
    {
      "id": "5c7e5fb0-c3ac-48d8-bd9e-38403145a3be",
      "name": "Generate First Frame Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        512,
        -544
      ]
    },
    {
      "id": "b941b6cd-13df-4488-883b-ea96c3e171b8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -976
      ],
      "parameters": {
        "width": 1632,
        "height": 288,
        "content": "## Script Generation\nHere the workflow uses AI to make detailed prompts for three short UGC scripts. Prompts are extracted, split, and stored for next steps where videos will be rendered.\n"
      }
    },
    {
      "id": "50b20ef2-4ac8-405e-99b2-421e3e7324b0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -1344
      ],
      "parameters": {
        "width": 1632,
        "height": 304,
        "content": "## Initial Setup\nThis part collects user input, converts data into proper format, and prepares brand persona for prompt creation. It ensures the product details are structured before AI prompt generat"
      }
    },
    {
      "id": "639253eb-db30-4b9c-9342-37da1e21eb1e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        -272
      ],
      "parameters": {
        "width": 1648,
        "height": 288,
        "content": "## Video Generation\nThis part connects to Sora 2 API to generate UGC videos from prepared prompts and images. It waits till the video finishes rendering, downloads the file, and uploads it for final u"
      }
    },
    {
      "id": "313fb506-526d-4be8-9412-2cce97203d75",
      "name": "Download Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1440,
        -192
      ]
    },
    {
      "id": "bc9b0109-7136-4cc2-bbb0-ac22a683b477",
      "name": "Generate Video With SORA",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        448,
        -176
      ]
    },
    {
      "id": "11a9cc36-6cfd-482c-acc0-8f4d8ffe385a",
      "name": "Get Video Creation Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        896,
        -176
      ]
    },
    {
      "id": "57d32fc1-43c9-4915-820e-18f39aafecfe",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -624
      ],
      "parameters": {
        "width": 1632,
        "height": 288,
        "content": "## Set First Frame Image\nThis section creates a blank or styled image that acts as the first video frame. It downloads, resizes and prepares the product image for smooth video generation.\n"
      }
    },
    {
      "id": "4cd3b604-40e5-4f54-9d16-28d0dd990887",
      "name": "Resize For Selfie Video",
      "type": "n8n-nodes-base.editImage",
      "position": [
        1184,
        -544
      ]
    },
    {
      "id": "7a15b7cb-5f97-4e77-9760-4615bf914858",
      "name": "Download First Frame",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        960,
        -544
      ]
    },
    {
      "id": "2238f182-4ae9-4920-9bac-c3d632224eca",
      "name": "Split Prompt To Arrays",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1120,
        -848
      ]
    },
    {
      "id": "a863fd50-3151-4b51-abba-c12104f029ed",
      "name": "Create 3 Videos",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1424,
        -848
      ]
    },
    {
      "id": "e37cef0e-a601-4e20-85ac-f293ee2e8bca",
      "name": "Download Video1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        880,
        224
      ]
    },
    {
      "id": "84d82a22-7ca2-4703-ad26-82367fbcaa77",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2096,
        -1344
      ],
      "parameters": {
        "width": 1320,
        "height": 532,
        "content": "# Template Customization Services\n\nFor professional template customization and consultation, please connect with me on LinkedIn:\n\n## **[Connect on LinkedIn](https://www.linkedin.com/in/santhej/)**\n\n# "
      }
    },
    {
      "id": "e420e458-34e8-4c93-ab53-fa495425b018",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        -1984
      ],
      "parameters": {
        "width": 752,
        "height": 432,
        "content": "## How it works\nThis workflow is used to make UGC-style videos automatically by connecting n8n with Sora 2 and OpenAI. The process starts when the user submits a form with product name, idea or image."
      }
    },
    {
      "id": "54c7a939-89f4-4045-b0b8-48604894f4fc",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        80
      ],
      "parameters": {
        "width": 576,
        "height": 128,
        "content": "## Notes\nAdjust API endpoints or keys as per your Sora 2 account plan. Each run will create three short UGC videos automatically.\n"
      }
    }
  ],
  "connections": {
    "delay": {
      "main": [
        [
          {
            "node": "Get Video Creation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check_status": {
      "main": [
        [
          {
            "node": "Download Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "form_trigger": {
      "main": [
        [
          {
            "node": "Convert To Base 64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "upload_video": {
      "main": [
        [
          {
            "node": "Create 3 Videos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Video": {
      "main": [
        [
          {
            "node": "upload_video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create 3 Videos": {
      "main": [
        [],
        [
          {
            "node": "Generate First Frame Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Prompts": {
      "main": [
        [
          {
            "node": "Split Prompt To Arrays",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set_frame_result": {
      "main": [
        [
          {
            "node": "Download First Frame",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert To Base 64": {
      "main": [
        [
          {
            "node": "convert_product_to_image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "generate_ad_prompts": {
      "main": [
        [
          {
            "node": "Extract Prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download First Frame": {
      "main": [
        [
          {
            "node": "Resize For Selfie Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Persona Prompt Setup": {
      "main": [
        [
          {
            "node": "UGC Video Prompts Setup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Ideal Persona": {
      "main": [
        [
          {
            "node": "Persona Prompt Setup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Prompt To Arrays": {
      "main": [
        [
          {
            "node": "Create 3 Videos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resize For Selfie Video": {
      "main": [
        [
          {
            "node": "Generate Video With SORA",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UGC Video Prompts Setup": {
      "main": [
        [
          {
            "node": "generate_ad_prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video With SORA": {
      "main": [
        [
          {
            "node": "delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "convert_product_to_image": {
      "main": [
        [
          {
            "node": "Generate Ideal Persona",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video Creation Status": {
      "main": [
        [
          {
            "node": "check_status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate First Frame Image": {
      "main": [
        [
          {
            "node": "set_frame_result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}