AutomationFlowsAI & RAG › Optimize Maritime Routes and Disruption Response with Openai and Slack

Optimize Maritime Routes and Disruption Response with Openai and Slack

ByCheng Siong Chin @cschin on n8n.io

This workflow runs every 15 minutes to pull vessel telemetry/AIS data, enrich it with port and weather context, and use OpenAI to detect disruptions, simulate route alternatives, and generate an executive briefing that requires human approval before notifying teams in Slack.…

Cron / scheduled trigger★★★★☆ complexityAI-powered25 nodesHTTP RequestAgentOpenAI ChatOutput Parser StructuredSlack
AI & RAG Trigger: Cron / scheduled Nodes: 25 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #16342 — we link there as the canonical source.

This workflow follows the Agent → HTTP Request recipe pattern — see all workflows that pair these two integrations.

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
{
  "id": "OOnviVRFq9mLZsJ3",
  "name": "Agentic AI maritime disruption response and voyage optimization",
  "tags": [],
  "nodes": [
    {
      "id": "a5a749da-d6bc-4b0d-aa4d-fa5e40665708",
      "name": "Monitor Maritime Operations",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        240,
        208
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 15
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "3982eaa8-9f99-46fb-b71e-2f1cda688508",
      "name": "Fetch Vessel Telemetry & AIS Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        464,
        208
      ],
      "parameters": {
        "url": "<__PLACEHOLDER_VALUE__AIS/Telemetry API endpoint (e.g., https://api.maritime-data.com/v1/vessels/telemetry)__>",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "fleet_id",
              "value": "<__PLACEHOLDER_VALUE__Your fleet ID__>"
            },
            {
              "name": "include",
              "value": "position,speed,fuel,weather,performance"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "ed5255c8-77be-4327-99a1-f4469165f2fa",
      "name": "Fetch Port & Weather Context",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        688,
        208
      ],
      "parameters": {
        "url": "<__PLACEHOLDER_VALUE__Weather/Port API endpoint (e.g., https://api.maritime-weather.com/v1/forecast)__>",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "lat",
              "value": "={{ $json.position.lat }}"
            },
            {
              "name": "lon",
              "value": "={{ $json.position.lon }}"
            },
            {
              "name": "route_id",
              "value": "={{ $json.route_id }}"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "810ede34-c8df-4224-8e2d-b3fc38089f02",
      "name": "Stage 1: Anomaly Detection Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        912,
        208
      ],
      "parameters": {
        "text": "=Analyze the following vessel telemetry and AIS data to detect anomalies:\n\nVessel ID: {{ $json.vessel_id }}\nCurrent Speed: {{ $json.speed_knots }} knots\nFuel Consumption: {{ $json.fuel_consumption }} tons/day\nPerformance Deviation: {{ $json.performance_deviation }}%\nWeather: Wind {{ $json.weather_conditions.wind_speed }} knots, Wave Height {{ $json.weather_conditions.wave_height }}m\nHistorical Baseline Speed: {{ $json.historical_baseline.avg_speed_knots }} knots\nHistorical Baseline Fuel: {{ $json.historical_baseline.avg_fuel_consumption }} tons/day",
        "options": {
          "systemMessage": "You are a maritime anomaly detection specialist. Detect anomalies in vessel performance, fuel efficiency, or operational parameters. Consider weather impact, performance deviations, and compare against historical baselines. Classify severity as low, medium, or high based on operational and safety impact."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "51dba8e5-5056-4f7a-958f-36f95ded03f8",
      "name": "OpenAI Model - Anomaly Detection",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        928,
        432
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini"
        },
        "options": {
          "temperature": 0.2
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "bf432476-e199-4c12-80df-ad666601feca",
      "name": "Anomaly Detection Schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1056,
        432
      ],
      "parameters": {
        "jsonSchemaExample": {
          "summary": "Vessel experiencing 8.5% performance degradation with elevated fuel consumption",
          "severity": "high",
          "confidence": 0.92,
          "anomaly_type": "performance_degradation",
          "affected_metrics": [
            "speed",
            "fuel_consumption"
          ],
          "anomaly_detected": true
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "b04bf605-b1e0-4c71-8a5b-4d347415f457",
      "name": "Stage 2: Context Aggregation Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1264,
        208
      ],
      "parameters": {
        "text": "=Aggregate and analyze the following contextual data for maritime disruption response:\n\nANOMALY DETECTED:\nType: {{ $(\"Stage 1: Anomaly Detection Agent\").item.json.output.output.anomaly_type }}\nSeverity: {{ $(\"Stage 1: Anomaly Detection Agent\").item.json.output.output.severity }}\nSummary: {{ $(\"Stage 1: Anomaly Detection Agent\").item.json.output.output.summary }}\n\nVESSEL DATA:\nVessel: {{ $(\"Fetch Port & Weather Context\").item.json.vessel_id }}\nCurrent Position: {{ $(\"Fetch Port & Weather Context\").item.json.position.lat }}, {{ $(\"Fetch Port & Weather Context\").item.json.position.lon }}\nRoute: {{ $(\"Fetch Port & Weather Context\").item.json.route_id }}\nOriginal ETA: {{ $(\"Fetch Port & Weather Context\").item.json.eta_original }}\nCargo Value: ${{ $(\"Fetch Port & Weather Context\").item.json.cargo_value }}\n\nWEATHER FORECAST:\nNext 24h: Wind {{ $(\"Fetch Port & Weather Context\").item.json.forecast.next_24h.wind_speed }} knots, Wave {{ $(\"Fetch Port & Weather Context\").item.json.forecast.next_24h.wave_height }}m, Storm Probability {{ $(\"Fetch Port & Weather Context\").item.json.forecast.next_24h.storm_probability }}\nNext 48h: Wind {{ $(\"Fetch Port & Weather Context\").item.json.forecast.next_48h.wind_speed }} knots, Wave {{ $(\"Fetch Port & Weather Context\").item.json.forecast.next_48h.wave_height }}m\n\nPORT STATUS:\nDestination: {{ $(\"Fetch Port & Weather Context\").item.json.port_congestion.destination_port }}\nCongestion Level: {{ $(\"Fetch Port & Weather Context\").item.json.port_congestion.congestion_level }}\nAverage Wait: {{ $(\"Fetch Port & Weather Context\").item.json.port_congestion.avg_wait_hours }} hours\nBerth Availability: {{ $(\"Fetch Port & Weather Context\").item.json.port_congestion.berth_availability }}",
        "options": {
          "systemMessage": "You are a maritime operations context analyst. Synthesize information to assess operational context, identify risk factors, determine recommended action category (route optimization, speed adjustment, port diversion), and evaluate urgency level for decision-making."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "7b5d88c0-08d6-478e-82b2-d0a107365b3e",
      "name": "OpenAI Model - Context Aggregation",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1280,
        432
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini"
        },
        "options": {
          "temperature": 0.3
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "7dfecddd-fcb5-4666-af75-1389d4096b19",
      "name": "Context Aggregation Schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1408,
        432
      ],
      "parameters": {
        "jsonSchemaExample": {
          "risk_factors": [
            "deteriorating_weather",
            "port_delays",
            "performance_issues"
          ],
          "urgency_level": "high",
          "context_summary": "Vessel facing performance degradation with approaching storm and high port congestion at destination",
          "operational_context": {
            "weather_risk": "high",
            "route_viability": "compromised",
            "time_sensitivity": "critical",
            "port_congestion_impact": "significant"
          },
          "recommended_action_category": "route_optimization"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "dfcd5d7e-1e31-44d7-9dc2-b36366cc78b1",
      "name": "Stage 3: Route Simulation Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1616,
        208
      ],
      "parameters": {
        "text": "=Evaluate alternative routing and speed strategies based on the following operational context:\n\nCONTEXT ANALYSIS:\nWeather Risk: {{ $(\"Stage 2: Context Aggregation Agent\").item.json.output.output.operational_context.weather_risk }}\nPort Congestion Impact: {{ $(\"Stage 2: Context Aggregation Agent\").item.json.output.output.operational_context.port_congestion_impact }}\nRoute Viability: {{ $(\"Stage 2: Context Aggregation Agent\").item.json.output.output.operational_context.route_viability }}\nUrgency: {{ $(\"Stage 2: Context Aggregation Agent\").item.json.output.output.urgency_level }}\nRisk Factors: {{ $(\"Stage 2: Context Aggregation Agent\").item.json.output.output.risk_factors }}\n\nVESSEL CONSTRAINTS:\nCurrent Speed: {{ $(\"Fetch Port & Weather Context\").item.json.speed_knots }} knots\nFuel Consumption: {{ $(\"Fetch Port & Weather Context\").item.json.fuel_consumption }} tons/day\nCargo Value: ${{ $(\"Fetch Port & Weather Context\").item.json.cargo_value }}\nOriginal ETA: {{ $(\"Fetch Port & Weather Context\").item.json.eta_original }}\n\nWEATHER FORECAST:\n24h: Wind {{ $(\"Fetch Port & Weather Context\").item.json.forecast.next_24h.wind_speed }} knots, Storm Risk {{ $(\"Fetch Port & Weather Context\").item.json.forecast.next_24h.storm_probability }}\n48h: Wind {{ $(\"Fetch Port & Weather Context\").item.json.forecast.next_48h.wind_speed }} knots\n\nPORT STATUS:\nCongestion: {{ $(\"Fetch Port & Weather Context\").item.json.port_congestion.congestion_level }}\nWait Time: {{ $(\"Fetch Port & Weather Context\").item.json.port_congestion.avg_wait_hours }} hours",
        "options": {
          "systemMessage": "You are a maritime route optimization specialist. Generate 2-3 alternative routing/speed strategies. For each option, calculate: distance (nautical miles), duration (hours), fuel consumption (tons), carbon emissions (tons CO2), demurrage costs (USD, based on delay and cargo value), weather risk level, and total operational cost. Recommend the optimal route based on carbon emissions, demurrage trade-offs, safety, and cost efficiency."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "3ff7e21b-c41d-4281-8e18-1df2019d485d",
      "name": "OpenAI Model - Route Simulation",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1632,
        432
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini"
        },
        "options": {
          "temperature": 0.4
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "72d49a46-342b-40ca-9b3e-eba95f1f50cd",
      "name": "Route Simulation Schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1760,
        432
      ],
      "parameters": {
        "jsonSchemaExample": {
          "recommended_route": "ALT-ROUTE-01",
          "alternative_routes": [
            {
              "route_id": "ALT-ROUTE-01",
              "description": "Northern route avoiding storm system",
              "distance_nm": 2850,
              "weather_risk": "low",
              "total_cost_usd": 330000,
              "demurrage_cost_usd": 45000,
              "carbon_emissions_tons": 890,
              "fuel_consumption_tons": 285,
              "estimated_duration_hours": 190
            },
            {
              "route_id": "CURRENT-OPTIMIZED",
              "description": "Current route with speed optimization",
              "distance_nm": 2650,
              "weather_risk": "high",
              "total_cost_usd": 337000,
              "demurrage_cost_usd": 72000,
              "carbon_emissions_tons": 830,
              "fuel_consumption_tons": 265,
              "estimated_duration_hours": 185
            }
          ],
          "optimization_rationale": "Northern route reduces weather risk and demurrage costs despite 7% longer distance"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "b28e90fc-9770-409c-9ac5-99b312f4a71f",
      "name": "Stage 4: Executive Briefing Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1968,
        208
      ],
      "parameters": {
        "text": "=Generate a comprehensive executive briefing for human approval based on the following analysis:\n\nANOMALY DETECTION:\n{{ $(\"Stage 1: Anomaly Detection Agent\").item.json.output.output.summary }}\nSeverity: {{ $(\"Stage 1: Anomaly Detection Agent\").item.json.output.output.severity }}\nConfidence: {{ $(\"Stage 1: Anomaly Detection Agent\").item.json.output.output.confidence }}\n\nOPERATIONAL CONTEXT:\n{{ $(\"Stage 2: Context Aggregation Agent\").item.json.output.output.context_summary }}\nWeather Risk: {{ $(\"Stage 2: Context Aggregation Agent\").item.json.output.output.operational_context.weather_risk }}\nPort Impact: {{ $(\"Stage 2: Context Aggregation Agent\").item.json.output.output.operational_context.port_congestion_impact }}\nUrgency: {{ $(\"Stage 2: Context Aggregation Agent\").item.json.output.output.urgency_level }}\n\nROUTE SIMULATION RESULTS:\nRecommended Route: {{ $(\"Stage 3: Route Simulation Agent\").item.json.output.output.recommended_route }}\nRationale: {{ $(\"Stage 3: Route Simulation Agent\").item.json.output.output.optimization_rationale }}\n\nALTERNATIVE ROUTES:\n{{ $(\"Stage 3: Route Simulation Agent\").item.json.output.output.alternative_routes }}\n\nVESSEL INFORMATION:\nVessel: {{ $(\"Fetch Port & Weather Context\").item.json.vessel_id }}\nCargo Value: ${{ $(\"Fetch Port & Weather Context\").item.json.cargo_value }}\nOriginal ETA: {{ $(\"Fetch Port & Weather Context\").item.json.eta_original }}",
        "options": {
          "systemMessage": "You are a maritime executive briefing specialist. Create a structured executive briefing that includes: 1. Executive Summary (2-3 sentences), 2. Situation Assessment (anomaly, weather, port status, urgency), 3. Recommended Action with expected outcomes (cost, emissions, risk, ETA impact), 4. Regulatory compliance statement (IMO emissions, safety regulations), 5. Alternative options with pros/cons, 6. Master authority note emphasizing final decision rests with vessel master, 7. Approval requirement and deadline. Ensure the briefing is clear, actionable, and emphasizes human-in-the-loop oversight and master authority."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "f7c0f2df-6f24-440f-9a41-a51f93cfa0fb",
      "name": "OpenAI Model - Executive Briefing",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1984,
        432
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini"
        },
        "options": {
          "temperature": 0.3
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "882173ea-c016-4f98-8ea4-27783199f1bb",
      "name": "Executive Briefing Schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2112,
        432
      ],
      "parameters": {
        "jsonSchemaExample": {
          "approval_deadline": "2024-03-10T12:00:00Z",
          "approval_required": true,
          "executive_summary": "Vessel MV-ATLAS-001 experiencing performance degradation with approaching storm and port congestion",
          "recommended_action": {
            "safety_impact": "Significantly improved - avoids storm system",
            "expected_outcomes": {
              "cost_savings_usd": 7000,
              "eta_impact_hours": 5,
              "weather_risk_reduction": "High to Low",
              "emission_reduction_tons": -60
            },
            "regulatory_compliance": "Compliant with IMO 2023 emissions regulations",
            "primary_recommendation": "Divert to northern route (ALT-ROUTE-01)"
          },
          "alternative_options": [
            {
              "cons": "High weather risk, increased demurrage ($72k)",
              "pros": "Lower emissions (830 tons CO2)",
              "option": "Maintain current route with speed reduction",
              "recommendation": "Not recommended due to safety concerns"
            }
          ],
          "situation_assessment": {
            "anomaly": "Performance degradation: 8.5% below baseline",
            "urgency": "High - immediate action required",
            "weather": "Storm system approaching with 65% probability in 24h",
            "port_status": "High congestion at Tokyo with 18-hour average wait"
          },
          "master_authority_note": "Final decision authority rests with vessel master. This recommendation is advisory only."
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "f94f6a55-f07e-4be2-993c-c8a12e0e5bc2",
      "name": "Format Approval Request",
      "type": "n8n-nodes-base.set",
      "position": [
        2320,
        208
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "vessel_id",
              "type": "string",
              "value": "={{ $(\"Fetch Port & Weather Context\").item.json.vessel_id }}"
            },
            {
              "id": "2",
              "name": "briefing_summary",
              "type": "string",
              "value": "={{ $json.output.output.executive_summary }}"
            },
            {
              "id": "3",
              "name": "recommended_route",
              "type": "string",
              "value": "={{ $json.output.output.recommended_action.primary_recommendation }}"
            },
            {
              "id": "4",
              "name": "cost_impact",
              "type": "number",
              "value": "={{ $json.output.output.recommended_action.expected_outcomes.cost_savings_usd }}"
            },
            {
              "id": "5",
              "name": "emission_impact",
              "type": "number",
              "value": "={{ $json.output.output.recommended_action.expected_outcomes.emission_reduction_tons }}"
            },
            {
              "id": "6",
              "name": "safety_impact",
              "type": "string",
              "value": "={{ $json.output.output.recommended_action.safety_impact }}"
            },
            {
              "id": "7",
              "name": "full_briefing",
              "type": "object",
              "value": "={{ $json.output.output }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f94a1eaa-f66c-42a1-b000-f9063d227a60",
      "name": "Human Approval Required",
      "type": "n8n-nodes-base.wait",
      "position": [
        2544,
        208
      ],
      "parameters": {
        "resume": "form",
        "options": {},
        "formTitle": "=Maritime Disruption Response - Approval Required for {{ $json.vessel_id }}",
        "formFields": {
          "values": [
            {
              "fieldType": "dropdown",
              "fieldLabel": "Approval Decision",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Approve Recommended Route"
                  },
                  {
                    "option": "Approve with Modifications"
                  },
                  {
                    "option": "Reject - Maintain Current Route"
                  },
                  {
                    "option": "Request Additional Analysis"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldLabel": "Approver Name",
              "placeholder": "Your full name",
              "requiredField": true
            },
            {
              "fieldLabel": "Role/Title",
              "placeholder": "e.g., Fleet Operations Manager",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Modifications or Comments",
              "placeholder": "Enter any modifications to the recommendation or additional comments"
            }
          ]
        },
        "resumeAmount": 4,
        "limitWaitTime": true,
        "formDescription": "=<h3>Executive Summary</h3>\n<p>{{ $json.briefing_summary }}</p>\n\n<h3>Recommended Action</h3>\n<p><strong>{{ $json.recommended_route }}</strong></p>\n\n<h3>Expected Outcomes</h3>\n<ul>\n<li>Cost Impact: ${{ $json.cost_impact }} savings</li>\n<li>Emission Impact: {{ $json.emission_impact }} tons CO2</li>\n<li>Safety Impact: {{ $json.safety_impact }}</li>\n</ul>\n\n<h3>Regulatory Compliance</h3>\n<p>{{ $json.full_briefing.recommended_action.regulatory_compliance }}</p>\n\n<p><em>{{ $json.full_briefing.master_authority_note }}</em></p>"
      },
      "typeVersion": 1.1
    },
    {
      "id": "00c36197-b570-4237-9c0d-86311d3fbbac",
      "name": "Notify Vessel & Operations Team",
      "type": "n8n-nodes-base.slack",
      "position": [
        2768,
        208
      ],
      "parameters": {
        "text": "=Maritime Disruption Response - {{ $json.vessel_id }}",
        "select": "channel",
        "blocksUi": "=[\n  {\n    \"type\": \"header\",\n    \"text\": {\n      \"type\": \"plain_text\",\n      \"text\": \"\ud83d\udea2 Maritime Disruption Response Approved\"\n    }\n  },\n  {\n    \"type\": \"section\",\n    \"fields\": [\n      {\n        \"type\": \"mrkdwn\",\n        \"text\": \"*Vessel:*\\n{{ $json.vessel_id }}\"\n      },\n      {\n        \"type\": \"mrkdwn\",\n        \"text\": \"*Decision:*\\n{{ $json.approval_decision }}\"\n      }\n    ]\n  },\n  {\n    \"type\": \"section\",\n    \"text\": {\n      \"type\": \"mrkdwn\",\n      \"text\": \"*Recommended Action:*\\n{{ $json.recommended_route }}\"\n    }\n  },\n  {\n    \"type\": \"section\",\n    \"fields\": [\n      {\n        \"type\": \"mrkdwn\",\n        \"text\": \"*Cost Impact:*\\n${{ $json.cost_impact }} savings\"\n      },\n      {\n        \"type\": \"mrkdwn\",\n        \"text\": \"*Emission Impact:*\\n{{ $json.emission_impact }} tons CO2\"\n      }\n    ]\n  },\n  {\n    \"type\": \"section\",\n    \"text\": {\n      \"type\": \"mrkdwn\",\n      \"text\": \"*Safety Impact:*\\n{{ $json.safety_impact }}\"\n    }\n  },\n  {\n    \"type\": \"section\",\n    \"fields\": [\n      {\n        \"type\": \"mrkdwn\",\n        \"text\": \"*Approved By:*\\n{{ $json.approver_name }} ({{ $json.approver_role }})\"\n      },\n      {\n        \"type\": \"mrkdwn\",\n        \"text\": \"*Timestamp:*\\n{{ $now.toISO() }}\"\n      }\n    ]\n  },\n  {\n    \"type\": \"section\",\n    \"text\": {\n      \"type\": \"mrkdwn\",\n      \"text\": \"*Comments:*\\n{{ $json.modifications || \"No additional comments\" }}\"\n    }\n  },\n  {\n    \"type\": \"context\",\n    \"elements\": [\n      {\n        \"type\": \"mrkdwn\",\n        \"text\": \"\u26a0\ufe0f {{ $json.full_briefing.master_authority_note }}\"\n      }\n    ]\n  }\n]",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "messageType": "block",
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.5
    },
    {
      "id": "e963316d-d920-4734-8c89-c2086e3d27c9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        -672
      ],
      "parameters": {
        "color": 4,
        "width": 608,
        "height": 544,
        "content": "## Prerequisites\nn8n account, OpenAI API credentials, vessel telemetry and AIS access, weather and port data integrations, Slack workspace for notifications.\n## Use Cases\nWeather-driven rerouting, congestion mitigation, fuel optimization, emissions reduction, and executive decision support for fleet operations.\n## Customization\nModify anomaly thresholds, integrate additional data sources, adapt optimization objectives, or replace notification and approval channels.\n## Benefits\nImproves response speed, enhances decision quality, reduces emissions and operational costs, and maintains human oversight for critical actions."
      },
      "typeVersion": 1
    },
    {
      "id": "fcaf6a55-6d63-4fd6-b32e-429d23c3cc0f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        -416
      ],
      "parameters": {
        "width": 592,
        "height": 272,
        "content": "## Setup Steps\n1. Configure OpenAI credentials for anomaly analysis and briefing generation.\n2. Connect AIS, vessel telemetry, weather, and port data sources.\n3. Define routing optimization and simulation parameters.\n4. Configure Slack notifications and approval workflows.\n5. Test end-to-end execution using sample disruption scenarios."
      },
      "typeVersion": 1
    },
    {
      "id": "4afc6941-95a1-42df-bae8-1344d35aa336",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        -496
      ],
      "parameters": {
        "width": 672,
        "height": 400,
        "content": "## How It Works\nThis workflow helps shipping operators, fleet managers, and maritime control centers respond to dynamic disruptions such as adverse weather, port congestion, and vessel performance anomalies. It continuously monitors vessel telemetry and AIS data to detect abnormal conditions requiring intervention. Relevant contextual information is then aggregated from weather services, port updates, and operational baselines to improve situational awareness. AI-powered simulations evaluate alternative routes and speed adjustments while balancing fuel efficiency, carbon emissions, schedule reliability, and demurrage costs. Finally, the workflow generates executive briefings and voyage recommendations for mandatory human approval before vessel transmission, ensuring regulatory compliance, preserving master authority, and supporting safer, data-driven maritime decision-making through human-in-the-loop oversight."
      },
      "typeVersion": 1
    },
    {
      "id": "a8377787-0a9d-4c71-be2f-5366fdb33211",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        -16
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 640,
        "content": "\n## Stage 3: Route Simulation\n**What:** Evaluate routing and speed alternatives using AI.\n**Why:** Optimizes emissions, costs, and schedule performance."
      },
      "typeVersion": 1
    },
    {
      "id": "8df0c4e2-1745-4f85-84e5-88add3f65895",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        -16
      ],
      "parameters": {
        "color": 7,
        "width": 1040,
        "height": 624,
        "content": "\n## Stage 4: Executive Briefing\n**What:** Generate recommendations requiring human approval.\n**Why:** Ensures compliance and preserves human oversight."
      },
      "typeVersion": 1
    },
    {
      "id": "dcdd00be-d6a2-4fe6-afbe-be4853fe1262",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1216,
        -16
      ],
      "parameters": {
        "color": 7,
        "width": 336,
        "height": 688,
        "content": "## Stage 2: Context Aggregation\n**What:** Collect weather, port, and historical operational data.\n**Why:** Provides comprehensive situational awareness for decisions."
      },
      "typeVersion": 1
    },
    {
      "id": "16fb4bc2-a7fb-4ba4-90ac-5639342bb327",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -16
      ],
      "parameters": {
        "color": 7,
        "width": 1024,
        "height": 672,
        "content": "## Stage 1: Anomaly Detection\n**What:** Analyze vessel telemetry and AIS streams to identify disruptions.\n**Why:** Enables early detection of operational risks requiring action."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "8d6a9127-9502-457f-8db5-db7f905e4f95",
  "nodeGroups": [],
  "connections": {
    "Format Approval Request": {
      "main": [
        [
          {
            "node": "Human Approval Required",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Human Approval Required": {
      "main": [
        [
          {
            "node": "Notify Vessel & Operations Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Simulation Schema": {
      "ai_outputParser": [
        [
          {
            "node": "Stage 3: Route Simulation Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Anomaly Detection Schema": {
      "ai_outputParser": [
        [
          {
            "node": "Stage 1: Anomaly Detection Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Executive Briefing Schema": {
      "ai_outputParser": [
        [
          {
            "node": "Stage 4: Executive Briefing Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Context Aggregation Schema": {
      "ai_outputParser": [
        [
          {
            "node": "Stage 2: Context Aggregation Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Monitor Maritime Operations": {
      "main": [
        [
          {
            "node": "Fetch Vessel Telemetry & AIS Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Port & Weather Context": {
      "main": [
        [
          {
            "node": "Stage 1: Anomaly Detection Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Route Simulation": {
      "ai_languageModel": [
        [
          {
            "node": "Stage 3: Route Simulation Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Stage 3: Route Simulation Agent": {
      "main": [
        [
          {
            "node": "Stage 4: Executive Briefing Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Anomaly Detection": {
      "ai_languageModel": [
        [
          {
            "node": "Stage 1: Anomaly Detection Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Stage 1: Anomaly Detection Agent": {
      "main": [
        [
          {
            "node": "Stage 2: Context Aggregation Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Vessel Telemetry & AIS Data": {
      "main": [
        [
          {
            "node": "Fetch Port & Weather Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Executive Briefing": {
      "ai_languageModel": [
        [
          {
            "node": "Stage 4: Executive Briefing Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Stage 4: Executive Briefing Agent": {
      "main": [
        [
          {
            "node": "Format Approval Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model - Context Aggregation": {
      "ai_languageModel": [
        [
          {
            "node": "Stage 2: Context Aggregation Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Stage 2: Context Aggregation Agent": {
      "main": [
        [
          {
            "node": "Stage 3: Route Simulation Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

This workflow runs every 15 minutes to pull vessel telemetry/AIS data, enrich it with port and weather context, and use OpenAI to detect disruptions, simulate route alternatives, and generate an executive briefing that requires human approval before notifying teams in Slack.…

Source: https://n8n.io/workflows/16342/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

Created by: Peyton Leveillee Last updated: October 2025

OpenAI Chat, Google Sheets, HTTP Request +5
AI & RAG

This workflow automates end-to-end sustainability lifecycle management for corporate sustainability teams, ESG governance officers, and circular economy programme leads. It addresses the challenge of

Form Trigger, Agent, OpenAI Chat +11
AI & RAG

This workflow automates end-to-end ESG (Environmental, Social, and Governance) sustainability reporting for enterprise sustainability teams, compliance officers, and green governance leads. It solves

Agent, OpenAI Chat, Output Parser Structured +12
AI & RAG

This workflow is designed for Japanese-speaking professionals, and learners who want to efficiently stay up to date with practical productivity, lifehack, and efficiency-related insights from Japanese

RSS Feed Read, Chain Llm, Google Gemini Chat +7
AI & RAG

Automates sales data analysis and strategic insight generation for sales managers and strategists needing actionable intelligence. Fetches multi-source data from sales, marketing, and financial system

HTTP Request, Agent, OpenAI Chat +6