Sora 2
上級
これはContent Creation, Multimodal AI分野の自動化ワークフローで、21個のノードを含みます。主にSet, Form, Wait, Merge, Switchなどのノードを使用。 OpenAI Sora 2を使ってAIビデオを生成し、Googleドライブにアップロード
前提条件
- •Google Drive API認証情報
- •ターゲットAPIの認証情報が必要な場合あり
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "fUtTSVUudypSMWPr",
"meta": {
"instanceId": "69cb24484ded4b91a528eddf1eab8f391c66f63b5d8162ce8f6f60ffd7b0e0d1",
"templateCredsSetupCompleted": true
},
"name": "Sora 2",
"tags": [],
"nodes": [
{
"id": "6285ad92-d4fb-474d-a27f-4e53064db2ab",
"name": "待機",
"type": "n8n-nodes-base.wait",
"notes": "30 seconds",
"position": [
944,
176
],
"webhookId": "d6b5d4ee-dce9-4053-97c0-75b49c1158a4",
"parameters": {
"amount": 30
},
"notesInFlow": true,
"typeVersion": 1.1
},
{
"id": "5a1ec7d2-bea1-49e7-8f72-645b00b909b2",
"name": "ステータス",
"type": "n8n-nodes-base.switch",
"notes": "Decide next step",
"position": [
752,
-32
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Completed",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "debfc1f4-f7ee-48c3-aefb-929fc6a02c17",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "completed"
}
]
},
"renameOutput": true
},
{
"outputKey": "In Progress",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "3d03417e-a385-4bf2-992d-2b46a18cde03",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "in_progress"
}
]
},
"renameOutput": true
},
{
"outputKey": "Queued",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "43850b6f-73fa-4914-af6a-d423c259d993",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "queued"
}
]
},
"renameOutput": true
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "cf5a311e-8604-493c-a9cf-05ca7c6aac8c",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "failed"
}
]
}
}
]
},
"options": {}
},
"notesInFlow": true,
"typeVersion": 3.2
},
{
"id": "6c4e7f40-d42d-4b43-899a-e04f53e00ea9",
"name": "ステータス確認",
"type": "n8n-nodes-base.httpRequest",
"notes": "Check current status",
"position": [
560,
0
],
"parameters": {
"url": "=https://api.openai.com/v1/videos/{{ $json.id }}",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('On form submission').item.json.YOUR_ACCESS_TOKEN }}"
}
]
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "b122a24f-b1c1-4986-a2c3-457dc8af4a31",
"name": "ダウンロード",
"type": "n8n-nodes-base.httpRequest",
"position": [
1184,
-48
],
"parameters": {
"url": "=https://api.openai.com/v1/videos/{{ $json.id }}/content",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('On form submission').item.json.YOUR_ACCESS_TOKEN }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "0fdf2bcf-7331-4edb-b0c2-20244a34a66c",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1360,
-144
],
"parameters": {
"color": 6,
"width": 180,
"height": 576,
"content": "### Upload Video & Thumbnail to Google Drive"
},
"typeVersion": 1
},
{
"id": "26688dc3-c615-49d0-8921-1dd5c6d7ce86",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1136,
-144
],
"parameters": {
"color": 5,
"width": 200,
"height": 576,
"content": "### Get Generated Video"
},
"typeVersion": 1
},
{
"id": "c403a8db-5789-4d14-a9c4-42bb9f28338d",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-32,
-144
],
"parameters": {
"color": 4,
"width": 1140,
"height": 576,
"content": "## Sora\n1. Sends the prompt to Sora 2 API endpoint.\n2. Waits for the video rendering to be complete.\n3. Fetches the video id"
},
"typeVersion": 1
},
{
"id": "e850e99e-5239-4fdd-92f6-07c2dc430972",
"name": "設定",
"type": "n8n-nodes-base.set",
"position": [
-192,
272
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "78950a7f-e225-430d-a262-e5d82962d231",
"name": "prompt",
"type": "string",
"value": "={{ $json.Prompt }}"
},
{
"id": "083ce6d6-8cd2-4f73-8edd-eecd98002b1c",
"name": "model",
"type": "string",
"value": "={{ $json.Model }}"
},
{
"id": "9d513c9a-a150-42d8-8243-0ba08c9d3093",
"name": "size",
"type": "string",
"value": "={{ $json.Size }}"
},
{
"id": "aa4fa43a-85f5-400b-9b2b-0d0de6590d39",
"name": "seconds",
"type": "string",
"value": "={{ $json.Duration }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "8a86f10f-3c06-4d7f-8a22-1caea453e4f1",
"name": "付箋4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-304,
-144
],
"parameters": {
"height": 576,
"content": "### Settings\n* Model: sora-2 or sora-2-pro\n* Size:\n * Sora 2: $0.1/sec\n * Portrait: 720x1280\n * Landscape: 1280x720\n * Sora 2 Pro: $0.3/sec\n * Portrait: 720x1280\n * Landscape: 1280x720\n * Sora 2 Pro: $0.5/sec\n * Portrait: 1024x1792\n * Landscape: 1792x1024\n* Duration: 4, 8, 12. Default value is 4.\n* Reference: Optional reference in format jpg, png or webp. The image must match the target video’s resolution"
},
"typeVersion": 1
},
{
"id": "e01752f8-633f-4238-b568-d9f3cb7a1140",
"name": "フォーム送信時",
"type": "n8n-nodes-base.formTrigger",
"position": [
-480,
224
],
"webhookId": "1c041721-9e17-4486-927e-d2de9a113977",
"parameters": {
"options": {},
"formTitle": "OpenAI Sora",
"formFields": {
"values": [
{
"fieldLabel": "YOUR_ACCESS_TOKEN",
"requiredField": true
},
{
"fieldType": "textarea",
"fieldLabel": "Prompt",
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "Model",
"fieldOptions": {
"values": [
{
"option": "sora-2"
},
{
"option": "sora-2-pro"
}
]
},
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "Size",
"fieldOptions": {
"values": [
{
"option": "1280x720"
},
{
"option": "720x1280"
},
{
"option": "1024x1792"
},
{
"option": "1792x1024"
}
]
},
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "Duration",
"fieldOptions": {
"values": [
{
"option": "4"
},
{
"option": "8"
},
{
"option": "12"
}
]
},
"requiredField": true
},
{
"fieldType": "file",
"fieldLabel": "Image Reference",
"multipleFiles": false,
"acceptFileTypes": ".jpg, .png, .webp"
}
]
},
"formDescription": "OpenAI Sora 2 Video Generator"
},
"typeVersion": 2.2
},
{
"id": "6e3c9c65-091f-428e-afd0-916d73196fae",
"name": "リファレンス",
"type": "n8n-nodes-base.switch",
"notes": "Image Reference",
"position": [
16,
112
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "False",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "debfc1f4-f7ee-48c3-aefb-929fc6a02c17",
"operator": {
"type": "number",
"operation": "notExists",
"singleValue": true
},
"leftValue": "={{ $('On form submission').item.json['Image Reference'].size }}",
"rightValue": "completed"
}
]
},
"renameOutput": true
},
{
"outputKey": "True",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "3d03417e-a385-4bf2-992d-2b46a18cde03",
"operator": {
"type": "number",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $('On form submission').item.json['Image Reference'].size }}",
"rightValue": "in_progress"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"notesInFlow": true,
"typeVersion": 3.2
},
{
"id": "9e10f930-6817-4123-85d5-532832ef28f0",
"name": "ビデオB作成",
"type": "n8n-nodes-base.httpRequest",
"notes": "With image reference",
"position": [
336,
224
],
"parameters": {
"url": "https://api.openai.com/v1/videos",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "prompt",
"value": "={{ $json.prompt }}"
},
{
"name": "model",
"value": "={{ $json.model }}"
},
{
"name": "size",
"value": "={{ $json.size }}"
},
{
"name": "seconds",
"value": "={{ $json.seconds }}"
},
{
"name": "input_reference",
"parameterType": "formBinaryData",
"inputDataFieldName": "=Image_Reference"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('On form submission').item.json.YOUR_ACCESS_TOKEN }}"
}
]
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "74d10265-af5d-4a91-9082-f16627018373",
"name": "ビデオA作成",
"type": "n8n-nodes-base.httpRequest",
"notes": "Without image reference",
"position": [
336,
0
],
"parameters": {
"url": "https://api.openai.com/v1/videos",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "prompt",
"value": "={{ $json.prompt }}"
},
{
"name": "model",
"value": "={{ $json.model }}"
},
{
"name": "size",
"value": "={{ $json.size }}"
},
{
"name": "seconds",
"value": "={{ $json.seconds }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('On form submission').item.json.YOUR_ACCESS_TOKEN }}"
}
]
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "f23a5c7c-db0c-45e2-9e3c-dc1db548efc3",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
1568,
-144
],
"parameters": {
"color": 3,
"width": 580,
"height": 576,
"content": "### Handle Error, Thumbnail and Download Link"
},
"typeVersion": 1
},
{
"id": "5d96a299-f67c-4ee1-ac9b-d5a1374264e1",
"name": "失敗",
"type": "n8n-nodes-base.form",
"position": [
1920,
240
],
"webhookId": "898add9e-df30-4b09-aa45-9773a250f79d",
"parameters": {
"options": {},
"operation": "completion",
"completionTitle": "Error",
"completionMessage": "=<h2>{{ $json.error.code }}</h2> {{ $json.error.message }}"
},
"typeVersion": 1
},
{
"id": "4231bd6a-64f2-4dea-b5c7-a3c1f5cdbca6",
"name": "完了",
"type": "n8n-nodes-base.form",
"position": [
1920,
48
],
"webhookId": "4fb73428-39f7-44c8-b7ff-287fa4aa745b",
"parameters": {
"options": {},
"operation": "completion",
"completionTitle": "Generation Completed",
"completionMessage": "=<a href=\"{{ $json.content[0].webViewLink }}\"><img src=\"{{ $json.content[1].thumbnailLink }}\"><a>\n<br>\n<b><a href=\"{{ $json.content[0].webViewLink }}\">Download</a></b>"
},
"typeVersion": 1
},
{
"id": "1e4887e9-8236-4d87-b703-bb57142b6407",
"name": "サムネイル1",
"type": "n8n-nodes-base.httpRequest",
"position": [
1184,
144
],
"parameters": {
"url": "=https://api.openai.com/v1/videos/{{ $json.id }}/content",
"options": {
"redirect": {
"redirect": {}
},
"response": {
"response": {
"responseFormat": "file",
"outputPropertyName": "thumbnail.webp"
}
}
},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "variant",
"value": "thumbnail"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('On form submission').item.json.YOUR_ACCESS_TOKEN }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "58c457f8-4d8d-40c7-b2df-a2a4f3b93d80",
"name": "結合",
"type": "n8n-nodes-base.merge",
"position": [
1616,
48
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "de9cc0c1-a726-4935-83d0-da4aefbd7440",
"name": "ビデオアップロード",
"type": "n8n-nodes-base.googleDrive",
"position": [
1408,
-48
],
"parameters": {
"name": "={{ $json.id }}.mp4",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1hUOUwcbOPpkfT4zCOGCju61qXVC3uenw",
"cachedResultUrl": "https://drive.google.com/drive/folders/1hUOUwcbOPpkfT4zCOGCju61qXVC3uenw",
"cachedResultName": "Sora"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "rqC0SH1li8N0Qvrg",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "26f032a9-d6d2-40a3-bdd3-32c985b7bbb6",
"name": "集約",
"type": "n8n-nodes-base.aggregate",
"position": [
1776,
48
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData",
"destinationFieldName": "content"
},
"typeVersion": 1
},
{
"id": "1899d016-5475-41b8-82e2-9b07727f617e",
"name": "サムネイルアップロード",
"type": "n8n-nodes-base.googleDrive",
"position": [
1408,
144
],
"parameters": {
"name": "={{ $json.id }}.webp",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1hUOUwcbOPpkfT4zCOGCju61qXVC3uenw",
"cachedResultUrl": "https://drive.google.com/drive/folders/1hUOUwcbOPpkfT4zCOGCju61qXVC3uenw",
"cachedResultName": "Sora"
},
"inputDataFieldName": "thumbnail.webp"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "rqC0SH1li8N0Qvrg",
"name": "Google Drive account"
}
},
"typeVersion": 3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "63abde8c-6130-44a4-a4a4-51deacb87fed",
"connections": {
"6285ad92-d4fb-474d-a27f-4e53064db2ab": {
"main": [
[
{
"node": "6c4e7f40-d42d-4b43-899a-e04f53e00ea9",
"type": "main",
"index": 0
}
]
]
},
"58c457f8-4d8d-40c7-b2df-a2a4f3b93d80": {
"main": [
[
{
"node": "26f032a9-d6d2-40a3-bdd3-32c985b7bbb6",
"type": "main",
"index": 0
}
]
]
},
"5a1ec7d2-bea1-49e7-8f72-645b00b909b2": {
"main": [
[
{
"node": "b122a24f-b1c1-4986-a2c3-457dc8af4a31",
"type": "main",
"index": 0
},
{
"node": "1e4887e9-8236-4d87-b703-bb57142b6407",
"type": "main",
"index": 0
}
],
[
{
"node": "6285ad92-d4fb-474d-a27f-4e53064db2ab",
"type": "main",
"index": 0
}
],
[
{
"node": "6285ad92-d4fb-474d-a27f-4e53064db2ab",
"type": "main",
"index": 0
}
],
[
{
"node": "5d96a299-f67c-4ee1-ac9b-d5a1374264e1",
"type": "main",
"index": 0
}
]
]
},
"b122a24f-b1c1-4986-a2c3-457dc8af4a31": {
"main": [
[
{
"node": "de9cc0c1-a726-4935-83d0-da4aefbd7440",
"type": "main",
"index": 0
}
]
]
},
"e850e99e-5239-4fdd-92f6-07c2dc430972": {
"main": [
[
{
"node": "6e3c9c65-091f-428e-afd0-916d73196fae",
"type": "main",
"index": 0
}
]
]
},
"26f032a9-d6d2-40a3-bdd3-32c985b7bbb6": {
"main": [
[
{
"node": "4231bd6a-64f2-4dea-b5c7-a3c1f5cdbca6",
"type": "main",
"index": 0
}
]
]
},
"6e3c9c65-091f-428e-afd0-916d73196fae": {
"main": [
[
{
"node": "74d10265-af5d-4a91-9082-f16627018373",
"type": "main",
"index": 0
}
],
[
{
"node": "9e10f930-6817-4123-85d5-532832ef28f0",
"type": "main",
"index": 0
}
]
]
},
"1e4887e9-8236-4d87-b703-bb57142b6407": {
"main": [
[
{
"node": "1899d016-5475-41b8-82e2-9b07727f617e",
"type": "main",
"index": 0
}
]
]
},
"6c4e7f40-d42d-4b43-899a-e04f53e00ea9": {
"main": [
[
{
"node": "5a1ec7d2-bea1-49e7-8f72-645b00b909b2",
"type": "main",
"index": 0
}
]
]
},
"de9cc0c1-a726-4935-83d0-da4aefbd7440": {
"main": [
[
{
"node": "58c457f8-4d8d-40c7-b2df-a2a4f3b93d80",
"type": "main",
"index": 0
}
]
]
},
"74d10265-af5d-4a91-9082-f16627018373": {
"main": [
[
{
"node": "6c4e7f40-d42d-4b43-899a-e04f53e00ea9",
"type": "main",
"index": 0
}
]
]
},
"9e10f930-6817-4123-85d5-532832ef28f0": {
"main": [
[
{
"node": "6c4e7f40-d42d-4b43-899a-e04f53e00ea9",
"type": "main",
"index": 0
}
]
]
},
"1899d016-5475-41b8-82e2-9b07727f617e": {
"main": [
[
{
"node": "58c457f8-4d8d-40c7-b2df-a2a4f3b93d80",
"type": "main",
"index": 1
}
]
]
},
"e01752f8-633f-4238-b568-d9f3cb7a1140": {
"main": [
[
{
"node": "e850e99e-5239-4fdd-92f6-07c2dc430972",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - コンテンツ作成, マルチモーダルAI
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
WordPressブログの自動化プロフェッショナル版(先端研究)v2.1マーケットプラグイン
GPT-4o、Perplexity AI、そして多言語対応を使ったSEO最適化ブログ作成の自動化
If
Set
Xml
+
If
Set
Xml
125 ノードDaniel Ng
コンテンツ作成
OpenAI、ElevenLabs、Fal.ai を使用した動画・パ odcast・ASM R向けのウイルス性コンテンツ自動作成
OpenAI、ElevenLabs、そして Fal.ai を使って動画、ポッドキャスト、ASMR に向けたウイルスのコンテンツ作成を自動化
Set
Code
Wait
+
Set
Code
Wait
97 ノードAdam Crafts
コンテンツ作成
オートメーション動画ジェネレーター
DeepSeek、TTS、Together.ai を使ってスクリプトから AI 動画を生成
Set
Code
Wait
+
Set
Code
Wait
81 ノードLakindu Siriwardana
コンテンツ作成
💥 NanoBanana、Seedream 4、ChatGPT Image、Veo 3 を使って動画広告を自動化 - VIDEO
AI(NanoBanana、Seedream、GPT-4o、Veo 3)を使って動画広告キャンペーンを自動化し公開
Set
Code
Wait
+
Set
Code
Wait
63 ノードDr. Firas
コンテンツ作成
LinkedInおよびXウイルスのなコンテンツ自動エンジン
AIを使ってLinkedInとXにウイルスのなコンテンツを自動生成して公開する
If
Set
Wait
+
If
Set
Wait
156 ノードDiptamoy Barman
コンテンツ作成
バッチSEOコンテンツ生成とAI画像付きWebflowドラフト作成(テンプレート)
GPT、Gemini画像、Webflowデラフトで行う大量SEOコンテンツ生成
If
Set
Code
+
If
Set
Code
54 ノードDahiana
コンテンツ作成