{
  "name": "Monitor WooCommerce inventory daily and send Slack alerts with Supabase",
  "nodes": [
    {
      "id": "52a8f525-2e28-467f-a155-40b50fd3beee",
      "name": "Inventory Classification",
      "type": "n8n-nodes-base.code",
      "position": [
        432,
        16
      ]
    },
    {
      "id": "64858d75-d212-4246-ba72-a47a00dabcd6",
      "name": "Run Daily Invetory check",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -944,
        -16
      ]
    },
    {
      "id": "54e933e4-340c-4a72-8f18-2ccc79d9c2ee",
      "name": "Fecth Products",
      "type": "n8n-nodes-base.wooCommerce",
      "position": [
        -336,
        -96
      ]
    },
    {
      "id": "e412507c-3678-4b57-8a83-e983fededad4",
      "name": "Calculate product sales",
      "type": "n8n-nodes-base.code",
      "position": [
        -336,
        96
      ]
    },
    {
      "id": "ec283899-f9ba-4d6a-a2a1-d31068f6141d",
      "name": "Combine products & sales ",
      "type": "n8n-nodes-base.merge",
      "position": [
        -80,
        16
      ]
    },
    {
      "id": "2685592b-aae5-466e-9c6b-bf2ea414d97b",
      "name": "Attach sales data to products",
      "type": "n8n-nodes-base.code",
      "position": [
        224,
        16
      ]
    },
    {
      "id": "ddccc243-010b-48ab-823b-8b8f21e47423",
      "name": "Calculate reorder quantity",
      "type": "n8n-nodes-base.code",
      "position": [
        656,
        16
      ]
    },
    {
      "id": "e017c643-ac67-463e-a184-1f582c73b617",
      "name": "Set urgency & action plan",
      "type": "n8n-nodes-base.code",
      "position": [
        896,
        16
      ]
    },
    {
      "id": "9d001ee2-d429-43d4-bd3f-e2b65d50cd1e",
      "name": "Check if alerts is needed",
      "type": "n8n-nodes-base.if",
      "position": [
        1120,
        16
      ]
    },
    {
      "id": "a2ca2ac5-7f83-40cc-90c2-edb99115f8eb",
      "name": "Send critical inventory alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1488,
        -256
      ]
    },
    {
      "id": "f649391a-afd2-4dfb-9a2d-4a260bdb0460",
      "name": "Save Inventory record to database",
      "type": "n8n-nodes-base.supabase",
      "position": [
        1504,
        224
      ]
    },
    {
      "id": "c9a776d4-28ea-4d6b-8b27-abe041f60390",
      "name": "Prepare Inventory summary",
      "type": "n8n-nodes-base.code",
      "position": [
        1792,
        224
      ]
    },
    {
      "id": "1cdaddfa-27aa-476a-8062-1f6864d51465",
      "name": "Send Inventory summry",
      "type": "n8n-nodes-base.slack",
      "position": [
        2048,
        224
      ]
    },
    {
      "id": "f6eb8edb-6fad-4624-a1b8-11eab8629f82",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        -96
      ],
      "parameters": {
        "width": 304,
        "height": 240,
        "content": "Runs this inventory check automatically every day at the scheduled time."
      }
    },
    {
      "id": "2674fb8d-b56d-420b-9461-39969e55d109",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -192
      ],
      "parameters": {
        "width": 800,
        "height": 464,
        "content": "## Collect Product & Sales Data\nThis step gathers all products from the store, checks how much stock is available, looks at sales from the last 30 days, and combines everything to understand how fast "
      }
    },
    {
      "id": "5691b0f2-c765-4b9b-9b78-0d48c4bbd28c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -192
      ],
      "parameters": {
        "width": 1152,
        "height": 464,
        "content": "## Inventory Evaluation, Planning & Decision\nThis step combines product and sales data, checks stock health based on demand, categorizes products by performance, calculates safety stock and reorder qu"
      }
    },
    {
      "id": "63e20f6e-4fa5-4a4a-8ebc-7c81fd123f75",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        48
      ],
      "parameters": {
        "width": 912,
        "height": 384,
        "content": "## Inventory Record, Summarize & Notify Inventory Status\n\nThis step saves the latest inventory results into the system, creates a daily summary of stock health and risk items, and sends a clear report"
      }
    },
    {
      "id": "d7f9f15e-3390-4ad5-a6ae-5149aae36ec7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        -352
      ],
      "parameters": {
        "width": 320,
        "height": 288,
        "content": "Sends instant Slack alerts for products that require urgent action or immediate reorder."
      }
    },
    {
      "id": "c1364a66-d9d8-405c-bad4-95b26bab80fd",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1712,
        -832
      ],
      "parameters": {
        "width": 528,
        "height": 736,
        "content": "## How it works\n\nThis workflow automatically checks your store’s inventory every day and helps you avoid stock issues.\n\nFirst, it pulls all active products and recent completed orders from WooCommerce"
      }
    },
    {
      "id": "37bc4092-a6ed-44ca-b19e-a090f2ee4c5a",
      "name": "Fetch order",
      "type": "n8n-nodes-base.wooCommerce",
      "position": [
        -592,
        96
      ]
    }
  ],
  "connections": {
    "Fetch order": {
      "main": [
        [
          {
            "node": "Calculate product sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fecth Products": {
      "main": [
        [
          {
            "node": "Combine products & sales ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate product sales": {
      "main": [
        [
          {
            "node": "Combine products & sales ",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Inventory Classification": {
      "main": [
        [
          {
            "node": "Calculate reorder quantity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Daily Invetory check": {
      "main": [
        [
          {
            "node": "Fecth Products",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if alerts is needed": {
      "main": [
        [
          {
            "node": "Send critical inventory alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Save Inventory record to database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine products & sales ": {
      "main": [
        [
          {
            "node": "Attach sales data to products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Inventory summary": {
      "main": [
        [
          {
            "node": "Send Inventory summry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set urgency & action plan": {
      "main": [
        [
          {
            "node": "Check if alerts is needed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate reorder quantity": {
      "main": [
        [
          {
            "node": "Set urgency & action plan",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Attach sales data to products": {
      "main": [
        [
          {
            "node": "Inventory Classification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Inventory record to database": {
      "main": [
        [
          {
            "node": "Prepare Inventory summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}