AutomationFlowsAI & RAG › Gpt Code Runner (minimal) - Revise

Gpt Code Runner (minimal) - Revise

GPT Code Runner (Minimal) - Revise. Uses openAi, writeBinaryFile, executeCommand. Webhook trigger; 5 nodes.

Webhook trigger★★★★☆ complexityAI-powered5 nodesOpenAIWrite Binary FileExecute Command
AI & RAG Trigger: Webhook Nodes: 5 Complexity: ★★★★☆ AI nodes: yes 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": "GPT Code Runner (Minimal) - Revise",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "codegen",
        "options": {}
      },
      "id": "1",
      "name": "Webhook Input",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "model": "gpt-4o-mini",
        "temperature": 0,
        "messages": [
          {
            "role": "system",
            "content": "\u4f60\u662f\u4e00\u4e2a\u4ee3\u7801\u751f\u6210\u52a9\u624b\u3002\u7528\u6237\u4f1a\u7ed9\u51fa\u9700\u6c42\uff0c\u4f60\u53ea\u8f93\u51fa Python \u811a\u672c\u4ee3\u7801\uff0c\u4e0d\u8981\u89e3\u91ca\u3002"
          },
          {
            "role": "user",
            "content": "{{$json[\"requirement\"]}}"
          }
        ]
      },
      "id": "2",
      "name": "GPT Generate Code",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "position": [
        500,
        300
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "destinationPath": "{{$json[\"projectPath\"]}}/xx_test.py",
        "data": "={{$json[\"choices\"][0][\"message\"][\"content\"]}}",
        "overwrite": true
      },
      "id": "3",
      "name": "Write xx_test.py",
      "type": "n8n-nodes-base.writeBinaryFile",
      "typeVersion": 1,
      "position": [
        750,
        300
      ]
    },
    {
      "parameters": {
        "command": "python",
        "arguments": [
          "xx_test.py"
        ],
        "workingDirectory": "{{$json[\"projectPath\"]}}"
      },
      "id": "4",
      "name": "Run Python Script",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        1000,
        300
      ]
    },
    {
      "parameters": {
        "command": "cp",
        "arguments": [
          "xx_test.py",
          "xx_$(date +%Y%m%d_%H%M%S).py"
        ],
        "workingDirectory": "{{$json[\"projectPath\"]}}"
      },
      "id": "5",
      "name": "Save with Timestamp",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        1250,
        300
      ]
    }
  ],
  "connections": {
    "Webhook Input": {
      "main": [
        [
          {
            "node": "GPT Generate Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GPT Generate Code": {
      "main": [
        [
          {
            "node": "Write xx_test.py",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write xx_test.py": {
      "main": [
        [
          {
            "node": "Run Python Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Python Script": {
      "main": [
        [
          {
            "node": "Save with Timestamp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

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

GPT Code Runner (Minimal) - Revise. Uses openAi, writeBinaryFile, executeCommand. Webhook trigger; 5 nodes.

Source: https://github.com/Cpp1022/cyy-study/blob/10e4ef680f54f2cabf74997b3d249bc2d61ce75a/n8n/workflow.json — 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

MallanooSploit. Uses openAi, executeCommand, httpRequest. Webhook trigger; 44 nodes.

OpenAI, Execute Command, HTTP Request
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

MallanooSploit. Uses executeCommand, httpRequest, openAi. Webhook trigger; 18 nodes.

Execute Command, HTTP Request, OpenAI
AI & RAG

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

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

Use cases Auto-generate subtitles for training or educational videos Translate videos into multiple languages for global reach Create accessibility-friendly content with minimal effort Build a backend

HTTP Request, Execute Command, Read Binary File +2