{
  "name": "Generate UGC marketing videos for eCommerce with Sora 2 and Gemini",
  "nodes": [
    {
      "id": "f29b30fc-174f-4cd8-91dc-87a2f5f82929",
      "name": "form_trigger",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -64,
        0
      ]
    },
    {
      "id": "5d6af3fc-ac57-449a-934a-45879734597c",
      "name": "analyze_product",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        720,
        0
      ]
    },
    {
      "id": "513b2b6d-6bc1-4e55-a71e-b816ef10cc5b",
      "name": "set_model_details",
      "type": "n8n-nodes-base.set",
      "position": [
        1008,
        0
      ]
    },
    {
      "id": "91f80c5f-6a2a-4228-8935-a44084838a21",
      "name": "set_build_video_prompts",
      "type": "n8n-nodes-base.set",
      "position": [
        -64,
        224
      ]
    },
    {
      "id": "db32ee75-123a-4201-a657-c420d35e6b1f",
      "name": "convert_product_to_base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        176,
        0
      ]
    },
    {
      "id": "3e441076-59d8-494e-b58d-c4c6ddbc54ea",
      "name": "convert_product_to_image",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        432,
        0
      ]
    },
    {
      "id": "26f3e6a6-dea8-4cb9-b5fd-18689e5a7fda",
      "name": "extract_prompts",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        592,
        224
      ]
    },
    {
      "id": "7ca7d1df-4214-45dd-80dd-768838270f21",
      "name": "prompts-parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        592,
        448
      ]
    },
    {
      "id": "92036110-ad91-4f8c-b1fb-e991b8482355",
      "name": "split_prompts",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1008,
        224
      ]
    },
    {
      "id": "02861a04-3fa7-4bc0-b956-c00409daf8bc",
      "name": "iterate_prompts",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -64,
        448
      ]
    },
    {
      "id": "dd6dc994-b36f-41c7-8d2a-a0abfc4dd0ec",
      "name": "generate_video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -64,
        848
      ]
    },
    {
      "id": "f7695e2f-713e-4726-a34d-a6dd5fb5fd93",
      "name": "get_video_status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        432,
        848
      ]
    },
    {
      "id": "78bd2b56-c12a-4cc0-95c1-ae1fad148d00",
      "name": "get_video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        848,
        816
      ]
    },
    {
      "id": "23e85be7-bb80-4408-8e00-98f00cbfb4a4",
      "name": "check_status",
      "type": "n8n-nodes-base.if",
      "position": [
        656,
        800
      ]
    },
    {
      "id": "16f02347-42b5-48f4-a148-9be6c2008ede",
      "name": "delay",
      "type": "n8n-nodes-base.wait",
      "position": [
        176,
        848
      ]
    },
    {
      "id": "657f3352-c561-4673-ab18-524399361de1",
      "name": "generate_frame",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        176,
        592
      ]
    },
    {
      "id": "6f446bde-1f60-4ee5-8665-ebf47fbd5c13",
      "name": "set_frame_result",
      "type": "n8n-nodes-base.set",
      "position": [
        432,
        592
      ]
    },
    {
      "id": "455bc7a4-9365-4480-babc-9e19a1735cf4",
      "name": "get_frame_image",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        720,
        592
      ]
    },
    {
      "id": "e53b0785-fccc-4381-a9e4-4bed02386b3b",
      "name": "resize_image",
      "type": "n8n-nodes-base.editImage",
      "position": [
        1008,
        592
      ]
    },
    {
      "id": "96bedfe8-819e-46d7-9751-c7620671d954",
      "name": "gemini-2.5-pro",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        592,
        1088
      ]
    },
    {
      "id": "4c4eec9b-766f-405c-b352-73a0e76c7f8c",
      "name": "upload_video",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1008,
        816
      ]
    },
    {
      "id": "e1f34c6c-a707-4746-924e-3ffd9813aa64",
      "name": "generate_ad_prompts",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        176,
        224
      ]
    },
    {
      "id": "dede88f1-5acb-41dc-82b8-f233f15a0d23",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -256
      ],
      "parameters": {
        "width": 1360,
        "height": 1296,
        "content": "## Sora 2 UGC eCommerce Video Generator\n\n1. Trigger by uploading a simple product photo and a name of your product to start the workflow. \n2. Uses OpenAI's vision API to analyze the image and create a"
      }
    },
    {
      "id": "fb7a61b0-26b5-49ee-ace3-86f4cf3fb207",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -256
      ],
      "parameters": {
        "width": 560,
        "height": 1296,
        "content": "## Overview & Setup\n\nThis n8n template demonstrates how to automatically generate authentic User-Generated Content (UGC) style marketing videos for eCommerce products using AI. Simply upload a product"
      }
    }
  ],
  "connections": {
    "delay": {
      "main": [
        [
          {
            "node": "get_video_status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_video": {
      "main": [
        [
          {
            "node": "upload_video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check_status": {
      "main": [
        [
          {
            "node": "get_video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "form_trigger": {
      "main": [
        [
          {
            "node": "convert_product_to_base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "resize_image": {
      "main": [
        [
          {
            "node": "generate_video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "upload_video": {
      "main": [
        [
          {
            "node": "iterate_prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "split_prompts": {
      "main": [
        [
          {
            "node": "iterate_prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "gemini-2.5-pro": {
      "ai_languageModel": [
        [
          {
            "node": "extract_prompts",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "prompts-parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "generate_frame": {
      "main": [
        [
          {
            "node": "set_frame_result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "generate_video": {
      "main": [
        [
          {
            "node": "delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "prompts-parser": {
      "ai_outputParser": [
        [
          {
            "node": "extract_prompts",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "analyze_product": {
      "main": [
        [
          {
            "node": "set_model_details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "extract_prompts": {
      "main": [
        [
          {
            "node": "split_prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_frame_image": {
      "main": [
        [
          {
            "node": "resize_image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "iterate_prompts": {
      "main": [
        [],
        [
          {
            "node": "generate_frame",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_video_status": {
      "main": [
        [
          {
            "node": "check_status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set_frame_result": {
      "main": [
        [
          {
            "node": "get_frame_image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set_model_details": {
      "main": [
        [
          {
            "node": "set_build_video_prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "generate_ad_prompts": {
      "main": [
        [
          {
            "node": "extract_prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set_build_video_prompts": {
      "main": [
        [
          {
            "node": "generate_ad_prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "convert_product_to_image": {
      "main": [
        [
          {
            "node": "analyze_product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "convert_product_to_base64": {
      "main": [
        [
          {
            "node": "convert_product_to_image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}