{
  "name": "CS2 Demo Pipeline",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "cs2-demo-pipeline",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "Webhook_1",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        260,
        300
      ]
    },
    {
      "parameters": {
        "command": "=bash /workspace/scripts/n8n_run_pipeline.sh '{{$json.body.url}}'"
      },
      "id": "Execute_Command_1",
      "name": "Run Pipeline",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        520,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const raw = $json.stdout || '{}';\nlet parsed;\ntry {\n  parsed = JSON.parse(raw);\n} catch (e) {\n  parsed = { ok: false, error: 'invalid pipeline json', raw };\n}\nreturn [{ json: parsed }];"
      },
      "id": "Code_1",
      "name": "Parse JSON",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        780,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{$json}}",
        "options": {}
      },
      "id": "Respond_To_Webhook_1",
      "name": "Respond",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1020,
        300
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Run Pipeline",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Pipeline": {
      "main": [
        [
          {
            "node": "Parse JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse JSON": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "versionId": "1"
}