AutomationFlowsSocial Media › Automated Video Producer with ExecuteCommand

Automated Video Producer with ExecuteCommand

Original n8n title: Video Producer

02-Video-Producer. Uses executeCommand. Webhook trigger; 10 nodes.

Webhook trigger★★★★☆ complexity10 nodesExecute Command
Social Media Trigger: Webhook Nodes: 10 Complexity: ★★★★☆ Added:

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": "02-Video-Producer",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "produce-video",
        "responseMode": "responseNode",
        "options": {}
      },
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "values": {
          "number": [
            {
              "name": "idea_id",
              "value": "={{ $json.body.idea_id }}"
            }
          ],
          "string": [
            {
              "name": "language",
              "value": "={{ $json.body.language || 'pt-BR' }}"
            }
          ]
        }
      },
      "name": "Extract Parameters",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "command": "cd /app && python scripts/02_script_writing/write_script.py --idea-id {{ $json.idea_id }} --language {{ $json.language }}"
      },
      "name": "Write Script",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Extract script ID from command output\nconst output = items[0].json.stdout;\nconst match = output.match(/Script ID: (\\d+)/);\nconst scriptId = match ? parseInt(match[1]) : 0;\n\nreturn [{\n  json: {\n    script_id: scriptId,\n    language: items[0].json.language\n  }\n}];"
      },
      "name": "Parse Script ID",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        850,
        300
      ]
    },
    {
      "parameters": {
        "command": "cd /app && python scripts/03_voiceover/generate_audio.py --script-id {{ $json.script_id }}"
      },
      "name": "Generate Audio",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        1050,
        200
      ]
    },
    {
      "parameters": {
        "command": "cd /app && python scripts/04_visual_generation/generate_images.py --script-id {{ $json.script_id }}"
      },
      "name": "Generate Visuals",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        1050,
        400
      ]
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineAll"
      },
      "name": "Wait for Both",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 2,
      "position": [
        1250,
        300
      ]
    },
    {
      "parameters": {
        "command": "cd /app && python scripts/05_video_editing/compose_video.py --script-id {{ $json.script_id }}"
      },
      "name": "Compose Video",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        1450,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Extract video ID from command output\nconst output = items[0].json.stdout;\nconst match = output.match(/Video ID: (\\d+)/);\nconst videoId = match ? parseInt(match[1]) : 0;\n\nreturn [{\n  json: {\n    video_id: videoId,\n    script_id: items[0].json.script_id,\n    language: items[0].json.language,\n    status: 'completed',\n    timestamp: new Date().toISOString()\n  }\n}];"
      },
      "name": "Parse Video ID",
      "type": "n8n-nodes-base.code",
      "typeVersion": 1,
      "position": [
        1650,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}",
        "options": {}
      },
      "name": "Respond Success",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1850,
        300
      ]
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Extract Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Parameters": {
      "main": [
        [
          {
            "node": "Write Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Script": {
      "main": [
        [
          {
            "node": "Parse Script ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Script ID": {
      "main": [
        [
          {
            "node": "Generate Audio",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate Visuals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Audio": {
      "main": [
        [
          {
            "node": "Wait for Both",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Visuals": {
      "main": [
        [
          {
            "node": "Wait for Both",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Wait for Both": {
      "main": [
        [
          {
            "node": "Compose Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compose Video": {
      "main": [
        [
          {
            "node": "Parse Video ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Video ID": {
      "main": [
        [
          {
            "node": "Respond Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 0,
  "updatedAt": "2025-01-01T00:00:00.000Z",
  "versionId": "1"
}
Pro

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

About this workflow

02-Video-Producer. Uses executeCommand. Webhook trigger; 10 nodes.

Source: https://github.com/sagnax/youtube-shorts-automation/blob/25e37ee5a6e56d2ab42625d47004e63c3ccef408/n8n-workflows/02-video-producer.json — original creator credit. Request a take-down →

More Social Media workflows → · Browse all categories →

Related workflows

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

Social Media

Automated Tiktok Videos. Uses executeCommand, httpRequest, lmChatGroq, chainLlm. Webhook trigger; 45 nodes.

Execute Command, HTTP Request, Groq Chat +3
Social Media

Tiktok. Uses httpRequest, executeCommand, chatTrigger, crypto. Webhook trigger; 24 nodes.

HTTP Request, Execute Command, Chat Trigger +2
Social Media

Instagram - Fluxo de mensagens. Uses rabbitmq, rabbitmqTrigger, googleSheets, httpRequest. Webhook trigger; 74 nodes.

Rabbitmq, Rabbitmq Trigger, Google Sheets +1
Social Media

📘 Multi-Photo Facebook Post (Windows Directory) – How to Use ✅ Requirements To run this automation, make sure you have the following:

Read Write File, Execute Command, Facebook Graph Api +1
Social Media

• Downloads videos/music from YouTube using yt-dlp • Merges assets with dynamic text overlays • Automatically uploads to YouTube as Shorts (9:16 format) • Tracks everything in Google Sheets Install yt

Google Sheets, Execute Command, Read Write File +1