{
  "name": "Generate AI short-form health videos with Gemini, Veo 3 and Google Sheets",
  "nodes": [
    {
      "id": "a92c16ba-5519-43e0-a5a6-94afa8bd7ab5",
      "name": "Collect Viral Ideas",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -656,
        -640
      ]
    },
    {
      "id": "ae1d510b-497b-4119-b72c-2b4968f0dd01",
      "name": "Scrape Viral Health Content (Apify)",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        -416,
        -640
      ]
    },
    {
      "id": "6acb8852-e04b-4753-b0f3-50b1859c1796",
      "name": "Normalize Viral Content Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -208,
        -640
      ]
    },
    {
      "id": "81dc0f7b-77de-4f74-92e1-3486922004ca",
      "name": "Save Viral Ideas to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        0,
        -640
      ]
    },
    {
      "id": "5b2dfa80-95b5-49d7-a327-03dd5a41334a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -768
      ],
      "parameters": {
        "width": 1552,
        "height": 368,
        "content": "## Viral Content Collection\nAutomatically collects viral health-related content from external sources on a schedule. The data is cleaned, normalized, and stored in Google Sheets to build a reusable da"
      }
    },
    {
      "id": "ded4cdfd-636f-479e-bd97-81366cd7cf5a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -400
      ],
      "parameters": {
        "width": 1552,
        "height": 576,
        "content": "## Idea Analysis & Script Generation\nAnalyzes each viral idea to identify hooks, angles, and engagement patterns. AI models are used to generate structured, short-form video scripts optimized for heal"
      }
    },
    {
      "id": "3e55b2c3-c150-4957-9943-8e15e776ac16",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        176
      ],
      "parameters": {
        "width": 1552,
        "height": 496,
        "content": "## AI Video Rendering (Veo 3)\nConverts AI-generated scripts into videos using the Veo 3 API. It handles video creation, rendering status checks, retries, and retrieval of completed video assets automa"
      }
    },
    {
      "id": "ba01980e-e1a1-423e-a2af-19e5a90cdbfa",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        672
      ],
      "parameters": {
        "width": 1552,
        "height": 384,
        "content": "## Video Post-processing\nProcesses rendered video assets, including aggregation, ordering, and optional merging of clips. It prepares the final video output ready for publishing."
      }
    },
    {
      "id": "7625223f-15b7-40af-bac9-6e1a45dd8bc4",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        1056
      ],
      "parameters": {
        "width": 1552,
        "height": 384,
        "content": "## Publishing & Tracking\nPublishes completed videos to social platforms and updates Google Sheets with publishing status and results. It ensures every video is tracked from idea to distribution."
      }
    },
    {
      "id": "da79dcc9-085a-4fb0-9f77-5ebfea913b0e",
      "name": "Process Viral Ideas",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -688,
        -64
      ]
    },
    {
      "id": "44502225-8499-4e2c-9171-679860443a60",
      "name": "Load Viral Ideas from Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -448,
        -64
      ]
    },
    {
      "id": "e07844cd-f611-4bf9-8af6-dbd0299e97c2",
      "name": "Analyze Viral Potential & Hook",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        -192,
        -64
      ]
    },
    {
      "id": "26e1b8b9-c422-4478-98f0-cd335bfd1065",
      "name": "Reasoning / Prompt Logic",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        128,
        -288
      ]
    },
    {
      "id": "9da2b453-19b7-4462-be88-10d2619089a4",
      "name": "Gemini LLM",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -96,
        -272
      ]
    },
    {
      "id": "ac5fa7d2-8e9e-458d-8530-fb4962927624",
      "name": "Parse Script & Video Parameters",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        288,
        -288
      ]
    },
    {
      "id": "ce4ebf91-5530-4f5b-a97d-746c984c3f7e",
      "name": "Generate AI Video Script (Health Niche)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        48,
        -64
      ]
    },
    {
      "id": "db2628d1-0eb6-4d36-a96d-c7f77b1bd6df",
      "name": "Split Ideas into Video Jobs",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -656,
        384
      ]
    },
    {
      "id": "af537224-904b-457e-b812-96e0ccf70dff",
      "name": "Loop Through Video Jobs",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -464,
        384
      ]
    },
    {
      "id": "8e4b1acc-ac0e-4370-974b-bc028dd58e24",
      "name": "Create AI Video (Veo 3 API)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -288,
        384
      ]
    },
    {
      "id": "1755bbd4-65af-4c03-a33d-a1492bd64e15",
      "name": "Wait for Video Rendering",
      "type": "n8n-nodes-base.wait",
      "position": [
        -48,
        384
      ]
    },
    {
      "id": "c6dd3739-bc1c-4f7d-9c81-361336d3ddd4",
      "name": "Retrieve Rendered Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        176,
        384
      ]
    },
    {
      "id": "00a35323-b6f7-4633-add2-b6ed80ade34a",
      "name": "Check Rendering Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        400,
        368
      ]
    },
    {
      "id": "3975a7ee-3648-4c2b-bfc1-a0d296efff4b",
      "name": "Aggregate Video Assets",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -320,
        816
      ]
    },
    {
      "id": "ec07d5db-88a6-4270-b6c1-77b423b81aea",
      "name": "Prepare Video Metadata & Order",
      "type": "n8n-nodes-base.code",
      "position": [
        -144,
        816
      ]
    },
    {
      "id": "1930977d-1d08-458d-9732-3d3c6ed2a399",
      "name": "Merge Video Clips",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        32,
        816
      ]
    },
    {
      "id": "27169d04-0bbc-4e26-9b18-e2ec14680db5",
      "name": "Publish Video to Facebook",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -256,
        1184
      ]
    },
    {
      "id": "5a97a1a2-f375-4d4b-a0b8-46bfcef1e897",
      "name": "Update Status & Results in Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -48,
        1184
      ]
    },
    {
      "id": "c93397c2-3cbd-4df9-9b16-9c060bce46a9",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1216,
        -768
      ],
      "parameters": {
        "width": 480,
        "height": 1056,
        "content": "# 🛠️ Workflow Setup Guide\n\nAuthor: [GiangxAI](https://www.youtube.com/@giangxai.official)\n\n## How it works\n- Viral health content ideas are collected automatically on a schedule  \n- Ideas are normaliz"
      }
    }
  ],
  "connections": {
    "Gemini LLM": {
      "ai_languageModel": [
        [
          {
            "node": "Generate AI Video Script (Health Niche)",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Parse Script & Video Parameters",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge Video Clips": {
      "main": [
        [
          {
            "node": "Publish Video to Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect Viral Ideas": {
      "main": [
        [
          {
            "node": "Scrape Viral Health Content (Apify)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Viral Ideas": {
      "main": [
        [
          {
            "node": "Load Viral Ideas from Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Video Assets": {
      "main": [
        [
          {
            "node": "Prepare Video Metadata & Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Rendering Status": {
      "main": [
        [
          {
            "node": "Wait for Video Rendering",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Through Video Jobs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Through Video Jobs": {
      "main": [
        [
          {
            "node": "Aggregate Video Assets",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create AI Video (Veo 3 API)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Rendered Video": {
      "main": [
        [
          {
            "node": "Check Rendering Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reasoning / Prompt Logic": {
      "ai_tool": [
        [
          {
            "node": "Generate AI Video Script (Health Niche)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Video Rendering": {
      "main": [
        [
          {
            "node": "Retrieve Rendered Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish Video to Facebook": {
      "main": [
        [
          {
            "node": "Update Status & Results in Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create AI Video (Veo 3 API)": {
      "main": [
        [
          {
            "node": "Wait for Video Rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Viral Ideas from Sheet": {
      "main": [
        [
          {
            "node": "Analyze Viral Potential & Hook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Ideas into Video Jobs": {
      "main": [
        [
          {
            "node": "Loop Through Video Jobs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Viral Content Data": {
      "main": [
        [
          {
            "node": "Save Viral Ideas to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Viral Potential & Hook": {
      "main": [
        [
          {
            "node": "Generate AI Video Script (Health Niche)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Video Metadata & Order": {
      "main": [
        [
          {
            "node": "Merge Video Clips",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Script & Video Parameters": {
      "ai_outputParser": [
        [
          {
            "node": "Generate AI Video Script (Health Niche)",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Viral Health Content (Apify)": {
      "main": [
        [
          {
            "node": "Normalize Viral Content Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Video Script (Health Niche)": {
      "main": [
        [
          {
            "node": "Split Ideas into Video Jobs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}