{
  "name": "FUNNEL_DROP_PATCH",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "value": "0 * * * *"
            }
          ]
        }
      },
      "id": "hourly-trigger",
      "name": "Hourly Trigger",
      "type": "n8n-nodes-base.cron",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "url": "https://your-app.com/api/funnel-analysis",
        "options": {}
      },
      "id": "analyze-funnel",
      "name": "Analyze Funnel Drops",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "has-drop",
              "leftValue": "={{ $json.worstDropStage }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "isNotEmpty"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "check-drop",
      "name": "Check for Funnel Drop",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "url": "https://your-app.com/api/apply-funnel-patch",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "dropStage",
              "value": "={{ $json.worstDropStage }}"
            },
            {
              "name": "patchType",
              "value": "={{ $json.recommendedPatch }}"
            },
            {
              "name": "patchDetails",
              "value": "={{ $json.patchDetails }}"
            }
          ]
        },
        "options": {}
      },
      "id": "apply-patch",
      "name": "Apply Funnel Patch",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        900,
        200
      ]
    },
    {
      "parameters": {
        "url": "https://your-app.com/api/log-event",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "event_type",
              "value": "FUNNEL_PATCH_APPLIED"
            },
            {
              "name": "payload",
              "value": "={{ JSON.stringify($json) }}"
            }
          ]
        },
        "options": {}
      },
      "id": "log-patch",
      "name": "Log Patch Applied",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        1120,
        200
      ]
    }
  ],
  "connections": {
    "hourly-trigger": {
      "main": [
        [
          {
            "node": "analyze-funnel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "analyze-funnel": {
      "main": [
        [
          {
            "node": "check-drop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check-drop": {
      "main": [
        [
          {
            "node": "apply-patch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "apply-patch": {
      "main": [
        [
          {
            "node": "log-patch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 1,
  "updatedAt": "2024-01-01T00:00:00.000Z",
  "versionId": "1"
}