{
  "name": "AI-powered product video generator (Foreplay + Gemini + Sora 2)",
  "nodes": [
    {
      "id": "c9c22985-8d61-499a-914c-58bc20f9f198",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        128
      ],
      "parameters": {
        "width": 816,
        "height": 960,
        "content": "![Workflow Thumbnail](https://drive.google.com/thumbnail?id=1Q1-UcWXwv1eYzxjTumYCFXG1S7C3Be2V&sz=w1000)\n## AI-Powered Product Video Generator (Foreplay + Gemini + Sora 2)\n\nSign Up For Foreplay [HERE]("
      }
    },
    {
      "id": "daf9ad56-953b-41ff-a56a-1799678487af",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        48,
        1120
      ]
    },
    {
      "id": "7f71104f-da10-4973-beb2-e75da6003782",
      "name": "Set Workflow Credentials",
      "type": "n8n-nodes-base.set",
      "position": [
        272,
        1120
      ]
    },
    {
      "id": "f6fa59c6-96f9-4f99-9136-51debac91bef",
      "name": "Set Product Information",
      "type": "n8n-nodes-base.set",
      "position": [
        496,
        1120
      ]
    },
    {
      "id": "0ccd9c3c-7431-4cce-b186-d5d02f20d436",
      "name": "Fetch Product Image from Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        720,
        1120
      ]
    },
    {
      "id": "61ca8e44-26cc-4058-abec-c399e5edfe3c",
      "name": "Fetch Competitor Video Data (Foreplay API)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        944,
        1120
      ]
    },
    {
      "id": "ac38bf9c-1b40-4ad5-ac23-8465e307065e",
      "name": "Split Foreplay Response",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1168,
        1120
      ]
    },
    {
      "id": "7c423473-57f9-4610-b763-517f2e0493a2",
      "name": "Assemble Video Input Data",
      "type": "n8n-nodes-base.set",
      "position": [
        1392,
        1120
      ]
    },
    {
      "id": "7af96c0f-b309-4a5f-be3c-013e2491be99",
      "name": "Iterate Over Ad Examples",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        64,
        1328
      ]
    },
    {
      "id": "74f9eb73-04f7-4325-9fbc-6ed10583d8a6",
      "name": "Generate Video Prompt",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        288,
        1392
      ]
    },
    {
      "id": "d9224c5e-b920-461a-94eb-d6ff560ae831",
      "name": "Google Gemini LLM",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        352,
        1616
      ]
    },
    {
      "id": "f295b519-c12c-4169-a190-2971f90c649f",
      "name": "Create Video Task (Kie.ai)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        640,
        1392
      ]
    },
    {
      "id": "a4337191-923a-4413-bf8f-326c0d4fc2b6",
      "name": "Check Video Generation Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        864,
        1392
      ]
    },
    {
      "id": "882a7821-10de-47d5-9172-8bcdcf93785f",
      "name": "Download Finished Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1312,
        1328
      ]
    },
    {
      "id": "4c6249c7-5edd-4245-9650-8641cc19c276",
      "name": "Wait Before Checking Again",
      "type": "n8n-nodes-base.wait",
      "position": [
        1312,
        1552
      ]
    },
    {
      "id": "96ef7b58-58cf-4697-ba1c-6081c6f7ab91",
      "name": "Upload Generated Video to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1536,
        1632
      ]
    },
    {
      "id": "26533cc4-314c-4395-b8fc-e23a5a2a5afe",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        128
      ],
      "parameters": {
        "width": 768,
        "height": 656,
        "content": "## Step-by-Step Instructions\n### 1. Before _Set Workflow Credentials_ node:\nAdd your Foreplay, Google Drive, Gemini, and Kie.ai API keys. Never store real credentials directly in nodes before submissi"
      }
    },
    {
      "id": "fd7c94ac-56ff-4dd4-ad86-94b91bed0fc8",
      "name": "Video Generation Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        1088,
        1360
      ]
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Set Workflow Credentials",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini LLM": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Video Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video Prompt": {
      "main": [
        [
          {
            "node": "Create Video Task (Kie.ai)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Finished Video": {
      "main": [
        [
          {
            "node": "Upload Generated Video to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Product Information": {
      "main": [
        [
          {
            "node": "Fetch Product Image from Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Foreplay Response": {
      "main": [
        [
          {
            "node": "Assemble Video Input Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video Generation Status": {
      "main": [
        [
          {
            "node": "Download Finished Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Iterate Over Ad Examples",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Before Checking Again",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Iterate Over Ad Examples": {
      "main": [
        [],
        [
          {
            "node": "Generate Video Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Workflow Credentials": {
      "main": [
        [
          {
            "node": "Set Product Information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assemble Video Input Data": {
      "main": [
        [
          {
            "node": "Iterate Over Ad Examples",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Video Task (Kie.ai)": {
      "main": [
        [
          {
            "node": "Check Video Generation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Checking Again": {
      "main": [
        [
          {
            "node": "Check Video Generation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Video Generation Status": {
      "main": [
        [
          {
            "node": "Video Generation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Product Image from Google Drive": {
      "main": [
        [
          {
            "node": "Fetch Competitor Video Data (Foreplay API)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Generated Video to Google Drive": {
      "main": [
        [
          {
            "node": "Iterate Over Ad Examples",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Competitor Video Data (Foreplay API)": {
      "main": [
        [
          {
            "node": "Split Foreplay Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}