{
  "name": "Generate videos automatically with Veo3 Fast API, Google Drive & email notifications",
  "nodes": [
    {
      "id": "a1b4a7ad-efec-4a7c-a7d0-057b01cae303",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        384,
        560
      ]
    },
    {
      "id": "66f9b398-16c5-4aeb-b677-2c1e3031a4c5",
      "name": "Wait for API Response",
      "type": "n8n-nodes-base.wait",
      "position": [
        1056,
        32
      ]
    },
    {
      "id": "0af22a6f-812c-4c1c-9a89-b06adeaaed47",
      "name": "API Request: Check Task Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1392,
        96
      ]
    },
    {
      "id": "b5c2a32a-b64e-4997-bfe8-5b4816cf1b26",
      "name": "Condition: Task Output Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        1712,
        208
      ]
    },
    {
      "id": "24483c85-ba67-433e-83aa-9852e88065a7",
      "name": "Wait for Task to Complete",
      "type": "n8n-nodes-base.wait",
      "position": [
        1088,
        320
      ]
    },
    {
      "id": "b966188f-dd27-453b-b029-d0b720ac3598",
      "name": "Send Email: API Error - Task ID Missing",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2144,
        832
      ]
    },
    {
      "id": "ddde32c8-f9dc-40cf-8180-b232bb40d6a8",
      "name": "Upload File to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2224,
        112
      ]
    },
    {
      "id": "973a3938-043f-4ce7-8122-e7d1946c24c0",
      "name": "Send Email: API Error - Task Failed",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2432,
        464
      ]
    },
    {
      "id": "5e5256dd-e767-484d-8b4f-c0dc62b71f9d",
      "name": "Set Google Drive Permissions",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2544,
        208
      ]
    },
    {
      "id": "e7c87caf-cf15-4b6a-8648-22ff8bfa764f",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        752
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "Sends an error email if the task ID is missing in the response."
      }
    },
    {
      "id": "5132d3ef-ee14-4d7e-80db-03c756933aa9",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        48
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "Uploads the processed video to Google Drive."
      }
    },
    {
      "id": "5fa2259b-54dc-4974-9198-730ba8e756e9",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2480,
        160
      ],
      "parameters": {
        "width": null,
        "height": 208,
        "content": "Sets the necessary permissions for the uploaded Google Drive file."
      }
    },
    {
      "id": "ce288355-cc9e-4677-a1c2-3e2d329be59f",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2368,
        432
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "Sends an email if the video generation task fails"
      }
    },
    {
      "id": "d069c2dc-7576-478f-8510-4beb55871bff",
      "name": "Condition: Check Task Id",
      "type": "n8n-nodes-base.if",
      "position": [
        1248,
        576
      ]
    },
    {
      "id": "6510719b-49cf-4264-985b-1ed5b98b1a9f",
      "name": "Veo 3 Fast API Processor",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        816,
        576
      ]
    },
    {
      "id": "fe19829a-6780-450f-b291-295e1afcd0d7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2784,
        160
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Sends an email if the video generation is completed "
      }
    },
    {
      "id": "e2f94f99-24d9-45ce-b69e-b2971b44b4a3",
      "name": "Send an email : Video Link",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2832,
        256
      ]
    },
    {
      "id": "adeb491a-668c-47ef-bcff-31058cc05087",
      "name": "Download Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1968,
        128
      ]
    },
    {
      "id": "97397cd2-7d14-453b-a570-479027546e33",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        448
      ],
      "parameters": {
        "width": null,
        "height": 272,
        "content": "  - Triggers the workflow when a form is submitted with a prompt field."
      }
    },
    {
      "id": "dfac4580-4985-4f83-8374-2d5052d4b298",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        496
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "   - Processes the form's prompt by making an API call to the \"Veo 3 Fast\" API."
      }
    },
    {
      "id": "ef977b46-0269-4d63-b1fa-dbbe25d0f3eb",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        480
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": " - Checks if the task ID is present before continuing; sends an error email if missing."
      }
    },
    {
      "id": "07715224-0b63-4416-9441-66f5f486cce2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        -80
      ],
      "parameters": {
        "width": null,
        "height": 256,
        "content": "  - Waits for 35 seconds to allow the API response to be processed."
      }
    },
    {
      "id": "a5f6343f-e434-4514-96d6-296a843e342f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        224
      ],
      "parameters": {
        "width": null,
        "height": 256,
        "content": "   - Waits for 30 seconds before rechecking the task’s completion status."
      }
    },
    {
      "id": "4ee1be65-7a6d-4fc2-8e38-ab85dc1bf989",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1312,
        16
      ],
      "parameters": {
        "width": null,
        "height": 208,
        "content": " - Sends an HTTP request to check the status of a task using its ID."
      }
    },
    {
      "id": "0ab9da31-c810-4693-a72b-fa0828d94f2e",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1632,
        112
      ],
      "parameters": {
        "width": null,
        "height": 272,
        "content": "- Checks the task's output status for success, processing, or failure."
      }
    },
    {
      "id": "f38dbac6-555d-4ad3-830d-9ecb8ba9dba8",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1888,
        16
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "- Downloads the processed video from the output URL provided by the API response."
      }
    },
    {
      "id": "4f6c3939-8d35-499e-802c-2340cfb44781",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        128
      ],
      "parameters": {
        "width": 992,
        "height": 688,
        "content": " **Veo 3 Video Generation and Google Drive Integration**\n\n## Description:\nThis workflow automates the process of generating a video using the **Veo 3 Fast API** based on a user-submitted prompt, uploa"
      }
    }
  ],
  "connections": {
    "Download Video": {
      "main": [
        [
          {
            "node": "Upload File to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Veo 3 Fast API Processor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for API Response": {
      "main": [
        [
          {
            "node": "API Request: Check Task Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Condition: Check Task Id": {
      "main": [
        [
          {
            "node": "Wait for API Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Email: API Error - Task ID Missing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Veo 3 Fast API Processor": {
      "main": [
        [
          {
            "node": "Condition: Check Task Id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Task to Complete": {
      "main": [
        [
          {
            "node": "API Request: Check Task Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload File to Google Drive": {
      "main": [
        [
          {
            "node": "Set Google Drive Permissions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Google Drive Permissions": {
      "main": [
        [
          {
            "node": "Send an email : Video Link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Condition: Task Output Status": {
      "main": [
        [
          {
            "node": "Download Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Task to Complete",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Email: API Error - Task Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API Request: Check Task Status": {
      "main": [
        [
          {
            "node": "Condition: Task Output Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}