{
  "name": "Track marketing channel performance with HighLevel, Google Sheets, and Slack",
  "nodes": [
    {
      "id": "d4979a88-400d-4ce0-a27e-e0465b248e7e",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        32,
        608
      ]
    },
    {
      "id": "1a91fc6a-fa5b-4985-ae23-d9e02e2ad1dd",
      "name": "Sticky Note - Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -336,
        496
      ],
      "parameters": {
        "width": 320,
        "height": 280,
        "content": "## 📊 WORKFLOW START\n\nThis workflow analyzes lead source quality by:\n1. Fetching opportunities from HighLevel\n2. Filtering won deals\n3. Computing conversion metrics\n4. Sending reports to Slack and Goog"
      }
    },
    {
      "id": "8908da61-371e-4efe-986f-199ef3889a1a",
      "name": "Sticky Note - Fetch Data",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        304
      ],
      "parameters": {
        "width": 280,
        "height": 284,
        "content": "## 🎯 FETCH OPPORTUNITIES\n\nRetrieves all opportunities from HighLevel CRM.\n\nThis is the data source for the entire analysis.\n\n**Output:** List of all opportunities with status, amount, and lead source "
      }
    },
    {
      "id": "0cf6069e-5d6f-4337-b213-1931fb787104",
      "name": "Sticky Note - Filtering Logic",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        352,
        768
      ],
      "parameters": {
        "width": 300,
        "height": 296,
        "content": "## ✅ FILTER WON DEALS\n\nSplits the workflow into two paths:\n\n**TRUE Path:** Opportunities with status = 'won'\n→ Goes to analysis and reporting\n\n**FALSE Path:** All other opportunities\n→ Sends individua"
      }
    },
    {
      "id": "d751b397-2da7-468c-af32-c469485e9847",
      "name": "Sticky Note - Analytics",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        240
      ],
      "parameters": {
        "width": 520,
        "height": 240,
        "content": "## 📈 ANALYTICS PIPELINE\n\nProcesses won deals through:\n\n1. **Google Sheets:** Logs raw won deal data\n2. **Metrics Calculation:** Aggregates by lead source\n3. **Slack Report:** Sends summary to team\n\nTh"
      }
    },
    {
      "id": "ba86138e-0226-401c-84c3-22ab9b9baecc",
      "name": "Sticky Note - Status Alerts",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        800
      ],
      "parameters": {
        "width": 280,
        "height": 268,
        "content": "## 🔔 NON-WON NOTIFICATION\n\nSends individual Slack messages for opportunities that are NOT won.\n\nUseful for tracking:\n- Lost opportunities\n- Pending deals\n- Other statuses requiring attention"
      }
    },
    {
      "id": "48d32b33-0535-4cda-9f9b-aaf70d494950",
      "name": "Log Won Deals to Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        720,
        512
      ]
    },
    {
      "id": "66b4ddec-d5ed-47b7-8392-dc048b75f4cb",
      "name": "Calculate Lead Source Metrics",
      "type": "n8n-nodes-base.function",
      "position": [
        944,
        512
      ]
    },
    {
      "id": "8f3105fb-6b5c-4882-8144-6cde4aadb837",
      "name": "Send Analytics to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1168,
        512
      ]
    },
    {
      "id": "c635333b-e2ff-403c-ad24-809d7ff7b2ac",
      "name": "Fetch All HighLevel Opportunities",
      "type": "n8n-nodes-base.highLevel",
      "position": [
        272,
        608
      ]
    },
    {
      "id": "bca4f587-dc3a-4979-9d80-8f172d6f888a",
      "name": "Check If Status = Won",
      "type": "n8n-nodes-base.if",
      "position": [
        496,
        608
      ]
    },
    {
      "id": "5c2b45bc-4c6a-4263-b5a6-f56e796f7aee",
      "name": "Alert Non-Won Status to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        720,
        704
      ]
    }
  ],
  "connections": {
    "Check If Status = Won": {
      "main": [
        [
          {
            "node": "Log Won Deals to Sheets",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Alert Non-Won Status to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Won Deals to Sheets": {
      "main": [
        [
          {
            "node": "Calculate Lead Source Metrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Lead Source Metrics": {
      "main": [
        [
          {
            "node": "Send Analytics to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch All HighLevel Opportunities": {
      "main": [
        [
          {
            "node": "Check If Status = Won",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Fetch All HighLevel Opportunities",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}