{
  "name": "Veo3 Instagram Reel Generator",
  "nodes": [
    {
      "id": "70441673-ac1f-42aa-a2ca-90259756e20d",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        140,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "bdfec64e-f8af-4f14-838e-41e13dba005e",
      "name": "Prompt Engineer",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        440,
        0
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "chatgpt-4o-latest",
          "cachedResultName": "CHATGPT-4O-LATEST"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a creative video prompt generator for short-form ads (e.g., Instagram, TikTok). Based on:\n\nThe chat input of the user\n\nYour task is to craft a concise, visually descriptive video generation prompt suitable for input into the Seedance API.\n\n🛑 Do not include any extra explanation, formatting, or commentary. Your entire output must be the exact prompt to pass into the video generator.\n\nThe prompt should:\n– Be under 100 words\n– Describe the visual elements, tone, and motion clearly\n– Reflect the product or brand type, and\n– Incorporate the marketing trend as the core concept or hook\n\nExample of your expected output format:\n\n“A close-up slow-motion shot of a glass perfume bottle as morning sunlight filters through mist. The background shows soft-focus wildflowers, matching the theme of natural beauty and calm. Overlay text: ‘Nature’s Elegance. Reinvented.’ Trend-inspired styling based on the ‘quiet luxury’ aesthetic. For Instagram. 5 seconds.”"
            },
            {
              "content": "={{ $json.chatInput }}"
            }
          ]
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "ee4ddd43-5f20-45f0-986c-ec9f5644cacf",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1540,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d743f69a-1275-412f-9a0f-bea4a9b833ea",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "processing"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7ba3650c-8bc8-4ee8-bc60-0f4c9002f768",
      "name": "Wait 30 Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        1040,
        0
      ],
      "parameters": {
        "amount": 30
      },
      "typeVersion": 1.1
    },
    {
      "id": "7d2ceb2b-1da4-48cb-b799-023ebf2a03c5",
      "name": "Wait 30 secs",
      "type": "n8n-nodes-base.wait",
      "position": [
        1360,
        200
      ],
      "parameters": {
        "amount": 30
      },
      "typeVersion": 1.1
    },
    {
      "id": "a8efadbb-40b4-47ed-abf0-cdd5645f2f23",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2160,
        20
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Ready to Post",
            "Caption": "={{ $json.message.content }}",
            "Video URL (google drive)": "={{ $('If').item.json.data.outputs[0] }}",
            "Video Description / Prompt": "={{ $('Prompt Engineer').item.json.message.content }}"
          },
          "schema": [
            {
              "id": "Video Description / Prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Video Description / Prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Video URL (google drive)",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Video URL (google drive)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Caption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": "",
        "documentId": ""
      },
      "typeVersion": 4.6
    },
    {
      "id": "6f3b6899-4fb4-4f68-a2e3-eca57158fe1b",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1760,
        20
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "GPT-4.1"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Based on this video generation prompt, create an impactful accompanying caption for the Instagram Post {{ $('Prompt Engineer').item.json.message.content }}"
            },
            {
              "role": "system",
              "content": "You're an Instagram Caption copywriter. You'll receive a set of video prompt message that is used for generating an Instagram 5 second reel video. Your job is to write an effective accompanying caption. Language style should be playful and impactful."
            }
          ]
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "eb05f1a4-a7c4-4ee0-a541-6b925cbc2def",
      "name": "Veo3 Post Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        860,
        0
      ],
      "parameters": {
        "url": "https://api.wavespeed.ai/api/v3/google/veo3-fast",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "aspect_ratio",
              "value": "9:16"
            },
            {
              "name": "duration",
              "value": "8"
            },
            {
              "name": "enable_prompt_expansion",
              "value": "true"
            },
            {
              "name": "generate_audio",
              "value": "false"
            },
            {
              "name": "prompt",
              "value": "={{ $json.message.content }}"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "ffa9681c-41ed-4728-96a8-4b8fcd5fde64",
      "name": "Veo3 Get Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1320,
        0
      ],
      "parameters": {
        "url": "=https://api.wavespeed.ai/api/v3/predictions/{{ $json.data.id }}/result",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "9a4a7aad-5f67-492e-a1c3-c40d578f8c09",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -240
      ],
      "parameters": {
        "width": 380,
        "height": 820,
        "content": "Chat Trigger"
      },
      "typeVersion": 1
    },
    {
      "id": "41420558-929e-44bd-a675-0cac5d19f78d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -240
      ],
      "parameters": {
        "color": 2,
        "width": 380,
        "height": 820,
        "content": "Video Prompt Engineer Agent"
      },
      "typeVersion": 1
    },
    {
      "id": "7d79a5f6-e796-49f5-bfd8-54edc7f18830",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -240
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 820,
        "content": "Veo3 Post Request & Wait"
      },
      "typeVersion": 1
    },
    {
      "id": "5369fc7f-fa7d-405f-aa4b-74b4196dc247",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -240
      ],
      "parameters": {
        "color": 3,
        "width": 520,
        "height": 820,
        "content": "Veo3 Get Request Loop"
      },
      "typeVersion": 1
    },
    {
      "id": "399560b1-9a11-4225-8415-05df19047e09",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1740,
        -240
      ],
      "parameters": {
        "color": 5,
        "width": 340,
        "height": 820,
        "content": "Caption Generator"
      },
      "typeVersion": 1
    },
    {
      "id": "16e21207-c951-4e9d-9eb0-8a50032cd93f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2100,
        -240
      ],
      "parameters": {
        "color": 4,
        "width": 340,
        "height": 820,
        "content": "Update to Google Sheet"
      },
      "typeVersion": 1
    },
    {
      "id": "bbdb2515-5769-4bac-b179-2c1c5e48d29d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -740,
        -260
      ],
      "parameters": {
        "color": 5,
        "width": 700,
        "height": 960,
        "content": "🎬 Veo3 Instagram Reel Generator – AI-Powered Ad Creation in Minutes\nDescription:\nThis no-code workflow transforms your creative brief into an engaging Instagram Reel using OpenAI and Veo3 API (via Wavespeed) — fully automated in n8n. Just type a product, theme, or trend via chat, and get a short-form video plus caption delivered and logged, ready to post.\n\nPerfect for marketers, creators, and content teams looking to scale their ad content output without hiring editors or creative agencies.\n\nWatch step-by-step build video tutorial here:\nhttps://www.youtube.com/@Automatewithmarc\n\n⚙️ How It Works:\n💬 Chat Trigger\n Start by sending a message like “Create an ad for a minimalist perfume brand using the ‘quiet luxury’ trend.”\n\n🧠 Prompt Engineer (ChatGPT)\n Generates a 5–8 second descriptive video prompt suitable for Veo3 based on your input — including visual tone, motion, and hook.\n\n📡 API Call to Veo3 via Wavespeed\n Submits the prompt to create a short video (9:16 ratio, ~8 seconds), then polls for the final video URL.\n\n✍️ Caption Generator (GPT)\n Creates an Instagram-friendly caption to pair with the video, using a playful, impactful writing style.\n\n📄 Google Sheets Integration\n Logs each generated video prompt, final video URL, caption, and status into a Google Sheet for easy management and scheduling.\n\n🔌 Tools & Integrations:\nOpenAI GPT-4o (Prompt generation & caption copywriting)\n\nVeo3 via Wavespeed API (Video generation)\n\nGoogle Sheets (Content tracking and publishing queue)\n\nTelegram / Chat UI trigger (Optional – easily swappable)\n\n💡 Use Cases:\nInstagram & TikTok ad generation\n\nCreative automation for digital agencies\n\nShort-form UGC testing at scale\n\nTrend-driven campaign ideation"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Wait 30 secs",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 30 secs": {
      "main": [
        [
          {
            "node": "Veo3 Get Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prompt Engineer": {
      "main": [
        [
          {
            "node": "Veo3 Post Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 30 Seconds": {
      "main": [
        [
          {
            "node": "Veo3 Get Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Veo3 Get Request": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Veo3 Post Request": {
      "main": [
        [
          {
            "node": "Wait 30 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Prompt Engineer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "active": false
}
