{
  "name": "Automate AI video creation & multi-platform publishing with Gemini & Creatomate",
  "nodes": [
    {
      "id": "9f2d39f0-806e-45a3-a428-cee0df2a0bf2",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -2512,
        -688
      ]
    },
    {
      "id": "4a6a8224-37cc-401a-bcaf-2132b2b6458b",
      "name": "AI Agent - Create Image From Prompt",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2512,
        -832
      ]
    },
    {
      "id": "1865c8e4-d7f4-4e81-970d-c2e3efc23245",
      "name": "Code - Set Filename",
      "type": "n8n-nodes-base.code",
      "position": [
        -1728,
        -832
      ]
    },
    {
      "id": "dd4f01d5-e61f-49ca-bfec-55c739688a1b",
      "name": "Code - Get Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        -1952,
        -832
      ]
    },
    {
      "id": "d97e6223-0a9b-4f70-8e36-cd81d775eb8e",
      "name": "Code - Clean Json",
      "type": "n8n-nodes-base.code",
      "position": [
        -2176,
        -832
      ]
    },
    {
      "id": "3f7c02cd-a720-4e4a-a45f-c06ab484e7b1",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -2960,
        -848
      ]
    },
    {
      "id": "aad89363-94a6-4e4a-b5cd-e693a8064071",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -3408,
        -848
      ]
    },
    {
      "id": "57894828-b4dc-422c-9cea-e3b1c75e2cb0",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -4000,
        -256
      ]
    },
    {
      "id": "50321720-3057-45dd-b0b1-994f7ce4d4f4",
      "name": "Content Brain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -4000,
        -416
      ]
    },
    {
      "id": "43beb7e4-bcb5-42eb-a85b-516828eed7ad",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -3824,
        -256
      ]
    },
    {
      "id": "16dd8fc5-e84b-4e42-a12f-44ae63480d3d",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -4256,
        -416
      ]
    },
    {
      "id": "a1472269-c3f2-4f53-a3a6-e342c315ec52",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -704,
        -384
      ]
    },
    {
      "id": "6257ce29-c99c-4b44-a430-70b63bc4eac2",
      "name": "Stop and Error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -480,
        -368
      ]
    },
    {
      "id": "7c866b16-17d1-4eb6-aeab-fd05f62a0d75",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2896,
        -16
      ]
    },
    {
      "id": "7ff5142d-309b-4a12-9699-3e9ac55a0d20",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3216,
        -1136
      ],
      "parameters": {
        "width": 2336,
        "height": 496,
        "content": "## Image Generation  \n* Converts prompts into high-quality images using [Pollination AI](https://pollinations.ai/).\n* This is a **Free** to use API that you can integrate with any Image generation wor"
      }
    },
    {
      "id": "9f87b01e-b340-4bbd-8346-502a85e10761",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4080,
        -640
      ],
      "parameters": {
        "width": 432,
        "height": 336,
        "content": "## AI Content Generation & Structuring\n* In **Content Brain**, we define detailed role instructions and prompt logic to generate viral, niche-specific video scripts.\n* You can also change the niche di"
      }
    },
    {
      "id": "d50985ab-a514-4070-9336-da7ab3e09dc0",
      "name": "Creating records in Scenes Table",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -3184,
        -848
      ]
    },
    {
      "id": "d0d6ef3b-9dec-4d15-af71-d03438795621",
      "name": "Setting Values for Image Model",
      "type": "n8n-nodes-base.set",
      "position": [
        -2704,
        -832
      ]
    },
    {
      "id": "4766b699-b631-483c-9d6c-ee625baf8559",
      "name": "Image Create Request - Pollination AI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1488,
        -832
      ]
    },
    {
      "id": "fcbe297e-0d62-4812-8c28-67cea0443f88",
      "name": "Converting Image file for Storing",
      "type": "n8n-nodes-base.code",
      "position": [
        -1248,
        -832
      ]
    },
    {
      "id": "a134b3a8-c07b-48c1-9762-03e177e5a02a",
      "name": "Uploading Image in Airtable",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1056,
        -832
      ]
    },
    {
      "id": "6b2f3a3c-dfd7-4ced-87f9-6ffee28eb949",
      "name": "Get Records for Airtable",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2672,
        -368
      ]
    },
    {
      "id": "fdc235fd-9590-4597-be6c-42930d34f9bd",
      "name": "Cleaning Airtable Output",
      "type": "n8n-nodes-base.code",
      "position": [
        -2464,
        -368
      ]
    },
    {
      "id": "17bbb89e-f9de-47a9-ad54-0c85a4a10acc",
      "name": "Filter - Latest Video file",
      "type": "n8n-nodes-base.filter",
      "position": [
        -2240,
        -368
      ]
    },
    {
      "id": "43a23e03-0523-4f88-993a-a2414d8f0d67",
      "name": "Preparing for Creatomate",
      "type": "n8n-nodes-base.code",
      "position": [
        -1904,
        -368
      ]
    },
    {
      "id": "3bff1af0-f8c3-4ff3-aa80-afd165f77fc8",
      "name": "Template for Creatomate",
      "type": "n8n-nodes-base.code",
      "position": [
        -1648,
        -368
      ]
    },
    {
      "id": "275e939e-e7a0-4c15-aed8-81d699a875ab",
      "name": "Video Rendering -  Creatomate",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1360,
        -368
      ]
    },
    {
      "id": "4d15c9e8-0ad8-4e4e-980a-a47a82beffaa",
      "name": "Wait - 60 secs",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1120,
        -368
      ]
    },
    {
      "id": "0977be6b-c0df-404d-97df-7619c484b2a7",
      "name": "Set Video Title and Description",
      "type": "n8n-nodes-base.set",
      "position": [
        -3424,
        -32
      ]
    },
    {
      "id": "2f473649-572f-4797-a058-dc5e2cd46878",
      "name": "Clean - Details",
      "type": "n8n-nodes-base.code",
      "position": [
        -3168,
        -32
      ]
    },
    {
      "id": "a9613ebf-4cf1-4682-9c9a-29a8868983b7",
      "name": "Merging Complete Video Details",
      "type": "n8n-nodes-base.code",
      "position": [
        -2688,
        -16
      ]
    },
    {
      "id": "c37b26dc-d12a-440d-a954-c55f6308299c",
      "name": "Get Video Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -912,
        -368
      ]
    },
    {
      "id": "d52ff3fa-173e-46af-a80f-404e98022672",
      "name": "Get complete Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2480,
        -16
      ]
    },
    {
      "id": "e0e91192-8b9c-4824-ac8c-da8a74253d28",
      "name": "Upload on Instagram",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2096,
        176
      ]
    },
    {
      "id": "934db3e9-9d06-4c68-ac9f-26130877e832",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2752,
        -1040
      ],
      "parameters": {
        "width": 528,
        "height": 304,
        "content": "## Image Prompt & Attributes\n* In **Setting Values for Image Model**, we define key attributes like model type, width, and height for image generation.\n* In **AI Agent - Create Image From Prompt**, we"
      }
    },
    {
      "id": "047e5730-4833-440a-ab7c-8ade0445a171",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1552,
        -1040
      ],
      "parameters": {
        "width": 624,
        "height": 304,
        "content": "## Image Generation & Storage\n* **Image Create Request – Pollination AI** → Generates images from prompts using defined model settings. \n* **Converting Image file for Storing** → Converts the image to"
      }
    },
    {
      "id": "6b247893-39b2-4a6f-910c-5db946684629",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2192,
        -1040
      ],
      "parameters": {
        "width": 592,
        "height": 304,
        "content": "## Image Prompt Processing & File Setup\n* In **Clean Json**, we extract and sanitize the raw AI response to get clean image prompts.\n* In **Get Prompt**, we structure each image prompt with model attr"
      }
    },
    {
      "id": "53339334-83ce-4646-9d1e-6e2833e073c8",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3488,
        -176
      ],
      "parameters": {
        "width": 448,
        "height": 240,
        "content": "## Video Metadata Handling\n* **Set Video Title and Description** → Extracts video_title and description from the output and saves them.\n* **Clean – Details** → Flattens and cleans metadata so only pla"
      }
    },
    {
      "id": "13b3ee62-dceb-4b54-88be-a4ddda00d05b",
      "name": "Create Record in Video Table",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -3456,
        -416
      ]
    },
    {
      "id": "a00265d1-c17a-485a-9788-510df0909e41",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2736,
        -544
      ],
      "parameters": {
        "width": 688,
        "height": 272,
        "content": "## Image Prompt Processing & File Setup\n* **Get Records for Airtable** → Fetches records from Airtable using your API key. Make sure to update the **base ID**, **table ID**, and **token** before use.\n"
      }
    },
    {
      "id": "db42d00f-e48e-45e1-b026-145ff728086a",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2000,
        -560
      ],
      "parameters": {
        "width": 528,
        "height": 304,
        "content": "## Preparing Video Template (Creatomate)\n* **Preparing for Creatomate** → Collects scene data from Airtable, sorts by Scene Number, and maps each scene’s text + image into a structured JSON object (Ti"
      }
    },
    {
      "id": "46e76eb0-6dcf-4c60-81a5-15ee1fa34404",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        -560
      ],
      "parameters": {
        "width": 624,
        "height": 288,
        "content": "## Video Rendering & Status Check (Creatomate)\n* **Video Rendering** – Creatomate → Sends the template + modifications to Creatomate API to generate the final video. \n* Update the API key and template"
      }
    },
    {
      "id": "a5ea8cd4-604a-4e86-b33b-c1e1e2a6f90e",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3216,
        -528
      ],
      "parameters": {
        "width": 432,
        "height": 240,
        "content": "## Video Generation Workflow\n* Refer [Airtable Docs](https://airtable.com/developers/web/api/introduction) for more Get Records API\n* Creatomate provides **50 Free** credits on a new account \n* Refer "
      }
    },
    {
      "id": "06c37fde-8377-48e3-a9ba-967455dfc8a1",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2928,
        -160
      ],
      "parameters": {
        "width": 576,
        "height": 240,
        "content": "## Video Metadata Handling\n* **Merge** → Combines different data streams (e.g., text + metadata) into one object.\n* **Get Complete Video** → Fetches the final rendered video file as **Creatomate** pro"
      }
    },
    {
      "id": "68128cd0-9435-4fed-8e1e-39792cd76b17",
      "name": "Upload on YouTube",
      "type": "n8n-nodes-base.youTube",
      "position": [
        -2096,
        -80
      ]
    },
    {
      "id": "95879a79-2996-40de-bc74-82bb64467bab",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        -160
      ],
      "parameters": {
        "width": 448,
        "height": 256,
        "content": "## Upload on YouTube\n* **Purpose** → Publishes the final rendered video directly to your connected YouTube channel.\n* **Inputs Used** → video_title (title) and description (from earlier workflow steps"
      }
    },
    {
      "id": "b83f05cd-caec-49bc-8abb-874e9e2607dd",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        144
      ],
      "parameters": {
        "width": 448,
        "height": 256,
        "content": "## Upload on Instagram (via Upload-Post API)\n* **Purpose** → Publishes the generated video to Instagram using Upload-Post.com API.\n* You can add multiple platforms (twitter, facebook, linkedin, snapch"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Merging Complete Video Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "Stop and Error",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait - 60 secs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Creating records in Scenes Table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content Brain": {
      "main": [
        [
          {
            "node": "Set Video Title and Description",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create Record in Video Table",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait - 60 secs": {
      "main": [
        [
          {
            "node": "Get Video Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean - Details": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Get Records for Airtable",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Setting Values for Image Model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video Status": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Clean Json": {
      "main": [
        [
          {
            "node": "Code - Get Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Get Prompt": {
      "main": [
        [
          {
            "node": "Code - Set Filename",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get complete Video": {
      "main": [
        [
          {
            "node": "Upload on Instagram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Upload on YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Set Filename": {
      "main": [
        [
          {
            "node": "Image Create Request - Pollination AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Template for Creatomate": {
      "main": [
        [
          {
            "node": "Video Rendering -  Creatomate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cleaning Airtable Output": {
      "main": [
        [
          {
            "node": "Filter - Latest Video file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Records for Airtable": {
      "main": [
        [
          {
            "node": "Cleaning Airtable Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Content Brain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Preparing for Creatomate": {
      "main": [
        [
          {
            "node": "Template for Creatomate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Content Brain",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent - Create Image From Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Filter - Latest Video file": {
      "main": [
        [
          {
            "node": "Preparing for Creatomate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Uploading Image in Airtable": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video Rendering -  Creatomate": {
      "main": [
        [
          {
            "node": "Wait - 60 secs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merging Complete Video Details": {
      "main": [
        [
          {
            "node": "Get complete Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Setting Values for Image Model": {
      "main": [
        [
          {
            "node": "AI Agent - Create Image From Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Video Title and Description": {
      "main": [
        [
          {
            "node": "Clean - Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Creating records in Scenes Table": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Converting Image file for Storing": {
      "main": [
        [
          {
            "node": "Uploading Image in Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent - Create Image From Prompt": {
      "main": [
        [
          {
            "node": "Code - Clean Json",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Content Brain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Create Request - Pollination AI": {
      "main": [
        [
          {
            "node": "Converting Image file for Storing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}