{
  "name": "Restart service from Jenkins build and send to Email",
  "nodes": [
    {
      "id": "trigger-jenkins-build",
      "name": "Incoming Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        -600,
        147200
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "restart-service-from-jenkins-build-and-send-to-email",
        "responseCode": 200,
        "responseMode": "onReceived"
      }
    },
    {
      "id": "fetch-jenkins-build",
      "name": "Fetch data from Jenkins build",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        -300,
        147200
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.example.com/jenkins-build",
        "responseFormat": "json"
      }
    },
    {
      "id": "send-email",
      "name": "Send to Email",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        300,
        147200
      ],
      "parameters": {
        "method": "POST",
        "url": "https://api.example.com/email",
        "responseFormat": "json",
        "options": {}
      }
    },
    {
      "id": "error-handler-600-147200",
      "name": "Send Error to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [
        600,
        147200
      ],
      "parameters": {
        "resource": "message",
        "operation": "post",
        "channel": "#automation-alerts",
        "text": "={{ $json.get('error_message', 'An error occurred') }}"
      }
    }
  ],
  "connections": {
    "Incoming Trigger": {
      "main": [
        [
          {
            "node": "Fetch data from Jenkins build",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch data from Jenkins build": {
      "main": [
        {
          "node": "Send to Email",
          "type": "main",
          "index": 0
        }
      ]
    },
    "Send to Email": {
      "main": [
        [
          {
            "node": "Send Error to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {},
  "active": false
}