{
  "name": "n8n workflow",
  "nodes": [
    {
      "id": "760770a9-620e-4aad-8c57-ce2f56b1b692",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        96,
        -160
      ],
      "parameters": {
        "text": "=Product : {{ $('A.I Stunning Generator Interface').item.json['Product Image Name'] }}\nDescription : {{ $('A.I Stunning Generator Interface').item.json['Prompt A.I'] }}",
        "options": {
          "systemMessage": "=# Overview\nYou are a world-class marketing strategist and an expert text-to-image prompt engineer\nspecializing in creating hyper-realistic, high-quality product photography prompts for AI image\ngeneration models.\n## Your Objective:\nWhen given a product description, your task is to craft a detailed, professional prompt that\nresults in a hyper-realistic, clean, and visually stunning product image suitable for marketing\nmaterial, advertising campaigns, or e-commerce platforms.\n## Key Requirements:\n- Focus on hyper-realistic, professional studio photography.\n- Maintain a clean, minimalistic, and elegant visual style.\n- Highlight the product as the main subject with sharp detail and perfect lighting.\n- Use backgrounds that complement but do not overpower the product (e.g., soft gradient,\nlight-colored, or pure white).\n- Include professional lighting details such as \"softbox lighting\"\n,\n\"studio lights\"\n, or \"natural soft\nshadows\"\n.\n- Emphasize realism, texture, and color accuracy.\n- Maintain a high-end, premium look and feel.\n- If applicable, suggest a subtle setting that enhances the product's story (e.g., a luxury kitchen\ncounter for a high-end blender).\n## Output Format:\n- Write a single text-to-image prompt optimized for a professional AI image model.\n- Be direct and descriptive without using excessive words.\n- Avoid unnecessary repetition or adjectives that do not enhance the image quality.\n- Ensure the prompt is complete and ready for direct input into an AI model.\n## Tone:\nProfessional, precise, clean, and optimized for maximum realism and marketing impact.\n# Example Input:\n\"A premium wireless Bluetooth speaker in matte black, cylindrical shape, modern design.\n\"\n# Example Output:\n\"Hyper-realistic product photo of a premium matte black wireless Bluetooth speaker with a\ncylindrical modern design, centered on a clean white studio background, softbox lighting with\nnatural shadows, sharp focus on texture and material, minimalistic, professional advertising\nshot.\n\""
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "e1baf93a-d0b2-40c3-bbd3-1c1daf81bd9b",
      "name": "Chat GPT 4.1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        64,
        0
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "gpt-4.1"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "f89ab437-02bf-4fe5-afaf-ce87d7aeca6d",
      "name": "Upload to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -128,
        -160
      ],
      "parameters": {
        "name": "={{ $json['Product Image Name'] }} (original)",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_GOOGLE_DRIVE_FOLDER_ID",
          "cachedResultName": "Product Creatives"
        },
        "inputDataFieldName": "Image_File"
      },
      "typeVersion": 3
    },
    {
      "id": "525a39af-d289-42c3-9324-57b1241d32be",
      "name": "Download from Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        432,
        -160
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Upload to Google Drive').item.json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "typeVersion": 3
    },
    {
      "id": "1bfca517-4b90-4c6c-b815-073d272ab5b9",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        816,
        -160
      ],
      "parameters": {
        "options": {},
        "operation": "toBinary",
        "sourceProperty": "data[0].b64_json"
      },
      "typeVersion": 1.1
    },
    {
      "id": "848c2387-ca56-4978-8f75-d6acc932c935",
      "name": "Create Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -176,
        144
      ],
      "parameters": {
        "url": "https://api.dev.runwayml.com/v1/image_to_video",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "promptImage",
              "value": "={{ $json.data.url }}"
            },
            {
              "name": "model",
              "value": "gen4_turbo"
            },
            {
              "name": "promptText",
              "value": "=Create a highly professional marketing video from the provided product photo. Simulate a smooth 360 rotation, realistic 3D turntable rotation around the product, as if the product is slowly rotating in place. The movement should be continuous, slow, and elegant — no sudden pans, jerks, or camera cuts. Always keep the entire product fully in frame, centered, and clearly visible at all times. Avoid zooming in or cropping. Focus on a premium, clean, and modern aesthetic that feels suitable for commercial marketing materials. No flashy effects, transitions, or overlays — only a subtle, realistic 3D rotation that highlights the product in the most polished way possible."
            },
            {
              "name": "duration",
              "value": "5"
            },
            {
              "name": "ratio",
              "value": "720:1280"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Runway-Version",
              "value": "2024-11-06"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c4037c1e-5422-4d34-955f-d11fd97a6729",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        192,
        160
      ],
      "parameters": {
        "url": "=https://api.dev.runwayml.com/v1/tasks/{{ $('Create Video').item.json.id }}",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Runway-Version",
              "value": "2024-11-06"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3d768ce1-1b85-4a74-b002-6b6e12f0bc13",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        352,
        160
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "4c40770f-0e90-4c77-8d24-32b1271d0c6b",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "SUCCEEDED"
            },
            {
              "id": "ea2939c0-c1f8-487d-b8f9-008bcde90ba7",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "RUNNING"
            }
          ]
        }
      },
      "typeVersion": 2.2,
      "alwaysOutputData": false
    },
    {
      "id": "3f16da3d-4588-45e9-984b-7d2c8868ee19",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        496,
        240
      ],
      "parameters": {
        "amount": 30
      },
      "typeVersion": 1.1
    },
    {
      "id": "a4bf1eaa-3273-44b0-a5fc-ccfa51021f0a",
      "name": "Get URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -384,
        144
      ],
      "parameters": {
        "url": "https://api.imgbb.com/1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpQueryAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "8550b748-93ca-48f6-be7e-d672e125cafc",
      "name": "60 Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        0,
        144
      ],
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "4f38ca08-325e-4d7d-8cb0-4b41d3fc76b7",
      "name": "A.I Stunning Generator Interface",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -384,
        -160
      ],
      "parameters": {
        "options": {
          "customCss": "",
          "appendAttribution": false,
          "useWorkflowTimezone": false
        },
        "formTitle": "Stelo Link Studio",
        "formFields": {
          "values": [
            {
              "fieldType": "file",
              "fieldLabel": "Image File",
              "multipleFiles": false,
              "requiredField": true,
              "acceptFileTypes": ".jpeg, .jpg, .png, .webm, .JPG"
            },
            {
              "fieldLabel": "Product Image Name",
              "placeholder": "Name of New Image",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Prompt A.I",
              "placeholder": "Explain your Vision. Think [Background, Content and Styles]",
              "requiredField": true
            },
            {
              "fieldType": "email",
              "fieldLabel": "Email",
              "placeholder": "user@example.com",
              "requiredField": true
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6e1af408-2ed7-4432-9835-d790f6d9afc7",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        624,
        96
      ],
      "parameters": {
        "sendTo": "={{ $('A.I Stunning Generator Interface').item.json.Email }}",
        "message": "=Hey!\n\nHere is your photo: {{ $('Get URL').item.json.data.url_viewer }}\n\nand your video: {{ $json.output[0] }}\nCheers\nThank you for choosing Stelo Link\n",
        "options": {
          "appendAttribution": false
        },
        "subject": "=Marketing Material : {{ $('A.I Stunning Generator Interface').item.json['Product Image Name'] }}",
        "emailType": "text"
      },
      "typeVersion": 2.1
    },
    {
      "id": "c8eddd1f-8b98-4b98-85c8-16f2db8765f2",
      "name": "OpenAi Create Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        640,
        -160
      ],
      "parameters": {
        "url": "https://api.openai.com/v1/images/edits",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            },
            {
              "name": "prompt",
              "value": "={{ $('AI Agent').item.json.output }}"
            },
            {
              "name": "model",
              "value": "gpt-image-1"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "e2fabf45-4d60-4254-91fb-557cad090128",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1216,
        -416
      ],
      "parameters": {
        "color": 6,
        "width": 720,
        "height": 832,
        "content": "__UKH_SECRET_14__"
      },
      "typeVersion": 1
    },
    {
      "id": "3617b9bd-4427-4211-a5a2-6cd06cb14c0b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -496
      ],
      "parameters": {
        "color": 3,
        "width": 592,
        "height": 240,
        "content": "## A.I Stunning Generator Interface\n\nThis form is the entry point. When submitted, it kicks off the entire workflow. It collects the product image, a name for the file, an AI vision prompt, the user's email, and video preferences.\n→ No credential needed — n8n generates a public URL when the workflow is active\n→ Share the form URL with whoever needs to submit a job\n→ File accepts: .jpeg .jpg .png .webm"
      },
      "typeVersion": 1
    },
    {
      "id": "2c773838-885e-4d4d-8d6f-dd4d5ab0604a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        -496
      ],
      "parameters": {
        "width": 688,
        "height": 320,
        "content": "## Image Generation Pipeline\n\nUpload → AI Agent → Download → OpenAI Create Image → Convert to File\n\nThese nodes take the submitted photo, use GPT-4.1 to craft a professional image prompt from the user's description, then send both the original image and that prompt to OpenAI's image editor (gpt-image-1) to generate a brand-new AI product photo. The result is converted to a usable file.\n→ Google Drive OAuth2 — connects the Upload and Download nodes. Update the Folder ID to your own Drive folder (copy from the folder URL)\n→ OpenAI credential (HTTP Header Auth, Bearer token) — connects to Chat GPT 4.1 node AND OpenAi Create Image node\n→ gpt-image-1 requires image generation access enabled on your OpenAI account (check platform.openai.com)"
      },
      "typeVersion": 1
    },
    {
      "id": "a0da1bca-f564-4b39-a042-e29cec5640fd",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        464
      ],
      "parameters": {
        "color": 4,
        "width": 976,
        "height": 256,
        "content": "## Video Generation Pipeline\n\nGet URL → Create Video → 60s Wait → Poll Status → If Done → Send Email\nThese nodes take the AI-generated image, host it publicly via ImgBB, then submit it to RunwayML to render a product marketing video. Because video rendering takes time, the workflow loops every 30 seconds checking if it's done. Once complete, it emails the photo link and video link to the user.\n→ ImgBB credential (HTTP Query Auth, key = YOUR_IMGBB_API_KEY) — connects to Get URL node. Free at imgbb.com\n→ RunwayML credential (HTTP Header Auth, Bearer token) — connects to Create Video node AND the HTTP Request polling node\n→ Gmail OAuth2 — connects to Send a Message node. Sends from whatever Google account you authorize\n→ Do not change the X-Runway-Version header (2024-11-06) — required by the API"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get URL": {
      "main": [
        [
          {
            "node": "Create Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Download from Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "60 Seconds": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat GPT 4.1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Create Video": {
      "main": [
        [
          {
            "node": "60 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Get URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAi Create Image": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to Google Drive": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download from Google Drive": {
      "main": [
        [
          {
            "node": "OpenAi Create Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "A.I Stunning Generator Interface": {
      "main": [
        [
          {
            "node": "Upload to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {},
  "active": false
}
