{
  "id": "fx4X8nuBgnKzXMrS",
  "name": "Automate short video creation using Sora 2 and n8n",
  "tags": [],
  "nodes": [
    {
      "id": "63d35be6-2430-424b-bd7a-2be8cb0e0ac4",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        416,
        -2704
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-3-pro-preview"
      },
      "typeVersion": 1
    },
    {
      "id": "b32082ee-2e38-4299-b510-83089ba92839",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        848,
        -2704
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "738adec7-07cf-4f03-945e-ee531f6e2eea",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        544,
        -2752
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"title\": {\n      \"type\": \"string\",\n      \"description\": \"A short, exciting, descriptive, simplistic YouTube Shorts title\"\n    },\n    \"description\": {\n      \"type\": \"string\",\n      \"description\": \"1-3 sentences summarizing the crazy water event\"\n    },\n    \"prompt\": {\n      \"type\": \"string\",\n      \"description\": \"A detailed AI video generation prompt\"\n    }\n  },\n  \"required\": [\"title\", \"description\", \"prompt\"]\n}\n"
      },
      "typeVersion": 1.3
    },
    {
      "id": "96e94b4e-2906-4e15-bcd0-82acabf46e41",
      "name": "Create post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -192,
        -1792
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "23867",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/23867",
          "cachedResultName": "kytagiang"
        },
        "postContentText": "={{ $('Format AI output for video generation').item.json.Description }}",
        "postContentMediaUrls": "={{ $json.generated_video[0].video_url }}"
      },
      "typeVersion": 2
    },
    {
      "id": "8c3284a8-3ec8-469a-86f3-389cc14b3298",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        688,
        -2176
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Processing",
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "f59af75f-b4aa-4c00-9c8c-5e89ea224cff",
                    "operator": {
                      "type": "number",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.status }}",
                    "rightValue": 1
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Completed",
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "95b628d6-c13a-49cc-8d8e-7bdd3a77c3ca",
                    "operator": {
                      "type": "number",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.status }}",
                    "rightValue": 2
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Failed",
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "43a3ecb8-6e35-434c-8364-bda3429b7a57",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "3"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {},
        "looseTypeValidation": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "7524d163-0a3e-43f0-89a6-cc282a2fd15a",
      "name": "Analyze video",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        128,
        -2496
      ],
      "parameters": {
        "text": "Detailed video description including detailed analysis of setting and characters (no description with watermark if any)",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-3-pro-preview",
          "cachedResultName": "models/gemini-3-pro-preview"
        },
        "options": {},
        "resource": "video",
        "operation": "analyze",
        "videoUrls": "={{ $json.VideoURL }}"
      },
      "typeVersion": 1
    },
    {
      "id": "d316f70b-28aa-44fb-80b1-13e3849592e0",
      "name": "Run an Actor and get dataset",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        80,
        -3104
      ],
      "parameters": {
        "actorId": {
          "__rl": true,
          "mode": "list",
          "value": "GdWCkxBtKWOsKjdch",
          "cachedResultUrl": "https://console.apify.com/actors/GdWCkxBtKWOsKjdch/input",
          "cachedResultName": "TikTok Scraper (clockworks/tiktok-scraper)"
        },
        "timeout": {},
        "operation": "Run actor and get dataset",
        "customBody": "={\n    \"excludePinnedPosts\": false,\n    \"profileScrapeSections\": [\n        \"videos\"\n    ],\n    \"profileSorting\": \"popular\",\n    \"profiles\": [\n        \"@fluffy.fails5\"\n    ],\n    \"proxyCountryCode\": \"VN\",\n    \"resultsPerPage\": 10,\n    \"scrapeRelatedVideos\": false,\n    \"shouldDownloadAvatars\": false,\n    \"shouldDownloadCovers\": false,\n    \"shouldDownloadMusicCovers\": false,\n    \"shouldDownloadSlideshowImages\": false,\n    \"shouldDownloadSubtitles\": false,\n    \"shouldDownloadVideos\": true,\n    \"videoKvStoreIdOrName\": \"my-tiktok-ASMR\"\n}",
        "authentication": "apifyOAuth2Api"
      },
      "typeVersion": 1
    },
    {
      "id": "dbefe336-55fc-4728-89ab-b1ec34ac52bc",
      "name": "Viral Content",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        592,
        -3104
      ],
      "parameters": {
        "columns": {
          "value": {
            "Save": "={{ $json.Save }}",
            "View": "={{ $json.View }}",
            "Likes": "={{ $json.Likes }}",
            "Shares": "={{ $json.Shares }}",
            "Status": "Pending",
            "Caption": "={{ $json.Caption }}",
            "Hasgtag": "={{ $json.Hasgtag }}",
            "Username": "={{ $json.Username }}",
            "VideoURL": "={{ $json.VideoURL[0] }}",
            "Date Post": "={{ $json['Date Post'] }}",
            "Link user": "={{ $json['Link user'] }}",
            "Link video": "={{ $json['Link video'] }}"
          },
          "schema": [
            {
              "id": "Caption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date Post",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Date Post",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Username",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Username",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Link user",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Link user",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Link video",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Link video",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "VideoURL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "VideoURL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Likes",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Likes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Shares",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Shares",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "View",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "View",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Save",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Save",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Hasgtag",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Hasgtag",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1AvE7tSFxcIHXN7xLwFNvMrAeI8J3wMPo-cs0TFrPgPA/edit#gid=0",
          "cachedResultName": "Trang t\u00ednh1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1AvE7tSFxcIHXN7xLwFNvMrAeI8J3wMPo-cs0TFrPgPA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1AvE7tSFxcIHXN7xLwFNvMrAeI8J3wMPo-cs0TFrPgPA/edit?usp=drivesdk",
          "cachedResultName": "Camera home viral content"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "7eff39dc-b174-4882-91e4-4bf51187ad2b",
      "name": "Get ViralContent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -96,
        -2496
      ],
      "parameters": {
        "options": {
          "returnFirstMatch": true
        },
        "filtersUI": {
          "values": [
            {
              "lookupValue": "Pending",
              "lookupColumn": "Status"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1AvE7tSFxcIHXN7xLwFNvMrAeI8J3wMPo-cs0TFrPgPA/edit#gid=0",
          "cachedResultName": "Trang t\u00ednh1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1AvE7tSFxcIHXN7xLwFNvMrAeI8J3wMPo-cs0TFrPgPA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1AvE7tSFxcIHXN7xLwFNvMrAeI8J3wMPo-cs0TFrPgPA/edit?usp=drivesdk",
          "cachedResultName": "Camera home viral content"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "378ecb1e-4964-402c-9b16-835a4dfc78b7",
      "name": "Update row Viral Content",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        16,
        -1792
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Done",
            "row_number": "={{ $('Get ViralContent').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "Caption",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date Post",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Date Post",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Username",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Username",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Link user",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Link user",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Link video",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Link video",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "VideoURL",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "VideoURL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Likes",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Likes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Shares",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Shares",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "View",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "View",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Save",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Save",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Hasgtag",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Hasgtag",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1AvE7tSFxcIHXN7xLwFNvMrAeI8J3wMPo-cs0TFrPgPA/edit#gid=0",
          "cachedResultName": "Trang t\u00ednh1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1AvE7tSFxcIHXN7xLwFNvMrAeI8J3wMPo-cs0TFrPgPA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1AvE7tSFxcIHXN7xLwFNvMrAeI8J3wMPo-cs0TFrPgPA/edit?usp=drivesdk",
          "cachedResultName": "Camera home viral content"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a6c17533-59f7-4503-a6f4-5786f6da4598",
      "name": "Get Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        448,
        -2160
      ],
      "parameters": {
        "url": "=https://api.geminigen.ai/uapi/v1/history/{{ $json.uuid }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.3
    },
    {
      "id": "ca8b9fa0-f7bd-4cc5-9fce-ee809d8e1103",
      "name": "Create Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -32,
        -2160
      ],
      "parameters": {
        "url": "https://api.geminigen.ai/uapi/v1/video-gen/sora",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "prompt",
              "value": "={{ $json.Prompt }}"
            },
            {
              "name": "model",
              "value": "sora-2"
            },
            {
              "name": "resolution",
              "value": "small"
            },
            {
              "name": "duration",
              "value": "10"
            },
            {
              "name": "aspect_ratio",
              "value": "portrait"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.3
    },
    {
      "id": "459565b4-8e65-4ccf-ab34-13222f753a0e",
      "name": "Scheduled content execution",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -160,
        -3104
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "72ea7ad2-de61-4dae-8a9c-08466e2b2c9f",
      "name": "Analyze idea and generate video metadata",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        512,
        -2496
      ],
      "parameters": {
        "text": "={{ $json.content.parts[0].text }}",
        "options": {
          "systemMessage": "=You are an AI that generates short-form video prompts based on the input description provided.\n\nThe variable below will contain the entire video description:\n\n{{ $json.content.parts[0].text }}\nYour ONLY output must be a JSON object:\n\n{\n  \"title\": \"...\",\n  \"description\": \"...\",\n  \"prompt\": \"...\"\n}\n\nRules:\n- \"title\": short, eye-catching, descriptive.\n- \"description\": 1\u20133 fun sentences summarizing the event.\n- \"prompt\": detailed AI video generation prompt fully describing the scene using ONLY the provided video description.\n- Output ONLY valid JSON.\n- No explanations, no extra text, no markdown.\nStrictly adhere to the provided JSON Schema for your ONLY output. Do not include any text, markdown, or explanation outside of the JSON object."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3,
      "alwaysOutputData": false
    },
    {
      "id": "336fa5bf-81e7-4576-a39b-1b7c2e70aef6",
      "name": "Wait for video rendering",
      "type": "n8n-nodes-base.wait",
      "position": [
        192,
        -2160
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "2ac2a11f-931a-487f-b1de-0a4c5e0c41ae",
      "name": "Normalize scraped content data",
      "type": "n8n-nodes-base.set",
      "position": [
        352,
        -3104
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "2927eb2d-7868-4945-b7c7-163782fc0044",
              "name": "Caption",
              "type": "string",
              "value": "={{ $json.text }}"
            },
            {
              "id": "8b7c1f39-207f-4433-9694-9aa4c5ac8c55",
              "name": "Date Post",
              "type": "string",
              "value": "={{ $json.createTimeISO.toDateTime().format('dd/LL/yyyy') }}"
            },
            {
              "id": "3be36a1b-f1c3-4b44-b265-bd79ab6bddbe",
              "name": "Username",
              "type": "string",
              "value": "={{ $json.authorMeta.name }}"
            },
            {
              "id": "25128c7b-b6e0-4c63-8bcb-c71866976737",
              "name": "Link user",
              "type": "string",
              "value": "={{ $json.authorMeta.profileUrl }}"
            },
            {
              "id": "ada46de7-8651-422a-bf7a-a958aad7ce28",
              "name": "Link video",
              "type": "string",
              "value": "={{ $json.webVideoUrl }}"
            },
            {
              "id": "92d4e87b-9cc9-4609-8e17-383c61ca3058",
              "name": "VideoURL",
              "type": "array",
              "value": "={{ $json.mediaUrls }}"
            },
            {
              "id": "1f428824-106f-49f3-8816-92c7ff9ef324",
              "name": "Likes",
              "type": "number",
              "value": "={{ $json.diggCount }}"
            },
            {
              "id": "5f1c9240-7a37-424e-8318-333c8de42797",
              "name": "Shares",
              "type": "number",
              "value": "={{ $json.shareCount }}"
            },
            {
              "id": "56c177a1-b382-4674-8308-45f9423a6e54",
              "name": "View",
              "type": "number",
              "value": "={{ $json.playCount }}"
            },
            {
              "id": "73cb5bb3-bdbf-406b-a778-bf36e935ead9",
              "name": "Save",
              "type": "number",
              "value": "={{ $json.collectCount }}"
            },
            {
              "id": "a8bbcfbe-7c37-4f78-9e9d-ad9387a581d1",
              "name": "Hasgtag",
              "type": "array",
              "value": "={{ $json.hashtags }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c6944486-c9b3-41c8-ae9f-0e0c69c911a3",
      "name": "Format AI output for video generation",
      "type": "n8n-nodes-base.set",
      "position": [
        912,
        -2496
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "35a066f0-a4a1-4360-9ae6-e23f0aa1fd98",
              "name": "Title",
              "type": "string",
              "value": "={{ $json.output.properties.title }}"
            },
            {
              "id": "018e9be2-bff8-498d-92fe-e874665d80a4",
              "name": "Description",
              "type": "string",
              "value": "={{ $json.output.properties.description.description }}"
            },
            {
              "id": "47faa3d2-534f-469b-abd1-ca76841175e9",
              "name": "Prompt",
              "type": "string",
              "value": "={{ $json.output.properties.prompt.description }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f7e0cc6b-2f5b-4c30-9f75-3b1ef03cb1a5",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -3280
      ],
      "parameters": {
        "color": 4,
        "width": 832,
        "height": 416,
        "content": "## Content discovery\nCollect viral content ideas from external sources.\nnts/sticky-notes/)"
      },
      "typeVersion": 1
    },
    {
      "id": "afecfcc8-5182-4b03-a0c6-55a18e746765",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -3280
      ],
      "parameters": {
        "color": 4,
        "width": 656,
        "height": 416,
        "content": "## Data storage\nStore viral content ideas in Google Sheets. \n"
      },
      "typeVersion": 1
    },
    {
      "id": "b13109e1-ae84-4f79-b72b-37ad3d38beed",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -2832
      ],
      "parameters": {
        "color": 7,
        "width": 416,
        "height": 528,
        "content": "## Content selection\nPick one unprocessed idea from Google Sheets.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "33c1f6be-9899-4697-be8b-6c11bcb883e3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        -2832
      ],
      "parameters": {
        "color": 7,
        "width": 1072,
        "height": 528,
        "content": "##  Content analysis\nTurn the idea into a title, description, and video prompt.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "1ee65f14-41df-411b-b854-2a58e86ea2c7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -2304
      ],
      "parameters": {
        "color": 6,
        "width": 1488,
        "height": 384,
        "content": "## Video generation\nSend the prompt, wait for the video, and check the result.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b8e2bd10-c62c-4d89-80dd-d6e888ac5716",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -1920
      ],
      "parameters": {
        "color": 7,
        "width": 1488,
        "height": 288,
        "content": "## Publishing\nPost the video and update the result.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8813e7fe-ed8e-4679-b0f6-a9a15bf5b9fa",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1072,
        -3280
      ],
      "parameters": {
        "width": 656,
        "height": 864,
        "content": "## Setup Guide\n\n**Author:** [GiangxAI](https://www.youtube.com/@giangxai.official)\n\n## How it works\nThis workflow collects ideas, generates short videos using Sora 2, and publishes the results automatically. Google Sheets is used to manage input data and track status.\n\n## Setup steps\n\nFollow the steps below to get the workflow running:\n\n### Step 1: Copy the [Google Sheets](https://docs.google.com/spreadsheets/d/1AvE7tSFxcIHXN7xLwFNvMrAeI8J3wMPo-cs0TFrPgPA/edit) template  \nCreate your own copy and connect it to all Google Sheets nodes in the workflow.\n\n### Step 2: Configure API credentials  \nAdd your API keys for the AI model, video generation service, and posting platform in n8n Credentials.\n\n### Step 3: Review HTTP Request nodes  \nMake sure all video generation and status-check endpoints are correctly configured.\n\n### Step 4: Adjust schedules  \nSet the Schedule Trigger nodes based on how often you want to generate and publish content.\n\n### Step 5: Test with sample data  \nAdd a few test rows to Google Sheets and run the workflow to verify the full pipeline.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d324288c-5603-434d-b3bd-a8f3557902fe",
      "name": "Scheduled video generation",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -304,
        -2496
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 10
            }
          ]
        }
      },
      "typeVersion": 1.3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b1772d43-cfbd-4f92-b32a-5418f2893ae1",
  "connections": {
    "Think": {
      "ai_tool": [
        [
          {
            "node": "Analyze idea and generate video metadata",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Wait for video rendering",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create post": {
      "main": [
        [
          {
            "node": "Update row Viral Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Video": {
      "main": [
        [
          {
            "node": "Wait for video rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze video": {
      "main": [
        [
          {
            "node": "Analyze idea and generate video metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get ViralContent": {
      "main": [
        [
          {
            "node": "Analyze video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze idea and generate video metadata",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze idea and generate video metadata",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Wait for video rendering": {
      "main": [
        [
          {
            "node": "Get Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scheduled video generation": {
      "main": [
        [
          {
            "node": "Get ViralContent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scheduled content execution": {
      "main": [
        [
          {
            "node": "Run an Actor and get dataset",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run an Actor and get dataset": {
      "main": [
        [
          {
            "node": "Normalize scraped content data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize scraped content data": {
      "main": [
        [
          {
            "node": "Viral Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format AI output for video generation": {
      "main": [
        [
          {
            "node": "Create Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze idea and generate video metadata": {
      "main": [
        [
          {
            "node": "Format AI output for video generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}