AutomationFlowsWeb Scraping › Optiroute - Reroute Alert Workflow

Optiroute - Reroute Alert Workflow

OptiRoute - Reroute Alert Workflow. Uses httpRequest. Webhook trigger; 10 nodes.

Webhook trigger★★★★☆ complexity10 nodesHTTP Request
Web Scraping Trigger: Webhook Nodes: 10 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "OptiRoute - Reroute Alert Workflow",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "optiroute-webhook",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "event",
              "value": "={{ $json.body.event }}"
            },
            {
              "name": "trackingId",
              "value": "={{ $json.body.shipment.trackingId }}"
            },
            {
              "name": "shipmentId",
              "value": "={{ $json.body.shipment.id }}"
            },
            {
              "name": "priority",
              "value": "={{ $json.body.shipment.priority }}"
            },
            {
              "name": "isAnomaly",
              "value": "={{ $json.body.alert ? $json.body.alert.isAnomaly : false }}"
            },
            {
              "name": "severity",
              "value": "={{ $json.body.alert ? $json.body.alert.severity : 'low' }}"
            },
            {
              "name": "cycleId",
              "value": "={{ $json.body.cycleId }}"
            }
          ]
        },
        "options": {}
      },
      "id": "set-node",
      "name": "Extract Fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.event }}",
              "value2": "critical_risk"
            }
          ]
        }
      },
      "id": "if-critical",
      "name": "Is Critical Risk?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json.isAnomaly }}",
              "value2": true
            }
          ]
        }
      },
      "id": "if-anomaly",
      "name": "Is Anomaly?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        850,
        200
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "notificationType",
              "value": "HIGH_PRIORITY_ANOMALY"
            },
            {
              "name": "alertMessage",
              "value": "\ud83d\udea8 ANOMALY DETECTED: {{ $json.trackingId }}"
            },
            {
              "name": "description",
              "value": "Multiple hubs experiencing critical risk simultaneously. Immediate action required."
            }
          ]
        },
        "options": {}
      },
      "id": "prepare-high-priority",
      "name": "Prepare High Priority Alert",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        1050,
        100
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "notificationType",
              "value": "STANDARD_ALERT"
            },
            {
              "name": "alertMessage",
              "value": "\ud83d\udce6 Shipment Update: {{ $json.trackingId }}"
            },
            {
              "name": "description",
              "value": "Route optimization completed. Shipment rerouted for better delivery."
            }
          ]
        },
        "options": {}
      },
      "id": "prepare-standard",
      "name": "Prepare Standard Alert",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        1050,
        300
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "notificationType",
              "value": "INFO"
            },
            {
              "name": "alertMessage",
              "value": "\u2139\ufe0f Workflow Completed: {{ $json.trackingId }}"
            },
            {
              "name": "description",
              "value": "Workflow execution completed successfully."
            }
          ]
        },
        "options": {}
      },
      "id": "prepare-info",
      "name": "Prepare Info Message",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        850,
        400
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $env.N8N_MOCK_WEBHOOK_URL || 'https://webhook.site/unique-url' }}",
        "jsonParameters": true,
        "options": {},
        "bodyParametersJson": "={{ JSON.stringify($json) }}"
      },
      "id": "send-mock-notification",
      "name": "Send to Mock Endpoint",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1250,
        300
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "status",
              "value": "sent"
            },
            {
              "name": "executionId",
              "value": "={{ $workflow.id }}-{{ $execution.id }}"
            },
            {
              "name": "timestamp",
              "value": "={{ new Date().toISOString() }}"
            }
          ]
        },
        "options": {}
      },
      "id": "log-execution",
      "name": "Log Execution",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        1450,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ success: true, executionId: $json.executionId, timestamp: $json.timestamp }) }}"
      },
      "id": "webhook-response",
      "name": "Webhook Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1650,
        300
      ]
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Extract Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Fields": {
      "main": [
        [
          {
            "node": "Is Critical Risk?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Critical Risk?": {
      "main": [
        [
          {
            "node": "Is Anomaly?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Info Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Anomaly?": {
      "main": [
        [
          {
            "node": "Prepare High Priority Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Standard Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare High Priority Alert": {
      "main": [
        [
          {
            "node": "Send to Mock Endpoint",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Standard Alert": {
      "main": [
        [
          {
            "node": "Send to Mock Endpoint",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Info Message": {
      "main": [
        [
          {
            "node": "Send to Mock Endpoint",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send to Mock Endpoint": {
      "main": [
        [
          {
            "node": "Log Execution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Execution": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "versionId": "1.0.0",
  "id": "optiroute-reroute-alert",
  "tags": [
    {
      "name": "OptiRoute",
      "id": "1"
    },
    {
      "name": "Logistics",
      "id": "2"
    }
  ]
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

OptiRoute - Reroute Alert Workflow. Uses httpRequest. Webhook trigger; 10 nodes.

Source: https://github.com/mukund06s/OptiRoute-AI/blob/51bdb4e1a0d34c4c1d3ec06eee59b564e4aa4034/n8n-workflows/reroute-alert.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di

n8n, Execute Workflow Trigger, HTTP Request +1
Web Scraping

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

HTTP Request, Ssh
Web Scraping

eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.

HTTP Request
Web Scraping

This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia

HTTP Request
Web Scraping

This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c

HTTP Request