{
  "name": "Monitor Shopify low-stock items with OpenAI, Google Sheets, Slack and email",
  "nodes": [
    {
      "id": "6438f7ce-a0d8-4ae7-bee3-b2d837d0a680",
      "name": "Trigger in Schedule time",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -3744,
        -1312
      ]
    },
    {
      "id": "559903bc-c885-48e3-92de-82affca9d768",
      "name": "Fetch Products",
      "type": "n8n-nodes-base.shopify",
      "position": [
        -3488,
        -1312
      ]
    },
    {
      "id": "6a01fd91-56e8-4b6e-9bd4-1d7077be1e6c",
      "name": "Prepare Product data",
      "type": "n8n-nodes-base.set",
      "position": [
        -3232,
        -1312
      ]
    },
    {
      "id": "2fffe006-1b89-4b4f-b446-1c81c81f03fa",
      "name": "Process each product",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -2912,
        -1312
      ]
    },
    {
      "id": "9f987ef8-0436-4240-93a1-55342ec3e2bc",
      "name": "Check low stock",
      "type": "n8n-nodes-base.if",
      "position": [
        -2592,
        -1296
      ]
    },
    {
      "id": "54caa5d4-68f7-42c4-a925-d2004bd45818",
      "name": "AI text genrator",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -2336,
        -1120
      ]
    },
    {
      "id": "b55ece31-c465-4888-b72b-350431a217c6",
      "name": "Genrate Alert Message",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -2288,
        -1376
      ]
    },
    {
      "id": "0ecf44b7-8404-42ac-925e-d38886fe1140",
      "name": "Formate Alert Message",
      "type": "n8n-nodes-base.code",
      "position": [
        -1968,
        -1376
      ]
    },
    {
      "id": "a9e9bf8c-c28d-4559-bf5d-9e862c2dcd3f",
      "name": "Check existing records",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1648,
        -1712
      ]
    },
    {
      "id": "d6262fcb-4edf-4dec-b2a1-00f44d009b61",
      "name": "New or existing records??",
      "type": "n8n-nodes-base.if",
      "position": [
        -1424,
        -1712
      ]
    },
    {
      "id": "6a0db2c0-cbae-44be-98b5-6224e08ed048",
      "name": "Add product alert to sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1152,
        -1728
      ]
    },
    {
      "id": "bf128592-efa1-4141-bc22-7a62e269dabd",
      "name": "Update existing alert in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1152,
        -1584
      ]
    },
    {
      "id": "5b0a10e4-8d5c-475c-b8c3-c2b5f1d0f927",
      "name": "Set stock priority",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1696,
        -880
      ]
    },
    {
      "id": "eb82656f-546f-448f-b94d-9e1f6ec3b305",
      "name": "High Priority Alert",
      "type": "n8n-nodes-base.set",
      "position": [
        -1424,
        -1056
      ]
    },
    {
      "id": "7a69f363-a34d-4007-8b4f-f7454dd6d5e6",
      "name": "Medium Priority Alert",
      "type": "n8n-nodes-base.set",
      "position": [
        -1424,
        -896
      ]
    },
    {
      "id": "a7c77eca-cf55-49fd-884a-557c8cf1869f",
      "name": "Low Priority Alert",
      "type": "n8n-nodes-base.set",
      "position": [
        -1424,
        -752
      ]
    },
    {
      "id": "b55380bd-a37b-4ccc-a8e4-73e27e9cb51a",
      "name": "Send slack alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1008,
        -784
      ]
    },
    {
      "id": "1ca657a5-e64e-4e12-9f90-d38bbc9f5540",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4512,
        -2160
      ],
      "parameters": {
        "width": 448,
        "height": 800,
        "content": "## How it works\n\n\nThis workflow automatically monitors your Shopify inventory and alerts your team when products are running low.\n\nEvery 5 hours, it checks all products in your Shopify store and revie"
      }
    },
    {
      "id": "5a114adf-c8f1-4a3b-bb10-74aff30644d3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3840,
        -1472
      ],
      "parameters": {
        "width": 784,
        "height": 368,
        "content": "## Fetch Products & Prepare data\n\nEvery 5 hours, the system automatically checks your Shopify store.\nIt collects product details like stock levels and prepares the data for further actions such as ale"
      }
    },
    {
      "id": "82d32f05-c6b0-442d-a3c9-d49ad0ce4a45",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3008,
        -1584
      ],
      "parameters": {
        "width": 1232,
        "height": 560,
        "content": "## Low-Stock Alert Processing\nThe system goes through each product one by one and checks whether the stock is running low. For low-stock items, it uses AI to create a clear and professional alert mess"
      }
    },
    {
      "id": "d0a81ef4-86e3-4703-8b21-946b61d9ff9a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1744,
        -1216
      ],
      "parameters": {
        "width": 928,
        "height": 656,
        "content": "## Priority-Based Alerts & Team Notification\nBased on how low the stock is, the system assigns a priority level (high, medium, or low) and prepares the right message for each case. It then sends a cle"
      }
    },
    {
      "id": "aef41bd0-8908-4d18-9f4a-be78bc432e94",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1744,
        -1888
      ],
      "parameters": {
        "width": 1104,
        "height": 560,
        "content": "## Alert Tracking & Record Management\nThe system checks your Google Sheet to see if a low-stock alert for the product already exists. If it’s a new product, it adds a fresh entry to the sheet; if it’s"
      }
    },
    {
      "id": "e87f49ed-6af7-4fc2-85ae-8a19f15b9612",
      "name": "Notify team",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -848,
        -1728
      ]
    }
  ],
  "connections": {
    "Notify team": {
      "main": [
        []
      ]
    },
    "Fetch Products": {
      "main": [
        [
          {
            "node": "Prepare Product data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check low stock": {
      "main": [
        [
          {
            "node": "Genrate Alert Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI text genrator": {
      "ai_languageModel": [
        [
          {
            "node": "Genrate Alert Message",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send slack alert": {
      "main": [
        [
          {
            "node": "Process each product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Low Priority Alert": {
      "main": [
        [
          {
            "node": "Send slack alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set stock priority": {
      "main": [
        [
          {
            "node": "High Priority Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Medium Priority Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Low Priority Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "High Priority Alert": {
      "main": [
        [
          {
            "node": "Send slack alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Product data": {
      "main": [
        [
          {
            "node": "Process each product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process each product": {
      "main": [
        [],
        [
          {
            "node": "Check low stock",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Formate Alert Message": {
      "main": [
        [
          {
            "node": "Check existing records",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set stock priority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Genrate Alert Message": {
      "main": [
        [
          {
            "node": "Formate Alert Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Medium Priority Alert": {
      "main": [
        [
          {
            "node": "Send slack alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check existing records": {
      "main": [
        [
          {
            "node": "New or existing records??",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger in Schedule time": {
      "main": [
        [
          {
            "node": "Fetch Products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New or existing records??": {
      "main": [
        [
          {
            "node": "Add product alert to sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update existing alert in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add product alert to sheet": {
      "main": [
        [
          {
            "node": "Notify team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update existing alert in sheet": {
      "main": [
        [
          {
            "node": "Process each product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}