{
  "name": "Webhook to Slack production alert starter",
  "nodes": [
    {
      "parameters": {
        "path": "replace-with-private-alert-path",
        "httpMethod": "POST",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "Webhook",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "summary",
              "value": "={{$json.body.summary || \"Production alert\"}}"
            },
            {
              "name": "severity",
              "value": "={{$json.body.severity || \"unknown\"}}"
            },
            {
              "name": "eventId",
              "value": "={{$json.body.eventId || $execution.id}}"
            }
          ]
        }
      },
      "id": "SetAlertFields",
      "name": "Set alert fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 2,
      "position": [
        240,
        0
      ]
    },
    {
      "parameters": {
        "channel": "REPLACE_WITH_CHANNEL_ID",
        "text": "={{\"[\" + $json.severity + \"] \" + $json.summary + \" (\" + $json.eventId + \")\"}}"
      },
      "id": "Slack",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [
        480,
        0
      ],
      "credentials": {
        "slackApi": {
          "id": "REPLACE_WITH_CREDENTIAL_ID",
          "name": "REPLACE_WITH_SLACK_CREDENTIAL"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { ok: true, eventId: $json.eventId } }}",
        "options": {
          "responseCode": 200
        }
      },
      "id": "Respond",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        720,
        0
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Set alert fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set alert fields": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Slack": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "active": false,
  "pinData": {},
  "versionId": "replace-after-import"
}
