{
  "name": "Monitor competitor prices and send OpenAI analysis alerts via Slack and Gmail",
  "nodes": [
    {
      "id": "e179db86-9c63-4942-a4a4-f76b4eb10e00",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -320
      ],
      "parameters": {
        "width": 488,
        "height": 592,
        "content": "## Competitor Price Monitoring with AI-Powered Alerts\n\n### Overview\nAutomatically monitors competitor pricing on a scheduled basis, detects significant price changes using Compare Datasets, and sends "
      }
    },
    {
      "id": "bbfdd600-b8f0-4828-9ae7-80feab951c5a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -16
      ],
      "parameters": {
        "width": 300,
        "height": 540,
        "content": "### Step 1: Scheduled Price Collection\n- Cron trigger runs at configured intervals\n- Fetches competitor price data via HTTP requests\n- Retrieves previous price snapshot from storage"
      }
    },
    {
      "id": "0072e90d-0f72-4dda-815b-40044ec8f1fe",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -64
      ],
      "parameters": {
        "width": 360,
        "height": 716,
        "content": "### Step 2: Compare Datasets Analysis\n- Uses Compare Datasets node to detect changes\n- Outputs: In A only (removed), Same, Different, In B only (new)\n- Calculates percentage change for each product"
      }
    },
    {
      "id": "06ab5f42-da9c-461a-bc4c-37a41651f62f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -64
      ],
      "parameters": {
        "width": 360,
        "height": 716,
        "content": "### Step 3: AI Analysis & Severity Assessment\n- AI Agent evaluates competitive implications\n- Generates strategic recommendations\n- Classifies alert urgency (urgent/routine/log-only)"
      }
    },
    {
      "id": "46934c62-e331-438f-be94-aef9c0b324f3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1648,
        -64
      ],
      "parameters": {
        "width": 380,
        "height": 736,
        "content": "### Step 4: Smart Alert Routing & Storage\n- Routes to Slack for urgent changes (>10%)\n- Sends Email digest for routine changes (5-10%)\n- Updates price history in Google Sheets\n- Logs all monitoring ac"
      }
    },
    {
      "id": "c9e94fa8-0b08-4b30-ad1d-80c3b0412160",
      "name": "Price Check Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        64,
        256
      ]
    },
    {
      "id": "b427b57d-b57d-42a6-96e4-b26796e57389",
      "name": "Initialize Monitoring Session",
      "type": "n8n-nodes-base.set",
      "position": [
        288,
        256
      ]
    },
    {
      "id": "0c514f71-a7f3-41d5-ac4f-ef63221dc8b0",
      "name": "Fetch Current Prices",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        496,
        160
      ]
    },
    {
      "id": "be3a2b1b-9412-48ed-8cbd-3553a2f7e9b7",
      "name": "Fetch Previous Prices",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        496,
        368
      ]
    },
    {
      "id": "cdf06488-beb7-4e0c-aa44-97552ae65820",
      "name": "Normalize Current Prices",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        160
      ]
    },
    {
      "id": "eb11f5bf-1b6f-48f3-842c-34caa2ddf7fc",
      "name": "Normalize Previous Prices",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        368
      ]
    },
    {
      "id": "188491cb-5d62-4a6e-a591-6c1c1b456713",
      "name": "Compare Price Datasets",
      "type": "n8n-nodes-base.compareDatasets",
      "position": [
        960,
        256
      ]
    },
    {
      "id": "0a761044-7851-4757-92ef-ac585b925d57",
      "name": "Process Removed Products",
      "type": "n8n-nodes-base.code",
      "position": [
        1200,
        64
      ]
    },
    {
      "id": "f9a9879b-5772-457a-b695-df7d959f4f92",
      "name": "Process Unchanged",
      "type": "n8n-nodes-base.code",
      "position": [
        1200,
        208
      ]
    },
    {
      "id": "55182390-fa76-454f-ac43-a1b19ece2486",
      "name": "Process Changed Prices",
      "type": "n8n-nodes-base.code",
      "position": [
        1200,
        336
      ]
    },
    {
      "id": "ed3127cb-9d46-44eb-9aff-a5f82b743426",
      "name": "Process New Products",
      "type": "n8n-nodes-base.code",
      "position": [
        1200,
        480
      ]
    },
    {
      "id": "880e24a7-8950-42b7-a06d-667965cf7b47",
      "name": "Merge All Changes",
      "type": "n8n-nodes-base.merge",
      "position": [
        1424,
        256
      ]
    },
    {
      "id": "158ae9fa-70ef-4285-936c-b5a679daebaa",
      "name": "Filter Significant Changes",
      "type": "n8n-nodes-base.filter",
      "position": [
        1616,
        256
      ]
    },
    {
      "id": "8b62163f-7658-4091-a168-19d996ea18c5",
      "name": "AI Price Analyst",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1840,
        256
      ]
    },
    {
      "id": "4e00fa84-a5ec-409a-9592-5d475054a936",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1840,
        480
      ]
    },
    {
      "id": "dbaafecc-2bda-475b-ba54-6ab17358f200",
      "name": "Parse AI Analysis",
      "type": "n8n-nodes-base.code",
      "position": [
        2064,
        256
      ]
    },
    {
      "id": "6a755d41-6ab1-442e-bebd-6590bd3d98e7",
      "name": "Route by Alert Level",
      "type": "n8n-nodes-base.switch",
      "position": [
        2288,
        256
      ]
    },
    {
      "id": "67a5356e-383e-4e6e-b44a-e2eb3d2e5817",
      "name": "Slack Urgent Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        2528,
        160
      ]
    },
    {
      "id": "d3b12e45-21a0-4792-b90d-114e074ff982",
      "name": "Email Routine Alert",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2528,
        320
      ]
    },
    {
      "id": "ef6cf86c-bf55-47f7-a39a-2d14b62aa290",
      "name": "Log Low Priority Changes",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2528,
        480
      ]
    },
    {
      "id": "ccc1f4e7-69c1-4b76-a2ca-eb0f09f9fa37",
      "name": "Merge Alert Results",
      "type": "n8n-nodes-base.merge",
      "position": [
        2736,
        256
      ]
    },
    {
      "id": "65c2d6d7-5c17-4cf0-9bed-ba5adddf91c4",
      "name": "Prepare Storage Update",
      "type": "n8n-nodes-base.code",
      "position": [
        2736,
        464
      ]
    },
    {
      "id": "a4c13601-986e-4876-b2a7-3f7dacb124b9",
      "name": "Update Price History",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2960,
        464
      ]
    },
    {
      "id": "ac8b59e3-749f-46d4-b9e5-78f0506b618c",
      "name": "Log Monitoring Run",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2960,
        256
      ]
    }
  ],
  "connections": {
    "AI Price Analyst": {
      "main": [
        [
          {
            "node": "Parse AI Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge All Changes": {
      "main": [
        [
          {
            "node": "Filter Significant Changes",
            "type": "main",
            "index": 0
          },
          {
            "node": "Prepare Storage Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Price Analyst",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Analysis": {
      "main": [
        [
          {
            "node": "Route by Alert Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Unchanged": {
      "main": [
        [
          {
            "node": "Merge All Changes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack Urgent Alert": {
      "main": [
        [
          {
            "node": "Merge Alert Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Routine Alert": {
      "main": [
        [
          {
            "node": "Merge Alert Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Alert Results": {
      "main": [
        [
          {
            "node": "Log Monitoring Run",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Current Prices": {
      "main": [
        [
          {
            "node": "Normalize Current Prices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Price Check Schedule": {
      "main": [
        [
          {
            "node": "Initialize Monitoring Session",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process New Products": {
      "main": [
        [
          {
            "node": "Merge All Changes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Alert Level": {
      "main": [
        [
          {
            "node": "Slack Urgent Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Email Routine Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Low Priority Changes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Previous Prices": {
      "main": [
        [
          {
            "node": "Normalize Previous Prices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare Price Datasets": {
      "main": [
        [
          {
            "node": "Process Removed Products",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Process Unchanged",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Process Changed Prices",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Process New Products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Storage Update": {
      "main": [
        [
          {
            "node": "Update Price History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Changed Prices": {
      "main": [
        [
          {
            "node": "Merge All Changes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Low Priority Changes": {
      "main": [
        [
          {
            "node": "Merge Alert Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Normalize Current Prices": {
      "main": [
        [
          {
            "node": "Compare Price Datasets",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Process Removed Products": {
      "main": [
        [
          {
            "node": "Merge All Changes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Previous Prices": {
      "main": [
        [
          {
            "node": "Compare Price Datasets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Significant Changes": {
      "main": [
        [
          {
            "node": "AI Price Analyst",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Initialize Monitoring Session": {
      "main": [
        [
          {
            "node": "Fetch Current Prices",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Previous Prices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}