{
  "name": "Optimize fleet routes and anomaly alerts with GPT-4, Slack and Postgres",
  "nodes": [
    {
      "id": "627f2408-4fcb-4440-b671-f926988b5bf7",
      "name": "Telemetry Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -640,
        288
      ]
    },
    {
      "id": "725a9a5f-bf3c-4146-9558-d1be7be0aa1a",
      "name": "Scheduled Data Sync",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -416,
        480
      ]
    },
    {
      "id": "e883c68e-b77a-4b8d-9241-cd82a71c1940",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -416,
        288
      ]
    },
    {
      "id": "a2d05c79-2348-4e76-b8b4-56567fbda40c",
      "name": "Merge Trigger Sources",
      "type": "n8n-nodes-base.merge",
      "position": [
        -192,
        384
      ]
    },
    {
      "id": "c2ec33d3-8714-414b-be32-464d811d8a63",
      "name": "Normalize Telemetry Data",
      "type": "n8n-nodes-base.code",
      "position": [
        32,
        384
      ]
    },
    {
      "id": "72accfed-afcd-44c6-ba40-e31c374ee7d9",
      "name": "Validate Data Quality",
      "type": "n8n-nodes-base.code",
      "position": [
        256,
        384
      ]
    },
    {
      "id": "87c646f7-eaca-44f9-81e8-c6eb7bfd7ac9",
      "name": "Remove Duplicate Events",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        480,
        384
      ]
    },
    {
      "id": "ffcceca6-bcd1-4e90-a764-b7ac08c346e4",
      "name": "Fetch Traffic & Weather Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        704,
        304
      ]
    },
    {
      "id": "2a23a207-2c57-4f77-998f-c0e2155c95e5",
      "name": "Merge Telemetry with External Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        928,
        384
      ]
    },
    {
      "id": "b06dc0ed-6106-4c6c-9033-54299c5fedcc",
      "name": "Route Optimization Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1152,
        384
      ]
    },
    {
      "id": "6c29ba5f-8a13-443c-b72d-19542f20edd8",
      "name": "OpenAI GPT-4 Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1152,
        608
      ]
    },
    {
      "id": "c8554c21-b60d-4cc7-84a9-91619d1f9c9b",
      "name": "Route Optimization Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1280,
        608
      ]
    },
    {
      "id": "c787c0d6-6691-4841-81b0-0f4a91a4d5aa",
      "name": "Anomaly Detection Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1504,
        384
      ]
    },
    {
      "id": "47a8effa-fb4e-49be-981b-8abf8863bc1c",
      "name": "OpenAI GPT-4 Model for Anomaly",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1504,
        608
      ]
    },
    {
      "id": "ac3745f0-29be-455a-9b23-41f0fa067eb1",
      "name": "Anomaly Detection Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1632,
        608
      ]
    },
    {
      "id": "b00f5bbd-e60e-4df9-80d1-1f3279961be0",
      "name": "Apply Business Rules",
      "type": "n8n-nodes-base.code",
      "position": [
        1856,
        384
      ]
    },
    {
      "id": "97fe74be-96a4-4b50-bdd3-d0200036061e",
      "name": "Route by Severity",
      "type": "n8n-nodes-base.switch",
      "position": [
        2080,
        352
      ]
    },
    {
      "id": "b6e656d2-2496-4dfb-a7cc-1d9002aaf619",
      "name": "Wait for Manual Review",
      "type": "n8n-nodes-base.wait",
      "position": [
        2528,
        576
      ]
    },
    {
      "id": "a7af45ad-d41b-4214-b854-2e86d223bc24",
      "name": "Store Telemetry Records",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2752,
        192
      ]
    },
    {
      "id": "6dd229bb-6cf8-4b54-90b8-b0d3aa12d36c",
      "name": "Store Incident Records",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2752,
        576
      ]
    },
    {
      "id": "13a1b415-47f8-4915-940b-1bed19dfc7c3",
      "name": "Generate Performance Report",
      "type": "n8n-nodes-base.postgres",
      "position": [
        3200,
        384
      ]
    },
    {
      "id": "1be20c7b-d4f8-40ba-bf96-e8db19b9bd9c",
      "name": "Notify Dispatchers via Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        2976,
        192
      ]
    },
    {
      "id": "deebd058-caaa-4938-8837-372cd858d55e",
      "name": "Email Operations Team",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2976,
        576
      ]
    },
    {
      "id": "a824e34a-048e-49e4-95f8-13287182104e",
      "name": "Alert Critical Incidents",
      "type": "n8n-nodes-base.slack",
      "position": [
        2304,
        384
      ]
    },
    {
      "id": "bd75cb8f-5da9-48ec-bccb-fa53cb51c991",
      "name": "Prepare Customer Notification",
      "type": "n8n-nodes-base.set",
      "position": [
        2528,
        384
      ]
    },
    {
      "id": "25343b2f-27bf-4fcb-8b22-58aa9d6821dc",
      "name": "Check if Re-routing Required",
      "type": "n8n-nodes-base.if",
      "position": [
        2752,
        384
      ]
    },
    {
      "id": "675860b0-298d-4ee0-8d8c-6c268a096d9b",
      "name": "Trigger Re-routing Action",
      "type": "n8n-nodes-base.code",
      "position": [
        2976,
        384
      ]
    },
    {
      "id": "26d790fd-f6e5-4897-98f7-87f1fa94bb7a",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3424,
        384
      ]
    },
    {
      "id": "4c7ff381-7b79-4cd5-a9a9-0fa4a38bbb0b",
      "name": "Data Ingestion Layer",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        -320
      ],
      "parameters": {
        "width": 516,
        "height": 344,
        "content": "## Prerequisites\nVeterinary practice management software with API/webhook capabilities, AI service API access\n## Use Cases\nMulti-location veterinary hospitals coordinating inventory across sites\n## Cu"
      }
    },
    {
      "id": "6b742c2f-7c28-43c3-86f0-9822cc9e59dc",
      "name": "AI Intelligence Layer",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        -256
      ],
      "parameters": {
        "width": 420,
        "height": 280,
        "content": "## Setup Steps\n1. Configure webhook or schedule trigger for veterinary management system inventory data sync\n2. Add AI model API keys for inventory quality validation\n3. Connect supplier email system "
      }
    },
    {
      "id": "51532f2e-d669-4fef-88e0-db785ab0623f",
      "name": "Notification & Action Layer",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        -208
      ],
      "parameters": {
        "width": 852,
        "height": 216,
        "content": "## How It Works\nThis workflow automates veterinary clinic operations and client communications for animal hospitals and veterinary practices managing appointments, inventory, and patient care. It solv"
      }
    },
    {
      "id": "965a2457-b1b1-4d4b-83b8-268dc95b8343",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        64
      ],
      "parameters": {
        "width": 1808,
        "height": 768,
        "content": "\n## Multi-Channel Distribution\n**Why:** Coordinated delivery through supplier emails, client appointment reminders, follow-up care instructions, and automated satisfaction surveys ensures comprehensiv"
      }
    },
    {
      "id": "ce4c4059-60fa-4421-a5d1-8b16c4dc1948",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        144
      ],
      "parameters": {
        "width": 704,
        "height": 752,
        "content": "## Dual AI Processing Streams\n**Why:** Parallel processing generates supplier-specific restocking recommendations and client-personalized appointment communications, optimizing both supply chain and p"
      }
    },
    {
      "id": "4cbd2338-57ff-4dad-a198-ac6420637c56",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        144
      ],
      "parameters": {
        "width": 1824,
        "height": 640,
        "content": "## Scheduled Inventory Assessment\n**Why:** Automated data sync triggers AI-powered quality checks and stock level analysis, identifying critical supply shortages before they impact patient care."
      }
    }
  ],
  "connections": {
    "Route by Severity": {
      "main": [
        [
          {
            "node": "Store Telemetry Records",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Manual Review",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Alert Critical Incidents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI GPT-4 Model": {
      "ai_languageModel": [
        [
          {
            "node": "Route Optimization Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Scheduled Data Sync": {
      "main": [
        [
          {
            "node": "Merge Trigger Sources",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Apply Business Rules": {
      "main": [
        [
          {
            "node": "Route by Severity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Operations Team": {
      "main": [
        [
          {
            "node": "Generate Performance Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Trigger Sources": {
      "main": [
        [
          {
            "node": "Normalize Telemetry Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Data Quality": {
      "main": [
        [
          {
            "node": "Remove Duplicate Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Incident Records": {
      "main": [
        [
          {
            "node": "Email Operations Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Manual Review": {
      "main": [
        [
          {
            "node": "Store Incident Records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Merge Trigger Sources",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anomaly Detection Agent": {
      "main": [
        [
          {
            "node": "Apply Business Rules",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicate Events": {
      "main": [
        [
          {
            "node": "Fetch Traffic & Weather Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Telemetry with External Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Telemetry Records": {
      "main": [
        [
          {
            "node": "Notify Dispatchers via Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Alert Critical Incidents": {
      "main": [
        [
          {
            "node": "Prepare Customer Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Telemetry Data": {
      "main": [
        [
          {
            "node": "Validate Data Quality",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Optimization Agent": {
      "main": [
        [
          {
            "node": "Anomaly Detection Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telemetry Webhook Trigger": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Re-routing Action": {
      "main": [
        [
          {
            "node": "Generate Performance Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Performance Report": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Re-routing Required": {
      "main": [
        [
          {
            "node": "Trigger Re-routing Action",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Traffic & Weather Data": {
      "main": [
        [
          {
            "node": "Merge Telemetry with External Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Notify Dispatchers via Slack": {
      "main": [
        [
          {
            "node": "Generate Performance Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Customer Notification": {
      "main": [
        [
          {
            "node": "Check if Re-routing Required",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI GPT-4 Model for Anomaly": {
      "ai_languageModel": [
        [
          {
            "node": "Anomaly Detection Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Anomaly Detection Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Anomaly Detection Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Route Optimization Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Route Optimization Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Merge Telemetry with External Data": {
      "main": [
        [
          {
            "node": "Route Optimization Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}