AutomationFlowsAI & RAG › AI Capcut Video Editor Automation

AI Capcut Video Editor Automation

AI CapCut Video Editor Automation. Uses openAi, httpRequest, executeCommand, googleDrive. Webhook trigger; 10 nodes.

Webhook trigger★★★★☆ complexityAI-powered10 nodesOpenAIHTTP RequestExecute CommandGoogle DriveEmail Send
AI & RAG Trigger: Webhook Nodes: 10 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Emailsend → Google Drive recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "AI CapCut Video Editor Automation",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "video-edit",
        "options": {}
      },
      "id": "1",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "condition1",
              "leftValue": "={{ $json.input_type }}",
              "rightValue": "prompt",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "2",
      "name": "IF Node (Prompt vs Reference)",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "model": "gpt-4o",
        "prompt": "=Analyze this prompt for video edits: {{$json.prompt}}. Output JSON with cuts (array of timings), effects (array of types), text (array of overlays), sound (track name).",
        "options": {}
      },
      "id": "3",
      "name": "OpenAI Node (Prompt Analysis)",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "position": [
        680,
        200
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Video analysis with FFmpeg (assume video downloaded to /tmp)\nconst ffmpeg = require('fluent-ffmpeg');\nconst path = require('path');\n\n// Download video if URL\n// For demo: extract cuts via scene detection\nffmpeg('/tmp/reference.mp4')\n  .on('end', () => {\n    // Parse output for cuts, effects (simplified)\n    return {\n      cuts: [{start: 0, end: 5}, {start: 5, end: 10}],\n      effects: ['zoom', 'transition'],\n      text: ['OCR text here'],\n      sound: 'extracted_audio.mp3'\n    };\n  })\n  .ffprobe(() => {\n    // Add ML detection logic here (e.g., via torch if available)\n  });"
      },
      "id": "4",
      "name": "Code Node (Video Analysis)",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        680,
        400
      ]
    },
    {
      "parameters": {},
      "id": "5",
      "name": "Merge Node",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 2.2,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Generate CapCut JSON from edit plan\nconst plan = $input.all()[0].json;\nconst capcutJson = {\n  \"draft_meta\": {\n    \"version\": 1,\n    \"tracks\": [\n      {\n        \"segments\": plan.cuts.map(c => ({start: c.start, end: c.end})),\n        \"effects\": plan.effects,\n        \"text\": plan.text,\n        \"audio\": plan.sound\n      }\n    ]\n  }\n};\nreturn { project: capcutJson };"
      },
      "id": "6",
      "name": "Code Node (CapCut JSON Generate)",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1120,
        300
      ]
    },
    {
      "parameters": {
        "url": "http://localhost:8080/capcut/create",
        "authentication": "none",
        "requestMethod": "POST",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "project",
              "value": "={{ $json.project }}"
            }
          ]
        },
        "options": {}
      },
      "id": "7",
      "name": "HTTP Request Node (CapCut API)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1340,
        300
      ]
    },
    {
      "parameters": {
        "command": "capcut open {{$json.project_id}} --export /output/final.mp4"
      },
      "id": "8",
      "name": "Execute Command Node (Run CapCut)",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        1560,
        300
      ]
    },
    {
      "parameters": {
        "operation": "upload",
        "fileName": "edited_video.mp4",
        "binaryData": true,
        "binaryPropertyName": "data",
        "options": {}
      },
      "id": "9",
      "name": "Google Drive Node (Upload)",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3.2,
      "position": [
        1780,
        300
      ],
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fromEmail": "your@email.com",
        "toEmail": "={{ $json.user_email }}",
        "subject": "Video Edit Complete!",
        "emailType": "text",
        "text": "Tera edited video ready hai! Link: {{ $json.share_url }}",
        "options": {}
      },
      "id": "10",
      "name": "Email Node (Notify)",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        2000,
        300
      ],
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "IF Node (Prompt vs Reference)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Node (Prompt vs Reference)": {
      "main": [
        [
          {
            "node": "OpenAI Node (Prompt Analysis)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code Node (Video Analysis)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Node (Prompt Analysis)": {
      "main": [
        [
          {
            "node": "Merge Node",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code Node (Video Analysis)": {
      "main": [
        [
          {
            "node": "Merge Node",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge Node": {
      "main": [
        [
          {
            "node": "Code Node (CapCut JSON Generate)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code Node (CapCut JSON Generate)": {
      "main": [
        [
          {
            "node": "HTTP Request Node (CapCut API)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request Node (CapCut API)": {
      "main": [
        [
          {
            "node": "Execute Command Node (Run CapCut)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Command Node (Run CapCut)": {
      "main": [
        [
          {
            "node": "Google Drive Node (Upload)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Node (Upload)": {
      "main": [
        [
          {
            "node": "Email Node (Notify)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 0,
  "updatedAt": "2025-10-25T00:00:00.000Z",
  "versionId": "1"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

AI CapCut Video Editor Automation. Uses openAi, httpRequest, executeCommand, googleDrive. Webhook trigger; 10 nodes.

Source: https://gist.github.com/Iswa-code-max/b030e5d9dd631a81ee89d2ce153a0557 — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Automatically creates complete videos from a text prompt—script, voiceover, stock footage, and subtitles all assembled and ready.

OpenAI, HTTP Request, Execute Command +1
AI & RAG

Video to Shorts Everywhere. Uses openAi, executeCommand, googleDrive, youtube. Webhook trigger; 8 nodes.

OpenAI, Execute Command, Google Drive +2
AI & RAG

ASMR Video Workflow. Uses openAi, httpRequest, executeCommand, emailSend. Webhook trigger; 6 nodes.

OpenAI, HTTP Request, Execute Command +1
AI & RAG

Goal: This workflow demonstrates the full fluidX THE EYE integration — starting a live session, inviting both the customer (via SMS) and the service agent (via email), and then accessing the media (ph

Form Trigger, Google Drive, Email Send +3
AI & RAG

Transforms provider documentation (URLs) into an auditable, enforceable multicloud security control baseline. It: Fetches and sanitizes HTML Uses AI to extract security requirements* (strict 3-line TX

HTTP Request, OpenAI, Google Drive