{
  "name": "flowsulting · Der Wächter: alles läuft, oder Sie hören von uns",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 * * * *"
            }
          ]
        }
      },
      "id": "betrieb-t1",
      "name": "Stündlich",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "url": "http://localhost:5678/api/v1/executions?status=error",
        "method": "GET",
        "options": {
          "timeout": 15000
        }
      },
      "id": "betrieb-a1",
      "name": "Alle Läufe prüfen",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        280,
        0
      ],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 2000
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "version": 2
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c1",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ $json.fehler }}",
              "rightValue": 0
            }
          ]
        },
        "options": {}
      },
      "id": "betrieb-b1",
      "name": "Alles grün?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        560,
        0
      ]
    },
    {
      "parameters": {
        "url": "http://localhost:5678/api/v1/executions/{{ $json.id }}/retry",
        "method": "POST",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={}",
        "options": {
          "timeout": 15000
        }
      },
      "id": "betrieb-c1",
      "name": "Selbstheilung: neu anstoßen",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        840,
        -200
      ],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 2000
    },
    {
      "parameters": {
        "fromEmail": "info@flowsulting.de",
        "toEmail": "florian@flowsulting.de",
        "subject": "Ein Ablauf braucht mich",
        "emailFormat": "html",
        "html": "={{ $json.html }}",
        "options": {}
      },
      "id": "betrieb-h1",
      "name": "Sonst: Florian alarmieren",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        840,
        200
      ],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 2000
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "Sieh dir die Läufe der Woche an. Nenne die zwei Abläufe mit dem größten Verbesserungspotenzial und was konkret zu ändern ist.\n\n{{ JSON.stringify($json) }}",
        "messages": {}
      },
      "id": "betrieb-a2",
      "name": "Wochenrückblick: was verbessern?",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.5,
      "position": [
        1120,
        0
      ]
    },
    {
      "parameters": {
        "fromEmail": "info@flowsulting.de",
        "toEmail": "inhaber@kunde.de",
        "subject": "Was Ihre Automatisierung diese Woche gebracht hat",
        "emailFormat": "html",
        "html": "={{ $json.html }}",
        "options": {}
      },
      "id": "betrieb-e1",
      "name": "Was es gebracht hat",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        1400,
        0
      ],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 2000
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4.1-mini",
          "mode": "list"
        },
        "options": {
          "temperature": 0.2
        }
      },
      "id": "betrieb-llm",
      "name": "KI-Modell",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.1,
      "position": [
        1120,
        260
      ]
    }
  ],
  "connections": {
    "Stündlich": {
      "main": [
        [
          {
            "node": "Alle Läufe prüfen",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Alle Läufe prüfen": {
      "main": [
        [
          {
            "node": "Alles grün?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Alles grün?": {
      "main": [
        [
          {
            "node": "Selbstheilung: neu anstoßen",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Sonst: Florian alarmieren",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Selbstheilung: neu anstoßen": {
      "main": [
        [
          {
            "node": "Wochenrückblick: was verbessern?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sonst: Florian alarmieren": {
      "main": [
        [
          {
            "node": "Wochenrückblick: was verbessern?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wochenrückblick: was verbessern?": {
      "main": [
        [
          {
            "node": "Was es gebracht hat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "KI-Modell": {
      "ai_languageModel": [
        [
          {
            "node": "Wochenrückblick: was verbessern?",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": [
    {
      "name": "flowsulting"
    },
    {
      "name": "Betrieb & Reporting"
    }
  ]
}
