{
  "name": "Shopify Competitor Price-Drop & Real-Time Stock Monitor",
  "nodes": [
    {
      "parameters": {
        "content": "## Shopify Competitor Price-Drop & Stock Monitor\n\nPolls competitor Shopify storefronts every 6 hours and surfaces in-stock products discounted by **15% or more** relative to `compare_at_price`.\n\n### Quick Setup\n1. Open **Fetch Products, Prices & Stock** and add an **HTTP Header Auth** credential (`Authorization`: `Bearer YOUR_APIFY_API_TOKEN`).\n2. List competitor domains in **Shopify Competitor Stores**.\n3. Route **Filter In-Stock Markdowns (>=15% Off)** into Slack, Google Sheets, or email alerts.\n\nThe free MCP endpoint `https://datatoll.app/mcp` needs no API key. All five sources share 100 calls per IP per 24 hours. Each call returns up to 50 records, or 5 videos for YouTube. For bulk or scheduled exports use the Apify Actor `tokenkite~shopify-intel` ($0 start fee).",
        "height": 340,
        "width": 400,
        "color": 4
      },
      "id": "e3b0a303-0003-4000-8000-000000000010",
      "name": "Sticky Note - Setup Guide",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-220, 160]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6
            }
          ]
        }
      },
      "id": "e3b0a303-0003-4000-8000-000000000001",
      "name": "Every 6 Hours",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [220, 300]
    },
    {
      "parameters": {
        "jsCode": "return [\n  { json: { store_domain: 'www.beardbrand.com', collection_handle: '', max_products: 250 } }\n];"
      },
      "id": "e3b0a303-0003-4000-8000-000000000002",
      "name": "Shopify Competitor Stores",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [440, 300]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apify.com/v2/acts/tokenkite~shopify-intel/run-sync-get-dataset-items",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify($json) }}",
        "options": {
          "timeout": 60000
        }
      },
      "id": "e3b0a303-0003-4000-8000-000000000003",
      "name": "Fetch Products, Prices & Stock",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [680, 300]
    },
    {
      "parameters": {
        "jsCode": "const deals = $input.all()\n  .map(item => item.json)\n  .filter(p => p.in_stock === true && typeof p.discount_pct === 'number' && p.discount_pct >= 15);\n\nreturn deals.map(p => ({\n  json: {\n    store: p.store_domain,\n    product_id: p.product_id,\n    title: p.title,\n    price_min: p.price_min,\n    compare_at_price_max: p.compare_at_price_max,\n    discount_pct: p.discount_pct,\n    variant_count: p.variant_count,\n    product_url: p.product_url\n  }\n}));"
      },
      "id": "e3b0a303-0003-4000-8000-000000000004",
      "name": "Filter In-Stock Markdowns (>=15% Off)",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [940, 300]
    }
  ],
  "connections": {
    "Every 6 Hours": {
      "main": [[{ "node": "Shopify Competitor Stores", "type": "main", "index": 0 }]]
    },
    "Shopify Competitor Stores": {
      "main": [[{ "node": "Fetch Products, Prices & Stock", "type": "main", "index": 0 }]]
    },
    "Fetch Products, Prices & Stock": {
      "main": [[{ "node": "Filter In-Stock Markdowns (>=15% Off)", "type": "main", "index": 0 }]]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
