{
  "name": "Monitor WooCommerce daily revenue spikes and send Slack alerts",
  "nodes": [
    {
      "id": "ea2de751-1904-4bd0-b8b5-1e4e73defbe4",
      "name": "Fetch WooCommerce Orders",
      "type": "n8n-nodes-base.wooCommerce",
      "position": [
        32,
        -112
      ]
    },
    {
      "id": "ab622b50-2e8b-40f7-8192-99d3b2970f18",
      "name": "Filter Paid Orders (Completed / Processing)",
      "type": "n8n-nodes-base.filter",
      "position": [
        224,
        -112
      ]
    },
    {
      "id": "9e34d0a5-da75-40f4-b4b6-40d27f2b907d",
      "name": "Filter Orders from Last 24 Hours",
      "type": "n8n-nodes-base.code",
      "position": [
        416,
        -112
      ]
    },
    {
      "id": "17c3ed92-b37f-4863-9307-122b437189a5",
      "name": "Calculate Total Revenue (24h)",
      "type": "n8n-nodes-base.code",
      "position": [
        832,
        -48
      ]
    },
    {
      "id": "7fbcb634-4b06-443a-b8f5-a9cfb250e063",
      "name": "Daily Revenue Spike Monitor",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -288,
        -112
      ]
    },
    {
      "id": "2fbb1a07-875e-414f-bd62-29969929f70f",
      "name": "Revenue Spike Threshold Check",
      "type": "n8n-nodes-base.if",
      "position": [
        1648,
        -112
      ]
    },
    {
      "id": "1958057e-c157-4b52-b4ed-d6784967c7f7",
      "name": "Send Slack Sales Spike Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1936,
        -224
      ]
    },
    {
      "id": "8dc8c38f-0984-415f-a523-37311b868960",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -400
      ],
      "parameters": {
        "width": 320,
        "height": 512,
        "content": "## Daily Revenue Check\nStarts the workflow automatically each day. It ensures the revenue check runs on schedule without any manual action and prepares the system to review daily sales performance con"
      }
    },
    {
      "id": "6e6a5478-cdd8-4d4a-9b25-41dcd944bc57",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -400
      ],
      "parameters": {
        "width": 640,
        "height": 512,
        "content": "## Fetch & Filter Orders\nThis section fetches orders from WooCommerce, keeps only paid orders, and filters them to include orders from the last 24 hours. This helps ensure that only valid and recent s"
      }
    },
    {
      "id": "f485090f-17e4-497f-9715-c1c5579b23d6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        -384
      ],
      "parameters": {
        "width": 672,
        "height": 496,
        "content": "## Revenue Threshold & Alerts\nThis section checks whether the total revenue from the last 24 hours has reached the set threshold. It then sends Slack notifications: one to celebrate a sales spike and "
      }
    },
    {
      "id": "8b7c28bd-3c4d-4e7e-bf65-3284645890ab",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        -1392
      ],
      "parameters": {
        "width": 384,
        "height": 1504,
        "content": "## How This Workflow Works\nThe workflow runs automatically once every day using a Schedule Trigger.\n\nIt fetches recent orders from WooCommerce via the API.\n\nOnly paid orders (Completed / Processing) a"
      }
    },
    {
      "id": "9af5b24b-8a4a-4302-8ec3-402c247c4402",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1152,
        -96
      ]
    },
    {
      "id": "a1852a73-ae5e-46c3-9427-109a4a179d99",
      "name": "Calculate Top Products (24h)",
      "type": "n8n-nodes-base.code",
      "position": [
        832,
        -208
      ]
    },
    {
      "id": "3c278039-9b1c-49f4-858e-227e162c2fea",
      "name": "Format Sales Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1344,
        -112
      ]
    },
    {
      "id": "5ec1fd95-12d4-4186-88f3-8ceabec334f4",
      "name": "Progress Alert (Target Pending)",
      "type": "n8n-nodes-base.slack",
      "position": [
        1952,
        -48
      ]
    },
    {
      "id": "c32134e6-4f91-4d6e-9b96-1d92031abd25",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -400
      ],
      "parameters": {
        "width": 768,
        "height": 512,
        "content": "## 24-Hour Sales Summary\nThis section calculates the total revenue and top-selling products from the last 24 hours. It then merges and formats the data into a single object, providing a clear snapshot"
      }
    },
    {
      "id": "a11b6f2a-7c8f-4f9f-ab2f-5baba39578e1",
      "name": "Filter Orders from Last 24 Hours2",
      "type": "n8n-nodes-base.code",
      "position": [
        704,
        400
      ]
    },
    {
      "id": "f328ffd8-1b07-40d3-ab8f-79c10e39f1e9",
      "name": "Calculate Cancelled Metrics (24h)",
      "type": "n8n-nodes-base.code",
      "position": [
        944,
        400
      ]
    },
    {
      "id": "6cbb9d05-a9ec-4e17-935c-2dfbb6fd7273",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        224
      ],
      "parameters": {
        "width": 912,
        "height": 384,
        "content": "## Cancellation Monitoring (Last 24 Hours)\nThis section tracks cancelled WooCommerce orders from the last 24 hours to measure revenue loss and order drop-offs. It calculates total cancelled orders and"
      }
    },
    {
      "id": "cf1e0a0c-bab5-4c28-b744-28179b8872f5",
      "name": " Filter Paid Orders (Completed / Processing)",
      "type": "n8n-nodes-base.filter",
      "position": [
        480,
        400
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Format Sales Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Sales Data": {
      "main": [
        [
          {
            "node": "Revenue Spike Threshold Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch WooCommerce Orders": {
      "main": [
        [
          {
            "node": "Filter Paid Orders (Completed / Processing)",
            "type": "main",
            "index": 0
          },
          {
            "node": " Filter Paid Orders (Completed / Processing)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Revenue Spike Monitor": {
      "main": [
        [
          {
            "node": "Fetch WooCommerce Orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Top Products (24h)": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Total Revenue (24h)": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Revenue Spike Threshold Check": {
      "main": [
        [
          {
            "node": "Send Slack Sales Spike Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Progress Alert (Target Pending)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Orders from Last 24 Hours": {
      "main": [
        [
          {
            "node": "Calculate Top Products (24h)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Calculate Total Revenue (24h)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Cancelled Metrics (24h)": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Filter Orders from Last 24 Hours2": {
      "main": [
        [
          {
            "node": "Calculate Cancelled Metrics (24h)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Paid Orders (Completed / Processing)": {
      "main": [
        [
          {
            "node": "Filter Orders from Last 24 Hours",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    " Filter Paid Orders (Completed / Processing)": {
      "main": [
        [
          {
            "node": "Filter Orders from Last 24 Hours2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}