{
  "id": "WG8mVFgxC2vfo1jI",
  "name": "Sora2 vs Veo 3.1",
  "tags": [],
  "nodes": [
    {
      "id": "637d7b73-996b-4198-bbd6-8d8a38367dc4",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        672,
        560
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "46292554-8bc5-4f08-aaef-1f260cdc6912",
      "name": "POST Request to OpenAI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1008,
        960
      ],
      "parameters": {
        "url": "https://api.openai.com/v1/videos",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "prompt",
              "value": "={{ $json.chatInput }}"
            },
            {
              "name": "model",
              "value": "sora-2-pro"
            },
            {
              "name": "size",
              "value": "1280x720"
            },
            {
              "name": "seconds",
              "value": "8"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "921ab634-bd23-449b-8a61-9a2c4e06cc86",
      "name": "GET Request to OpenAI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1216,
        960
      ],
      "parameters": {
        "url": "=https://api.openai.com/v1/videos/{{ $json.id }}/content",
        "options": {
          "redirect": {
            "redirect": {}
          },
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "video.mp4"
            }
          }
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "c14b1856-6984-4f91-8b28-b8c235d4166b",
      "name": "Send Video to Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1424,
        960
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "Video Output",
        "options": {
          "attachmentsUi": {
            "attachmentsBinary": [
              {
                "property": "video.mp4"
              }
            ]
          }
        },
        "subject": "Sora2 Video"
      },
      "typeVersion": 2.1
    },
    {
      "id": "0aa5e8fc-e084-4348-b315-6f2f32359551",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1472,
        560
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "11ea80dd-d82d-4c8f-9cb0-c52919b6e9b7",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "completed"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "5a51ff12-2de9-46cd-af24-d7ad83bd4261",
      "name": "Wait another 60 secs",
      "type": "n8n-nodes-base.wait",
      "position": [
        1584,
        704
      ],
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "71bdf17f-e52d-497c-9bfa-64b1f018de99",
      "name": "Wait 1 Minute",
      "type": "n8n-nodes-base.wait",
      "position": [
        1088,
        560
      ],
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "58cbec33-205e-4d42-934e-cb08863dfbc6",
      "name": "Post to Wavespeed",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        880,
        560
      ],
      "parameters": {
        "url": "https://api.wavespeed.ai/api/v3/google/veo3.1/text-to-video",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "aspect_ratio",
              "value": "9:16"
            },
            {
              "name": "duration",
              "value": "8"
            },
            {
              "name": "generate_audio",
              "value": "true"
            },
            {
              "name": "prompt",
              "value": "={{ $json.chatInput }}"
            },
            {
              "name": "resolution",
              "value": "720p"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "2df1f6b6-19c3-4f99-b3e3-dd37aac30a5f",
      "name": "GET Request to Wavespeed",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1264,
        560
      ],
      "parameters": {
        "url": "=https://api.wavespeed.ai/api/v3/predictions/{{ $json.data.id }}/result",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "c179ee8f-ec79-46b8-9145-e0875861ed48",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        416
      ],
      "parameters": {
        "color": 5,
        "width": 288,
        "height": 752,
        "content": "Chat Input"
      },
      "typeVersion": 1
    },
    {
      "id": "aedc6438-7142-43f9-a24f-5a039bd3ce84",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        864
      ],
      "parameters": {
        "color": 4,
        "width": 1024,
        "height": 304,
        "content": "Video Creation with Sora 2"
      },
      "typeVersion": 1
    },
    {
      "id": "d0ffdeb2-5400-4a7d-8281-b4b7f0003e14",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        416
      ],
      "parameters": {
        "color": 4,
        "width": 1024,
        "height": 432,
        "content": "Video Creation with Veo 3.1 via Wavespeed"
      },
      "typeVersion": 1
    },
    {
      "id": "dda03fb9-2860-4a3c-8ff6-926d7a234c5e",
      "name": "Send Video Result to Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1696,
        544
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "={{ $json.data.outputs[0] }}",
        "options": {},
        "subject": "Video Generated"
      },
      "typeVersion": 2.1
    },
    {
      "id": "0b8c1b1e-fdd5-4bc5-a248-a8ab28fb84d7",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        112
      ],
      "parameters": {
        "width": 672,
        "height": 416,
        "content": "Watch Step by Step Video Guide Here:\n@[youtube](qjFWfYvHxlY)"
      },
      "typeVersion": 1
    },
    {
      "id": "ea1d7667-0b20-449c-9745-fe5198caa4ba",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        544
      ],
      "parameters": {
        "width": 1072,
        "height": 688,
        "content": "Automate Video Generation with Sora 2 & Veo 3.1 (n8n) \u2013 Beginner Friendly\n\nGenerate short AI videos in n8n with OpenAI Sora 2 and Google Veo 3.1 (via Wavespeed) \u2014 no code needed. Just enter a prompt in Chat Trigger, and the workflow runs two routes in parallel:\n\nSora 2 route: POST /v1/videos \u2192 GET /videos/{id}/content \u2192 Gmail (MP4 attached)\n\nVeo 3.1 route: POST /google/veo3.1/text-to-video \u2192 Poll result (GET /predictions/{id}/result) \u2192 Gmail (result link)\n\n\ud83c\udfa5 Watch step-by-step build: https://www.youtube.com/watch?v=qjFWfYvHxlY\n\nWhy it\u2019s useful\n\nCompare Sora 2 (direct MP4) vs Veo 3.1 (polled link) flows.\nEmail delivery built in.\nUses pinned prompt for marketing demo.\n\nRequirements\nOpenAI (Sora 2) API key\nWavespeed API key\nGmail OAuth2\nn8n (Cloud or self-hosted)\n\nSetup\nImport workflow.\nAdd API credentials in HTTP Header Auth.\nConnect Gmail OAuth2 & replace \u201csendTo\u201d email.\nRun via Chat Trigger \u2192 enter your prompt.\n\nTips\nAdjust Sora video size/duration or Veo aspect ratio/resolution.\nExtend Wait Node for longer polling.\nSwap Gmail for Slack, Drive, or Telegram for delivery."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "4dd18296-f6da-421d-9a0d-8376ea1cf42f",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Send Video Result to Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait another 60 secs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 1 Minute": {
      "main": [
        [
          {
            "node": "GET Request to Wavespeed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait another 60 secs": {
      "main": [
        [
          {
            "node": "Wait 1 Minute",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET Request to OpenAI": {
      "main": [
        [
          {
            "node": "Send Video to Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "POST Request to OpenAI": {
      "main": [
        [
          {
            "node": "GET Request to OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET Request to Wavespeed": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Wait 1 Minute",
            "type": "main",
            "index": 0
          },
          {
            "node": "POST Request to OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}