{
  "name": "Deal stage change to Slack notification",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "deal-stage-change-to-slack",
        "authentication": "headerAuth",
        "responseMode": "lastNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -360,
        0
      ],
      "id": "430320fe-0e72-446a-bbc6-485f881d5619",
      "name": "Stage Change Request",
      "webhookId": "751da46a-7faf-49c6-b5df-1058701a1d07"
    },
    {
      "parameters": {
        "resource": "deal",
        "operation": "moveStage",
        "dealId": "={{ $json.body.dealId }}",
        "stageId": "={{ $json.body.stageId }}"
      },
      "type": "n8n-nodes-dealflow.dealFlow",
      "typeVersion": 1,
      "position": [
        -80,
        0
      ],
      "id": "3a5f7ce0-a63f-45c1-b602-c4b8c8978111",
      "name": "Move Deal to Stage"
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "resource": "message",
        "operation": "post",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "C0123456789",
          "mode": "id"
        },
        "messageType": "text",
        "text": "={{ \"*Deal stage changed*\\n\" + $(\"Stage Change Request\").item.json.body.dealTitle + \" → \" + $(\"Stage Change Request\").item.json.body.stageLabel + \"\\nDeal ID: \" + $(\"Stage Change Request\").item.json.body.dealId }}",
        "otherOptions": {
          "includeLinkToWorkflow": false
        }
      },
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.4,
      "position": [
        200,
        0
      ],
      "id": "a7427813-4cb7-498d-bd8f-2e31c184b604",
      "name": "Notify Slack"
    }
  ],
  "connections": {
    "Stage Change Request": {
      "main": [
        [
          {
            "node": "Move Deal to Stage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Move Deal to Stage": {
      "main": [
        [
          {
            "node": "Notify Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d9f9b608-29a3-48ec-a8ae-66b151b735b9",
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}
