n8n for Maritime/PortTech SaaS Vendors: 5 Automations for USCG MTSA, IMO MARPOL, CBP 24h Manifest, and EU NIS2 Compliance (Free Workflow JSON)

# n8n# automation# security# programming
n8n for Maritime/PortTech SaaS Vendors: 5 Automations for USCG MTSA, IMO MARPOL, CBP 24h Manifest, and EU NIS2 Compliance (Free Workflow JSON)Alex Kane

Maritime SaaS vendors face USCG MTSA 33 CFR Part 101, IMO MARPOL CII ratings, CBP 24h advance manifest $5K/violation, and EU NIS2 critical infrastructure obligations. 5 production-ready n8n workflows with full JSON.

Maritime SaaS vendors face a regulatory stack that never sleeps: USCG MTSA security incidents, IMO MARPOL CII carbon ratings, CBP 24-hour advance cargo manifest deadlines ($5,000/violation), BIMCO BIMI cyber requirements, and now EU NIS2 critical infrastructure obligations. Every one of those clocks starts the moment your platform processes the triggering event.

Here are 5 production-ready n8n workflows with full import-ready JSON for the teams building port operations, vessel tracking, freight forwarding, and ship management software.

Get all 14 templates at stripeai.gumroad.com — copy the JSON, import into n8n, swap your credentials.


Who this is for

Tier Example vendors
PORT_AUTHORITY_OPERATIONS_SAAS Port community systems, berth scheduling, terminal OS
VESSEL_TRACKING_SAAS AIS aggregators, fleet visibility platforms, ETA engines
FREIGHT_FORWARDING_SAAS Digital forwarders, booking platforms, shipment managers
MARITIME_CARGO_SAAS Cargo management, dangerous goods, B/L automation
SHIP_MANAGEMENT_SAAS Planned maintenance, crew management, ISM/ISPS compliance
MARITIME_ANALYTICS_SAAS Performance analytics, fuel optimization, port intelligence
PORTTECH_STARTUP_SAAS Early-stage maritime tech, IoT sensors, blockchain B/L

Workflow 1: USCG MTSA / ISPS Code Security Incident Alert Pipeline

The regulation: 33 CFR Part 101 (MTSA) requires immediate notification of maritime security incidents to the National Response Center (NRC: 1-800-424-8802). ISPS Code Part A §3.1.3 mandates vessel/port facility security incident reporting. Failure: civil penalty up to $25,000/day + criminal exposure for willful violations.

The clock: The moment your SaaS platform receives a security event from a vessel AIS system, port IoT sensor, or crew report — the incident clock starts. If that event sits in an email queue while your team is in a standup, you are already burning penalty exposure.

Supported incident types: UNAUTHORIZED_ACCESS, SECURITY_BREACH, SUSPICIOUS_VESSEL, BOMB_THREAT, MARSEC_LEVEL_CHANGE, STOWAWAY_DETECTED, DANGEROUS_GOODS, CYBER_INCIDENT_VESSEL.

