{
  "name": "Stage 1 — Change Request Logger",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Submit a Change Request",
        "formDescription": "Anyone on the project team can propose a change. Every submission is logged for the PM to review.",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Your name",
              "fieldType": "text",
              "requiredField": true
            },
            {
              "fieldLabel": "Your role / team",
              "fieldType": "text",
              "requiredField": true
            },
            {
              "fieldLabel": "What change are you proposing?",
              "fieldType": "textarea",
              "requiredField": true
            },
            {
              "fieldLabel": "Why is it needed?",
              "fieldType": "textarea",
              "requiredField": true
            }
          ]
        },
        "responseMode": "lastNode",
        "options": {}
      },
      "id": "form-trigger-001",
      "name": "Form Trigger",
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [240, 300],
      "webhookId": "change-request-form"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are tagging a Change Request submission so the Project Manager can triage their queue.\n\nSubmitter: {{ $json[\"Your name\"] }} ({{ $json[\"Your role / team\"] }})\n\nChange proposed:\n{{ $json[\"What change are you proposing?\"] }}\n\nWhy it is needed:\n{{ $json[\"Why is it needed?\"] }}\n\nTag this submission with a short summary, a priority level, an impact type, and a one-sentence PM orientation telling the PM where to focus their review.",
        "hasOutputParser": true
      },
      "id": "llm-chain-001",
      "name": "Tag Change Request",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.5,
      "position": [520, 300]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-haiku-4-5",
          "mode": "list",
          "cachedResultName": "Claude Haiku 4.5"
        },
        "options": {}
      },
      "id": "anthropic-model-001",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [400, 500]
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"summary\": {\n      \"type\": \"string\",\n      \"description\": \"One short sentence describing the change in PM-neutral language\"\n    },\n    \"priority\": {\n      \"type\": \"string\",\n      \"enum\": [\"Low\", \"Medium\", \"High\"]\n    },\n    \"impact\": {\n      \"type\": \"string\",\n      \"enum\": [\"Scope\", \"Schedule\", \"Cost\", \"Quality\", \"Multiple\"]\n    },\n    \"pm_orientation\": {\n      \"type\": \"string\",\n      \"description\": \"One sentence on where the PM should focus when reviewing\"\n    }\n  },\n  \"required\": [\"summary\", \"priority\", \"impact\", \"pm_orientation\"]\n}"
      },
      "id": "output-parser-001",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.2,
      "position": [640, 500]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://script.google.com/macros/s/AKfycbyRniW-gq6X2zWYtDMXmzJgq39qJJscg5c17Vmxe2S-UH29mzM2IVnloTI4q86YtamQ/exec",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"submitted_at\": \"{{ DateTime.fromISO($('Form Trigger').item.json.submittedAt).toFormat('yyyy-MM-dd HH:mm') }}\",\n  \"submitter_name\": \"{{ $('Form Trigger').item.json[\"Your name\"] }}\",\n  \"submitter_role\": \"{{ $('Form Trigger').item.json[\"Your role / team\"] }}\",\n  \"change_proposed\": {{ JSON.stringify($('Form Trigger').item.json[\"What change are you proposing?\"]) }},\n  \"why_needed\": {{ JSON.stringify($('Form Trigger').item.json[\"Why is it needed?\"]) }},\n  \"summary\": {{ JSON.stringify($json.output.summary) }},\n  \"priority\": \"{{ $json.output.priority }}\",\n  \"impact\": \"{{ $json.output.impact }}\",\n  \"pm_orientation\": {{ JSON.stringify($json.output.pm_orientation) }}\n}",
        "options": {}
      },
      "id": "http-post-001",
      "name": "Save to Project Register",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [900, 300]
    },
    {
      "parameters": {
        "operation": "completion",
        "completionTitle": "Change Request Logged",
        "completionMessage": "=Thanks {{ $('Form Trigger').item.json[\"Your name\"] }}. Your change request has been added to the project register. The Project Manager will review it.",
        "options": {}
      },
      "id": "form-end-001",
      "name": "Confirmation Page",
      "type": "n8n-nodes-base.form",
      "typeVersion": 1,
      "position": [1180, 300]
    }
  ],
  "connections": {
    "Form Trigger": {
      "main": [
        [
          {
            "node": "Tag Change Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Tag Change Request",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Tag Change Request",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Tag Change Request": {
      "main": [
        [
          {
            "node": "Save to Project Register",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to Project Register": {
      "main": [
        [
          {
            "node": "Confirmation Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "pinData": {}
}
