{
  "name": "Magento 2 low stock alert via Slack & Gmail (MSI compatible)",
  "nodes": [
    {
      "id": "7d9139ff-f51e-4017-8831-5f8c6c273f51",
      "name": "Daily Inventory Check",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1860,
        500
      ]
    },
    {
      "id": "bc8d384a-c5d8-4864-a157-cb21f3643d84",
      "name": "Check if Alerts Needed",
      "type": "n8n-nodes-base.if",
      "position": [
        -780,
        500
      ]
    },
    {
      "id": "c42fabc3-2180-49e2-8ea5-d24500dbdea0",
      "name": "Send Inventory Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        -20,
        340
      ]
    },
    {
      "id": "d0278e03-e2af-48c0-af7c-2be43a504398",
      "name": "Workflow Info",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1960,
        -140
      ],
      "parameters": {
        "width": 420,
        "height": 300,
        "content": "         📦 MAGENTO 2 STOCK ALERTS\n**Author: Kanaka Kishore Kandregula **\n\nWORKFLOW PURPOSE:\nAutomatically monitor Magento 2 (Adobe Commerce) inventory levels and alert when products are running low\n\nS"
      }
    },
    {
      "id": "f9c6eb47-2f17-4039-b1f0-48ea84ce8b09",
      "name": "Features & Config",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -600,
        -140
      ],
      "parameters": {
        "width": 400,
        "height": 300,
        "content": "                KEY FEATURES\n\n✅ MSI Support\n✅ Daily automated inventory checks\n✅ Customisable stock thresholds\n✅ Multiple SKU Reporting\n✅ Proactive restocking alerts\n\n\n"
      }
    },
    {
      "id": "accd7ae8-f4d7-4bc3-8d99-2e9ecac7ece2",
      "name": "Business Value",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -140
      ],
      "parameters": {
        "width": 360,
        "height": 300,
        "content": "             BUSINESS VALUE\n\n🚫 Prevent stockouts\n💰 Maintain sales revenue\n📊 Better inventory management\n⏰ Proactive restocking\n\nTIME TO BUILD: 20 minutes\nDIFFICULTY: Intermediate\nROI: High - prevents "
      }
    },
    {
      "id": "f3651bdf-d90e-42f5-ba94-3bf4e4c55511",
      "name": "Get All Product Skus",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1420,
        320
      ]
    },
    {
      "id": "c20eaa02-c1ce-4999-9aef-8c6a3fd959ee",
      "name": "Extract SKUs",
      "type": "n8n-nodes-base.code",
      "position": [
        -1180,
        320
      ]
    },
    {
      "id": "a3fe994f-e782-4c55-8cdb-b8a256acdf37",
      "name": "Fetch MSI Stock Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1420,
        680
      ]
    },
    {
      "id": "2cf2065b-f235-4582-b439-4902a0097e10",
      "name": "Process Stock Data and Identify Low Stock",
      "type": "n8n-nodes-base.code",
      "position": [
        -1180,
        680
      ]
    },
    {
      "id": "c92398cf-70f4-4d93-a273-693bc3c1bbd5",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -20,
        620
      ]
    },
    {
      "id": "55ffa452-f2c5-43c2-996d-0f0fb7c9bed4",
      "name": "Format Message",
      "type": "n8n-nodes-base.code",
      "position": [
        -480,
        500
      ]
    },
    {
      "id": "974a2ff6-768b-44b4-bf14-7b8534c99eac",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1500,
        -140
      ],
      "parameters": {
        "width": 420,
        "height": 300,
        "content": "                 WORK FLOW\n\n1. Schedule Trigger (daily 8:50 AM check)\n2. Magento 2 (get all products)\n3. Code Node (filter low stock items)\n4. If Node (check if any alerts needed)\n5. Format alert mess"
      }
    },
    {
      "id": "0d19935c-9078-435a-a940-49fdfef93bef",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        -140
      ],
      "parameters": {
        "width": 400,
        "height": 300,
        "content": "           CONFIGURATION NOTES\n\n- Adjust lowStockThreshold variable in Process Stock Data node\n- Modify daily schedule timing as needed\n- You Bearer YOUR_TOKEN_HERE from Magento\n- Slack & Gmail API de"
      }
    },
    {
      "id": "cde3e885-dad8-4467-840a-52dbfd0997e1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1940,
        400
      ],
      "parameters": {
        "width": 280,
        "height": 300,
        "content": "     Trigs Daily 8:50am"
      }
    },
    {
      "id": "ca9ffce4-f84c-4da1-aa0c-5b50812fe8ff",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        220
      ],
      "parameters": {
        "width": 540,
        "height": 660,
        "content": "                      Magento Logic"
      }
    },
    {
      "id": "a563ff82-2b81-468b-a33f-0780c9522a4c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        220
      ],
      "parameters": {
        "width": 320,
        "height": 660,
        "content": "           Notifications"
      }
    },
    {
      "id": "70c8982e-ea87-4d75-8a69-ee6ad174b4c1",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        400
      ],
      "parameters": {
        "width": 520,
        "height": 300,
        "content": "              Checks & Message Formatting"
      }
    }
  ],
  "connections": {
    "Extract SKUs": {
      "main": [
        [
          {
            "node": "Fetch MSI Stock Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Message": {
      "main": [
        [
          {
            "node": "Send Inventory Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Product Skus": {
      "main": [
        [
          {
            "node": "Extract SKUs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Inventory Check": {
      "main": [
        [
          {
            "node": "Get All Product Skus",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Alerts Needed": {
      "main": [
        [
          {
            "node": "Format Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch MSI Stock Status": {
      "main": [
        [
          {
            "node": "Process Stock Data and Identify Low Stock",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Stock Data and Identify Low Stock": {
      "main": [
        [
          {
            "node": "Check if Alerts Needed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}