{
  "name": "Automate video creation with Gemini Prompts and Vertex AI to Google Drive",
  "nodes": [
    {
      "id": "43e0eeb0-ae4a-4fcd-92be-b9d39a424594",
      "name": "Every 2 Hours1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        272,
        -176
      ]
    },
    {
      "id": "4b4a6de0-642c-4b6a-8e97-c0e40ea62e00",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        432,
        -352
      ]
    },
    {
      "id": "04f034fb-37c7-4ef3-83f1-bc39c9814fd5",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        896,
        -176
      ]
    },
    {
      "id": "6a5145ff-a81b-4df4-9203-ca75dfa66a57",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        432,
        -176
      ]
    },
    {
      "id": "4eb96131-e8ad-41ec-86db-11e207349fff",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        -176
      ]
    },
    {
      "id": "d93a1c94-5c35-4003-a1a9-24a099e862ec",
      "name": "Code in JavaScript1",
      "type": "n8n-nodes-base.code",
      "position": [
        1376,
        -176
      ]
    },
    {
      "id": "01505442-9c3a-470f-a524-8c5c15713f2f",
      "name": "Setting",
      "type": "n8n-nodes-base.set",
      "position": [
        1632,
        -176
      ]
    },
    {
      "id": "4338fb60-3c4a-4e11-8f57-aba096fe98bd",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1104,
        272
      ]
    },
    {
      "id": "64dce305-789f-4b05-b1e5-2b404048c660",
      "name": "Vertex AI-fetch",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        672,
        288
      ]
    },
    {
      "id": "74ddab4e-2bb3-4304-8b43-a1746a95b240",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        480,
        288
      ]
    },
    {
      "id": "e090a167-7a66-406e-ad50-3f7e0da78574",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1296,
        272
      ]
    },
    {
      "id": "9036aaee-0fe6-4877-bebb-ebc475df4aa6",
      "name": "Log Final Video in Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1488,
        272
      ]
    },
    {
      "id": "ee87a34c-5764-42c2-9137-6b59d9d83bc5",
      "name": "Vertex AI-VEO",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        256,
        288
      ]
    },
    {
      "id": "fc571a07-9988-42c3-b98c-9c74c022bef6",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        -448
      ],
      "parameters": {
        "width": 836,
        "height": 464,
        "content": "## 1. Generate ideas for the prompt"
      }
    },
    {
      "id": "a9a42c29-5d70-421c-ba94-44d433413da2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -448
      ],
      "parameters": {
        "width": 840,
        "height": 464,
        "content": "## 2. Generate Prompt for the video\n"
      }
    },
    {
      "id": "dbf69e01-3104-4795-af96-161f70f69825",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        48
      ],
      "parameters": {
        "width": 1704,
        "height": 464,
        "content": "## 3. Generate video, convert to mp4, store and log\n"
      }
    },
    {
      "id": "419d4197-14be-4168-8c43-99bc4f2185aa",
      "name": "Basic LLM Chain - Prompt",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1088,
        -176
      ]
    },
    {
      "id": "66710f9b-f0e7-4f85-9f9a-6380b0f97713",
      "name": "Is Video Complete?1",
      "type": "n8n-nodes-base.if",
      "position": [
        864,
        288
      ]
    },
    {
      "id": "d03ecfd6-a00f-4fdb-8586-6d1abfffeb65",
      "name": "Wait 1 Min & Retry1",
      "type": "n8n-nodes-base.wait",
      "position": [
        864,
        80
      ]
    },
    {
      "id": "c1215511-7b07-4242-bfe3-b0a2a69ab2ea",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1504,
        -352
      ],
      "parameters": {
        "width": 352,
        "height": 352,
        "content": "## Change Access Token every hour or auto refreshes token using a Google cloud  service account"
      }
    },
    {
      "id": "efe8301d-3971-4c4a-ba97-deee9b057261",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        -448
      ],
      "parameters": {
        "width": 800,
        "height": 880,
        "content": "## AI-Powered Video Generation Pipeline with Google Drive Storage\n\n## How it works\n- **Schedule Trigger** node to start the workflow\n- **Basic LLM chain** node works with Google Gemini AI (Can be repl"
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Vertex AI-fetch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Setting": {
      "main": [
        [
          {
            "node": "Vertex AI-VEO",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file": {
      "main": [
        [
          {
            "node": "Log Final Video in Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Vertex AI-VEO": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every 2 Hours1": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Vertex AI-fetch": {
      "main": [
        [
          {
            "node": "Is Video Complete?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript1": {
      "main": [
        [
          {
            "node": "Setting",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Video Complete?1": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 1 Min & Retry1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 1 Min & Retry1": {
      "main": [
        [
          {
            "node": "Vertex AI-fetch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain - Prompt": {
      "main": [
        [
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Basic LLM Chain - Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        [
          {
            "node": "Basic LLM Chain - Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}