{
  "name": "RTM \u2014 Scheduled Regression Run",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 2 * * *"
            }
          ]
        }
      },
      "id": "a1000000-0000-0000-0000-000000000001",
      "name": "Nightly 02:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "p1",
              "name": "portalUrl",
              "value": "http://host.docker.internal:8787",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "a1000000-0000-0000-0000-000000000002",
      "name": "Portal URL",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $json.portalUrl }}/run?run=1",
        "options": {
          "response": {
            "response": {
              "neverError": true
            }
          }
        }
      },
      "id": "a1000000-0000-0000-0000-000000000003",
      "name": "POST /run?run=1",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.stats.regressions }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "a1000000-0000-0000-0000-000000000004",
      "name": "Regressions?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {},
      "id": "a1000000-0000-0000-0000-000000000005",
      "name": "Regressions found \u2014 notify here",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1140,
        200
      ]
    },
    {
      "parameters": {},
      "id": "a1000000-0000-0000-0000-000000000006",
      "name": "All clear",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1140,
        400
      ]
    }
  ],
  "connections": {
    "Nightly 02:00": {
      "main": [
        [
          {
            "node": "Portal URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Portal URL": {
      "main": [
        [
          {
            "node": "POST /run?run=1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "POST /run?run=1": {
      "main": [
        [
          {
            "node": "Regressions?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Regressions?": {
      "main": [
        [
          {
            "node": "Regressions found \u2014 notify here",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "All clear",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "rtm"
    }
  ]
}