{
  "name": "USCG MTSA / ISPS Security Incident Alert Pipeline",
  "nodes": [
    {
      "name": "Security Incident Webhook",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "path": "maritime-security-incident",
        "responseMode": "lastNode"
      },
      "position": [
        240,
        300
      ]
    },
    {
      "name": "Classify Incident",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "const ev=$json;const t={UNAUTHORIZED_ACCESS:{s:'CRITICAL',nrc:true,ref:'33 CFR \u00a7101.305',h:1},SECURITY_BREACH:{s:'CRITICAL',nrc:true,ref:'33 CFR \u00a7101.305',h:1},SUSPICIOUS_VESSEL:{s:'HIGH',nrc:true,ref:'33 CFR \u00a7101.405',h:4},BOMB_THREAT:{s:'CRITICAL',nrc:true,ref:'33 CFR \u00a7101.305',h:0.25},MARSEC_LEVEL_CHANGE:{s:'HIGH',nrc:false,ref:'33 CFR \u00a7101.210',h:2},STOWAWAY_DETECTED:{s:'HIGH',nrc:true,ref:'33 CFR \u00a7101.305',h:4},DANGEROUS_GOODS:{s:'HIGH',nrc:true,ref:'49 CFR \u00a7172.604',h:1},CYBER_INCIDENT_VESSEL:{s:'HIGH',nrc:false,ref:'IMO MSC-FAL.1/Circ.3',h:24}};const c=t[ev.incident_type]||{s:'MEDIUM',nrc:false,ref:'General',h:24};const now=new Date();const dl=new Date(now.getTime()+c.h*3600000);return [{json:{...ev,severity:c.s,nrc_required:c.nrc,regulatory_ref:c.ref,reporting_deadline_iso:dl.toISOString(),deadline_hours:c.h,nrc_phone:'1-800-424-8802',platform_ts:now.toISOString()}}];"
      },
      "position": [
        460,
        300
      ]
    },
    {
      "name": "Route by Severity",
      "type": "n8n-nodes-base.if",
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.severity}}",
              "operation": "equals",
              "value2": "CRITICAL"
            }
          ]
        }
      },
      "position": [
        680,
        300
      ]
    },
    {
      "name": "Slack CRITICAL",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#maritime-security-critical",
        "text": "CRITICAL MTSA INCIDENT\nType: {{$json.incident_type}}\nVessel/Port: {{$json.vessel_or_port}}\nRef: {{$json.regulatory_ref}}\nDeadline: {{$json.reporting_deadline_iso}}\nNRC: {{$json.nrc_required ? $json.nrc_phone : 'Not required'}}"
      },
      "position": [
        900,
        200
      ]
    },
    {
      "name": "Slack HIGH",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#maritime-security-ops",
        "text": "HIGH MTSA INCIDENT\nType: {{$json.incident_type}}\nVessel/Port: {{$json.vessel_or_port}}\nRef: {{$json.regulatory_ref}}\nDeadline: {{$json.reporting_deadline_iso}}"
      },
      "position": [
        900,
        400
      ]
    },
    {
      "name": "Log Incident",
      "type": "n8n-nodes-base.postgres",
      "parameters": {
        "operation": "insert",
        "table": "maritime_security_incidents",
        "additionalFields": {}
      },
      "position": [
        1120,
        300
      ]
    }
  ],
  "connections": {
    "Security Incident Webhook": {
      "main": [
        [
          {
            "node": "Classify Incident",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify Incident": {
      "main": [
        [
          {
            "node": "Route by Severity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Severity": {
      "main": [
        [
          {
            "node": "Slack CRITICAL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack HIGH",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack CRITICAL": {
      "main": [
        [
          {
            "node": "Log Incident",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack HIGH": {
      "main": [
        [
          {
            "node": "Log Incident",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Self-hosting argument: USCG NRC reports contain vessel name, IMO number, location coordinates, cargo manifest data. Routing that through Zapier/Make means US Coast Guard-regulated incident data transits a third-party cloud. Self-hosted n8n keeps the pipeline inside your SOC2 boundary and creates a git-versioned audit trail for every notification sent.


Workflow 2: IMO MARPOL / SOLAS CII Compliance Deadline Monitor

The regulation: MARPOL Annex VI Regulation 28 (MEPC 78) requires vessels ≥5,000 GT to hold an annual CII rating (A–E). SOLAS Chapter V Regulation 19 mandates ECDIS carriage. IOPP/NLS pollution prevention certificates require 5-year renewal with intermediate surveys. IMO DCS fuel oil data collection is annual. EEXI/CII non-compliance: port state control detention, charter contract penalties, flag state suspension.

Supported deadline types: CII_ANNUAL_RATING, IOPP_CERTIFICATE_RENEWAL, NLS_CERTIFICATE_RENEWAL, ECDIS_TYPE_APPROVAL, IMO_DCS_DATA_SUBMISSION, EEXI_VERIFICATION, ISPS_VESSEL_SECURITY_PLAN, ISM_SMC_RENEWAL.

Urgency tiers: OVERDUECRITICAL (≤14d) → URGENT (≤45d) → WARNING (≤90d) → NOTICE (≤120d).

{
  "name": "IMO MARPOL / SOLAS CII Compliance Deadline Monitor",
  "nodes": [
    {
      "name": "Daily MARPOL Check",
      "type": "n8n-nodes-base.scheduleTrigger",
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "position": [
        240,
        300
      ]
    },
    {
      "name": "Load Fleet Compliance",
      "type": "n8n-nodes-base.postgres",
      "parameters": {
        "operation": "select",
        "table": "vessel_compliance_deadlines",
        "additionalFields": {}
      },
      "position": [
        460,
        300
      ]
    },
    {
      "name": "Evaluate Deadlines",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "const today=new Date();const alerts=[];const types={CII_ANNUAL_RATING:{ref:'MARPOL Annex VI Reg 28/MEPC 78',c:'D/E rating=corrective action plan; port state control detention risk'},IOPP_CERTIFICATE_RENEWAL:{ref:'MARPOL Annex I Reg 37',c:'5yr renewal lapse=vessel cannot trade'},NLS_CERTIFICATE_RENEWAL:{ref:'MARPOL Annex II Reg 9',c:'5yr renewal lapse=PSC detention'},ECDIS_TYPE_APPROVAL:{ref:'SOLAS Ch V Reg 19',c:'Type approval expiry=PSC deficiency'},IMO_DCS_DATA_SUBMISSION:{ref:'MARPOL Annex VI Reg 22A',c:'Annual fuel data non-submission=flag state sanction'},EEXI_VERIFICATION:{ref:'MARPOL Annex VI Reg 25',c:'Non-compliant=cannot trade'},ISPS_VESSEL_SECURITY_PLAN:{ref:'SOLAS Ch XI-2/ISPS Code A \u00a79',c:'5yr review lapse=port denial'},ISM_SMC_RENEWAL:{ref:'SOLAS Ch IX Reg 3',c:'5yr renewal lapse=vessel cannot trade'}};for(const row of $input.all()){const r=row.json;const dl=new Date(r.deadline_date);const d=Math.floor((dl-today)/86400000);const info=types[r.deadline_type]||{ref:'IMO/MARPOL',c:'Compliance required'};let u=null;if(d<0)u='OVERDUE';else if(d<=14)u='CRITICAL';else if(d<=45)u='URGENT';else if(d<=90)u='WARNING';else if(d<=120)u='NOTICE';if(u)alerts.push({json:{...r,days_left:d,urgency:u,regulatory_ref:info.ref,consequence:info.c}});}return alerts.length?alerts:[{json:{no_alerts:true}}];"
      },
      "position": [
        680,
        300
      ]
    },
    {
      "name": "Has Alerts",
      "type": "n8n-nodes-base.if",
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{$json.no_alerts}}",
              "operation": "notEqual",
              "value2": true
            }
          ]
        }
      },
      "position": [
        900,
        300
      ]
    },
    {
      "name": "Slack Fleet Compliance",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#fleet-compliance",
        "text": "{{$json.urgency}} \u2014 {{$json.deadline_type}}\nVessel: {{$json.vessel_name}} (IMO: {{$json.imo_number}})\nRef: {{$json.regulatory_ref}}\nDays Left: {{$json.days_left}}\nConsequence: {{$json.consequence}}"
      },
      "position": [
        1120,
        200
      ]
    }
  ],
  "connections": {
    "Daily MARPOL Check": {
      "main": [
        [
          {
            "node": "Load Fleet Compliance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Fleet Compliance": {
      "main": [
        [
          {
            "node": "Evaluate Deadlines",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evaluate Deadlines": {
      "main": [
        [
          {
            "node": "Has Alerts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Alerts": {
      "main": [
        [
          {
            "node": "Slack Fleet Compliance",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Why self-host: CII ratings, EEXI technical files, fuel consumption data, ISM audit records are vessel-specific commercial intelligence. Routing this through a cloud automation vendor creates a contractual data-sharing relationship you may not have disclosed in your ISPS vessel security plan.


Workflow 3: CBP Advance Cargo Manifest 24-Hour Deadline Pipeline

The regulation: 19 CFR §4.7b (CBP Trade Act of 2002) — ocean carriers must file advance cargo manifest in ACE/AMS 24 hours before loading at a foreign port. Violation: $5,000/shipment, manifest amendment restrictions, 'Do Not Load' orders. Hazardous materials add 49 CFR §172.604 IMDG pre-notification requirements.

The math: Your platform receives the booking at T=0. The vessel departs at T+48h. CBP deadline is T+24h. If your notification pipeline runs every 6 hours, you may already be inside the critical window before anyone is alerted.

Pipeline status values: SUBMITTEDPENDINGURGENTCRITICAL_SUBMIT_NOWOVERDUE_$5K_EXPOSURE.

{
  "name": "CBP Advance Cargo Manifest 24h Deadline Pipeline",
  "nodes": [
    {
      "name": "New Shipment Webhook",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "path": "new-shipment-booking",
        "responseMode": "lastNode"
      },
      "position": [
        240,
        300
      ]
    },
    {
      "name": "Calculate CBP Deadline",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "const s=$json;const dep=new Date(s.vessel_departure_utc);const dl=new Date(dep.getTime()-24*3600000);const now=new Date();const hrs=(dl-now)/3600000;const haz=[];if(s.has_hazmat)haz.push('IMDG Code - 49 CFR \u00a7172.604 required');if(s.has_oog)haz.push('OOG - stowage plan required');const status=s.ace_ams_submitted?'SUBMITTED':(hrs<0?'OVERDUE_$5K_EXPOSURE':hrs<4?'CRITICAL_SUBMIT_NOW':hrs<12?'URGENT':'PENDING');return [{json:{...s,cbp_manifest_deadline_utc:dl.toISOString(),hours_to_cbp_deadline:Math.round(hrs*10)/10,manifest_status:status,hazmat_requirements:haz,penalty_exposure_usd:s.ace_ams_submitted?0:5000}}];"
      },
      "position": [
        460,
        300
      ]
    },
    {
      "name": "Status Switch",
      "type": "n8n-nodes-base.switch",
      "parameters": {
        "dataType": "string",
        "value1": "={{$json.manifest_status}}",
        "rules": {
          "rules": [
            {
              "value2": "OVERDUE_$5K_EXPOSURE",
              "output": 0
            },
            {
              "value2": "CRITICAL_SUBMIT_NOW",
              "output": 1
            },
            {
              "value2": "URGENT",
              "output": 2
            }
          ]
        }
      },
      "position": [
        680,
        300
      ]
    },
    {
      "name": "Alert OVERDUE",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#customs-compliance-critical",
        "text": "OVERDUE CBP MANIFEST - $5,000/shipment exposure\nB/L: {{$json.bill_of_lading}}\nVessel: {{$json.vessel_name}} departs {{$json.vessel_departure_utc}}\nDeadline was: {{$json.cbp_manifest_deadline_utc}}\nRef: 19 CFR \u00a74.7b / Trade Act 2002"
      },
      "position": [
        900,
        180
      ]
    },
    {
      "name": "Alert CRITICAL",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#customs-compliance",
        "text": "CRITICAL: CBP manifest due <4h\nB/L: {{$json.bill_of_lading}} | Vessel: {{$json.vessel_name}}\nDeadline: {{$json.cbp_manifest_deadline_utc}} | Hours left: {{$json.hours_to_cbp_deadline}}"
      },
      "position": [
        900,
        340
      ]
    },
    {
      "name": "Alert URGENT",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#customs-compliance",
        "text": "CBP manifest due in {{$json.hours_to_cbp_deadline}}h\nB/L: {{$json.bill_of_lading}} | Vessel: {{$json.vessel_name}}"
      },
      "position": [
        900,
        500
      ]
    }
  ],
  "connections": {
    "New Shipment Webhook": {
      "main": [
        [
          {
            "node": "Calculate CBP Deadline",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate CBP Deadline": {
      "main": [
        [
          {
            "node": "Status Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status Switch": {
      "main": [
        [
          {
            "node": "Alert OVERDUE",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Alert CRITICAL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Alert URGENT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Workflow 4: BIMCO BIMI Cyber Incident & EU NIS2 Critical Infrastructure Alert

The regulation: IMO MSC-FAL.1/Circ.3 (2017) — maritime cyber risk management embedded in ISM Code. EU NIS2 Directive (2022/0383) — port operators and maritime infrastructure are 'essential entities' with 24-hour initial incident notification to national CSIRT, 72-hour full report. BIMCO BIMI (2021) cyber incident management framework.

The EU NIS2 trap: Under NIS2 Art.23, essential entity operators must notify their national CSIRT within 24 hours of becoming aware — not when forensics confirm it. The moment your platform logs an anomaly on a vessel ECDIS or port PMS, you are 'aware.' Your pipeline must fire before your security team has finished their morning standup.

Supported incident types: ECDIS_MANIPULATION, AIS_SPOOFING, PORT_MANAGEMENT_RANSOMWARE, CARGO_MANIFEST_TAMPERING, ENGINE_CONTROL_ANOMALY, CREW_PII_BREACH, BUNKER_SYSTEM_ACCESS.

{
  "name": "BIMCO BIMI Cyber Incident & EU NIS2 Alert Pipeline",
  "nodes": [
    {
      "name": "Cyber Incident Webhook",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "path": "maritime-cyber-incident",
        "responseMode": "lastNode"
      },
      "position": [
        240,
        300
      ]
    },
    {
      "name": "Classify Cyber Incident",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "const ev=$json;const t={ECDIS_MANIPULATION:{nis2:true,imo:true,tier:'CRITICAL',c:'Nav safety SOLAS Ch V; NIS2 Art.23 24h'},AIS_SPOOFING:{nis2:true,imo:true,tier:'CRITICAL',c:'Vessel tracking integrity; MTSA breach potential'},PORT_MANAGEMENT_RANSOMWARE:{nis2:true,imo:false,tier:'CRITICAL',c:'Essential service disruption; NIS2 Art.23 24h+72h'},CARGO_MANIFEST_TAMPERING:{nis2:true,imo:true,tier:'HIGH',c:'CBP ACE/AMS integrity; sanctions risk'},ENGINE_CONTROL_ANOMALY:{nis2:true,imo:true,tier:'CRITICAL',c:'OT/ICS safety; IMO MSC-FAL.1/Circ.3 safety-critical'},CREW_PII_BREACH:{nis2:false,imo:false,tier:'HIGH',c:'GDPR Art.33 72h; flag state notification'},BUNKER_SYSTEM_ACCESS:{nis2:true,imo:true,tier:'HIGH',c:'MARPOL fuel data integrity; CII rating manipulation risk'}};const i=t[ev.incident_type]||{nis2:false,imo:false,tier:'MEDIUM',c:'Assess per ISM Code SMS'};const now=new Date();return [{json:{...ev,bimco_tier:i.tier,nis2_24h_required:i.nis2,imo_msc_required:i.imo,consequence:i.c,nis2_24h_deadline:new Date(now.getTime()+24*3600000).toISOString(),nis2_72h_deadline:new Date(now.getTime()+72*3600000).toISOString(),incident_ts:now.toISOString()}}];"
      },
      "position": [
        460,
        300
      ]
    },
    {
      "name": "Is Critical",
      "type": "n8n-nodes-base.if",
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.bimco_tier}}",
              "operation": "equals",
              "value2": "CRITICAL"
            }
          ]
        }
      },
      "position": [
        680,
        300
      ]
    },
    {
      "name": "Slack CRITICAL Cyber",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#maritime-cyber-critical",
        "text": "BIMCO TIER 1 CYBER INCIDENT\nType: {{$json.incident_type}}\nAsset: {{$json.asset}}\nConsequence: {{$json.consequence}}\n{{$json.nis2_24h_required ? 'NIS2 24h CSIRT due: ' + $json.nis2_24h_deadline + ' | 72h report due: ' + $json.nis2_72h_deadline : ''}}\n{{$json.imo_msc_required ? 'IMO MSC-FAL.1/Circ.3 ISM SMS documentation required' : ''}}\nRef: BIMCO BIMI 2021 / EU NIS2 Art.23"
      },
      "position": [
        900,
        200
      ]
    },
    {
      "name": "Slack HIGH Cyber",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#maritime-cyber-ops",
        "text": "MARITIME CYBER INCIDENT - {{$json.bimco_tier}}\nType: {{$json.incident_type}} | Asset: {{$json.asset}}\nConsequence: {{$json.consequence}}"
      },
      "position": [
        900,
        400
      ]
    },
    {
      "name": "Log Cyber Incident",
      "type": "n8n-nodes-base.postgres",
      "parameters": {
        "operation": "insert",
        "table": "maritime_cyber_incidents",
        "additionalFields": {}
      },
      "position": [
        1120,
        300
      ]
    }
  ],
  "connections": {
    "Cyber Incident Webhook": {
      "main": [
        [
          {
            "node": "Classify Cyber Incident",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify Cyber Incident": {
      "main": [
        [
          {
            "node": "Is Critical",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Critical": {
      "main": [
        [
          {
            "node": "Slack CRITICAL Cyber",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack HIGH Cyber",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack CRITICAL Cyber": {
      "main": [
        [
          {
            "node": "Log Cyber Incident",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack HIGH Cyber": {
      "main": [
        [
          {
            "node": "Log Cyber Incident",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Workflow 5: Weekly Maritime Platform KPI Dashboard

Why this matters: Maritime SaaS CEOs and fleet managers need weekly visibility on CBP manifest compliance rates ($5K/violation), CII performance trends (D/E rating triggers charter contract penalties), and cyber incident counts — all in one Monday morning briefing.

{
  "name": "Weekly Maritime Platform KPI Dashboard",
  "nodes": [
    {
      "name": "Monday 7AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 7 * * 1"
            }
          ]
        }
      },
      "position": [
        240,
        300
      ]
    },
    {
      "name": "Query Platform Metrics",
      "type": "n8n-nodes-base.postgres",
      "parameters": {
        "operation": "executeQuery",
        "query": "SELECT 'platform' as src, COUNT(DISTINCT vessel_id) as active_vessels, SUM(mrr_usd) as mrr_usd, COUNT(DISTINCT customer_id) as active_accounts FROM platform_subscriptions WHERE status='active' UNION ALL SELECT 'manifest_compliance', COUNT(*) FILTER (WHERE ace_ams_submitted=true), COUNT(*), COUNT(*) FROM shipment_bookings WHERE created_at>=NOW()-INTERVAL '7 days' UNION ALL SELECT 'cyber_critical', COUNT(*) FILTER (WHERE bimco_tier='CRITICAL'), 0, COUNT(*) FROM maritime_cyber_incidents WHERE incident_ts>=NOW()-INTERVAL '7 days'",
        "additionalFields": {}
      },
      "position": [
        460,
        300
      ]
    },
    {
      "name": "Build KPI Report",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "const rows=$input.all().map(r=>r.json);const m={};rows.forEach(r=>{m[r.src]=r;});const pm=m['platform']||{};const mc=m['manifest_compliance']||{};const cy=m['cyber_critical']||{};const rate=mc.active_accounts>0?Math.round((mc.active_vessels/mc.active_accounts)*100):0;const html=`<h2>FlowKit Maritime Platform Weekly KPI</h2><h3>Platform</h3><p>MRR: $${(pm.mrr_usd||0).toLocaleString()} | Active Vessels: ${pm.active_vessels||0} | Accounts: ${pm.active_accounts||0}</p><h3>CBP Manifest Compliance (19 CFR \u00a74.7b)</h3><p>Compliance Rate: ${rate}% ${rate<95?'<b style=color:red>BELOW 95% \u2014 $5K/violation exposure</b>':'OK'}</p><h3>Cyber Incidents (BIMCO/NIS2)</h3><p>Critical: ${cy.active_vessels||0} | Total: ${cy.active_accounts||0}</p>`;return [{json:{html_report:html}}];"
      },
      "position": [
        680,
        300
      ]
    },
    {
      "name": "Email CEO",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "to": "ceo@maritime-saas.com",
        "subject": "Maritime Platform Weekly KPI",
        "emailType": "html",
        "message": "={{$json.html_report}}",
        "options": {
          "bccList": "compliance@maritime-saas.com,coo@maritime-saas.com"
        }
      },
      "position": [
        900,
        300
      ]
    }
  ],
  "connections": {
    "Monday 7AM": {
      "main": [
        [
          {
            "node": "Query Platform Metrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query Platform Metrics": {
      "main": [
        [
          {
            "node": "Build KPI Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build KPI Report": {
      "main": [
        [
          {
            "node": "Email CEO",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Self-hosted n8n vs cloud automation for maritime

Requirement Zapier/Make cloud Self-hosted n8n
USCG MTSA incident data sovereignty ❌ Transits vendor cloud ✅ Your VPC/on-prem
CBP ACE/AMS manifest data control ❌ Third-party cloud ✅ Air-gapped if needed
NIS2 essential entity scope ❌ Vendor = additional entity ✅ In-scope by design
ISPS vessel security plan compliance ❌ Data flow not documented ✅ Documented in ISM SMS
MARPOL audit trail (git-versioned) ❌ No version history ✅ Git-tracked workflow JSON
BIMCO BIMI cyber chain-of-custody ❌ SaaS vendor in incident scope ✅ Self-contained

Get the workflows

All 5 workflows — plus 9 more for enterprise ops — are in the FlowKit Maritime & Compliance Pack at stripeai.gumroad.com.

Individual templates from $12. Bundle with all 14 templates: $97 — less than one CBP manifest violation.


Regulatory citations accurate as of May 2026. Verify current text for your jurisdiction before deployment in regulated environments.