{
  "name": "Shopify Low Stock to Telegram Alert",
  "nodes": [
    {
      "parameters": {
        "content": "## Shopify Low Stock to Telegram Alert\n\nWatches inventory changes and pings Telegram when a product drops to or below your threshold, so you never miss a restock.\n\n### Setup\n1. **Inventory changed in Shopify** -> add a Shopify Access Token credential (Developer Dashboard app, read inventory and products).\n2. **Below threshold?** -> set your low stock number (default 5) in the condition.\n3. Create a Telegram bot with @BotFather, then add the token and your chat ID on **Send to Telegram** (message @userinfobot to get your chat ID).\n4. Save and activate.\n\nTip: to show the product name in the alert, add a Shopify lookup before the Telegram step.\n\nMore free Shopify automations and AI agents: https://www.easyworkflows.net/templates/",
        "height": 400,
        "width": 460,
        "color": 4
      },
      "id": "b1111111-1111-4111-8111-bbbbbbbbbbbb",
      "name": "Read me first",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-500, -40]
    },
    {
      "parameters": {
        "authentication": "accessToken",
        "topic": "inventory_levels/update"
      },
      "id": "b2222222-2222-4222-8222-bbbbbbbbbbbb",
      "name": "Inventory changed in Shopify",
      "type": "n8n-nodes-base.shopifyTrigger",
      "typeVersion": 1,
      "position": [60, 120],
      "webhookId": "b1b2c3d4-e5f6-4a1b-8c2d-telegramstock"
    },
    {
      "parameters": {
        "conditions": {
          "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "loose", "version": 2 },
          "conditions": [
            {
              "id": "b4condition-1111-4111-8111-bbbbbbbbbbbb",
              "leftValue": "={{ $json.available }}",
              "rightValue": 5,
              "operator": { "type": "number", "operation": "lte" }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "b3333333-3333-4333-8333-bbbbbbbbbbbb",
      "name": "Below threshold?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [320, 120]
    },
    {
      "parameters": {
        "resource": "message",
        "operation": "sendMessage",
        "chatId": "",
        "text": "=Low stock alert. An inventory item dropped to {{ $json.available }} units. Item ID {{ $json.inventory_item_id }}. Check your Shopify inventory and reorder if needed.",
        "additionalFields": {}
      },
      "id": "b4444444-4444-4444-8444-bbbbbbbbbbbb",
      "name": "Send to Telegram",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [600, 120]
    }
  ],
  "connections": {
    "Inventory changed in Shopify": { "main": [[{ "node": "Below threshold?", "type": "main", "index": 0 }]] },
    "Below threshold?": { "main": [[{ "node": "Send to Telegram", "type": "main", "index": 0 }], []] }
  },
  "settings": { "executionOrder": "v1" },
  "active": false,
  "pinData": {},
  "meta": { "templateCredsSetupCompleted": false }
}
