Cloud automation platforms sit between logistics software and regulatory reporting systems.
When a compliance clock fires — a PHMSA hazmat incident, a FMCSA ELD malfunction, a CBP ISF 10+2 deadline — the notification must reach the right agency in the right window.
When your cloud iPaaS is in that path, it owns part of that clock.
Why Cloud iPaaS Creates Logistics Compliance Exposure
49 CFR §171.15: PHMSA hazmat incident — IMMEDIATE. Any hazardous material incident involving death, serious injury, evacuation, or carrier damage exceeding $50,000 requires notification to the National Response Center (1-800-424-8802) immediately. A cloud iPaaS outage during a hazmat incident is not an exemption. If your cargo management platform routes incident data through a cloud vendor, that vendor receives the DOT subpoena independently of your compliance team.
49 CFR §395.22: FMCSA ELD malfunction — 24 hours + IMMEDIATE roadside transfer. ELD malfunctions require driver notation within 24 hours and paper log fallback for up to 8 days (§395.22(j)(1)). At roadside inspection, ELD must transfer HOS data to the enforcement officer immediately (§395.22(i)). A cloud-hosted ELD platform with availability SLA below 24h is architecturally exposed.
19 CFR §149.2: CBP ISF 10+2 — 24 hours before vessel loading. Importer Security Filing must be submitted 24 hours before the vessel loads at the foreign port. Late filing = $5,000/violation liquidated damages. Cloud iPaaS holding ISF data is a CBP subpoena target independent of the importer.
29 CFR §1904.39: OSHA fatality — 8 hours. Work-related fatality at any logistics facility must be reported to OSHA within 8 hours. Hospitalization/amputation/eye loss: 24 hours. A cloud iPaaS in the incident notification chain with SLA > 8h is architecturally noncompliant for fatality reporting.
The Procurement-Level Question
When DOT, CBP, or OSHA investigates a missed deadline or a compliance violation, the subpoena goes to every system that touched the relevant data. Your cloud iPaaS vendor receives that subpoena regardless of whether your client met the deadline. Their data retention policy, their ToS log access clauses, their multi-tenant architecture — these are all now in scope for the investigation.
For LogisticsTech and FreightTech SaaS vendors selling to regulated carriers, freight brokers, customs brokers, and 3PLs, the self-hosted n8n argument is procurement-level:
- PHMSA IMMEDIATE notifications require architecture that works when vendor SaaS is unavailable
- FMCSA ELD data is regulatory evidence — chain of custody and availability matter
- CBP ISF filing records should not reside in a third-party cloud with independent subpoena exposure
- OSHA incident notifications require 8-hour clock reliability your cloud iPaaS cannot guarantee under typical SLAs
Tier Segmentation for LogisticsTech SaaS Vendors
| Tier | Description | Fastest Compliance Clock |
|---|---|---|
TMS_SAAS_VENDOR |
Transportation Management System (TMS) SaaS Vendor | PHMSA_HAZMAT_INCIDENT: IMMEDIATE (49 CFR §171.15) + FMCSA_HOS_VIOLATION: real-time ELD flag + CBP_ISF_10_2: 24H before vessel load |
FLEET_TELEMATICS_SAAS |
Fleet Telematics & ELD SaaS Vendor | FMCSA_ELD_MALFUNCTION: 24H driver note in CMV + 8-day paper log fallback + DOT_ROADSIDE_DATA: IMMEDIATE roadside transfer 49 CFR §395.22 |
FREIGHT_BROKERAGE_PLATFORM |
Digital Freight Brokerage Platform | FMCSA_CARRIER_MONITOR: real-time safety rating pull + FMC_TARIFF_FILING: 30 days before effective + CBP_ACE_ENTRY: pre-arrival |
CUSTOMS_BROKERAGE_SAAS |
Customs Brokerage & Trade Compliance SaaS | CBP_ISF_10_2: 24H before vessel loading (19 CFR §149) + CBP_ACE_ENTRY: 15min bond violation + OFAC_SDN: real-time screen |
WAREHOUSE_WMS_SAAS |
Warehouse Management System (WMS) SaaS Vendor | OSHA_300_LOG: 8H work-related fatality (29 CFR §1904.39) + EPA_HAZMAT_STORAGE: site-specific + PHMSA_HAZMAT_STORAGE: 49 CFR §177.848 |
OCEAN_FREIGHT_SAAS |
Ocean Freight & NVOCC Platform | FMC_NVOCC_TARIFF: 30 days advance (46 USC §40501) + CBP_ISF: 24H before load + US_CUSTOMS_ENTRY: 15-day arrival |
LOGISTICSTECH_STARTUP |
LogisticsTech & FreightTech Startup | FMCSA_REGISTRATION: pre-operation + CBP_ACE: pre-entry + SOC2_TYPE2: annual + PHMSA_AWARENESS: IMMEDIATE if any hazmat incident |
7 Compliance Flags
FMCSA_REGISTERED_CARRIER_OR_BROKERELD_MANDATE_SUBJECT_49_CFR_395PHMSA_HAZMAT_CARRIERCBP_ISF_FILER_19_CFR_149FMC_NVOCC_LICENSED_46_USC_40501TSA_CCSP_ENROLLEDSOC2_REQUIRED
12 Deadline Types
| Deadline Type | Clock | Authority | Notes |
|---|---|---|---|
PHMSA_HAZMAT_IMMEDIATE |
IMMEDIATE | 49 CFR §171.15 | Hazardous material incident with death/injury/evacuation/major carrier damage → call NRC 1-800-424-8802 immediately; cloud iPaaS outage = missed NRC = DOT enforcement |
DOT_ROADSIDE_ELD_TRANSFER |
IMMEDIATE | 49 CFR §395.22(i) | Roadside inspection → ELD must transfer HOS data to enforcement officer immediately via telematics or display |
FMCSA_ELD_MALFUNCTION_NOTE |
24H | 49 CFR §395.22(j)(1) | ELD malfunction → driver note in CMV within 24h + paper log for up to 8 days |
CBP_ISF_10_2_FILING |
24H_BEFORE_LOAD | 19 CFR §149.2 | Importer Security Filing 10+2 must be filed 24h before vessel loading at foreign port; late = $5,000/violation liquidated damages |
OSHA_FATALITY_REPORT |
8H | 29 CFR §1904.39(a)(1) | Work-related fatality → report to OSHA within 8h; cloud outage during incident = missed clock = OSHA citation |
OSHA_HOSPITALIZATION_REPORT |
24H | 29 CFR §1904.39(a)(2) | In-patient hospitalization/amputation/eye loss → report to OSHA within 24h |
PHMSA_HAZMAT_WRITTEN_REPORT |
30_DAYS | 49 CFR §171.16 | Written detailed hazmat incident report within 30 days of incident to PHMSA |
FMC_NVOCC_TARIFF_FILING |
30_DAYS_ADVANCE | 46 USC §40501 / 46 CFR §520.8 | NVOCC tariff changes must be published 30 days before effective date in automated tariff system |
FMCSA_DRUG_ALCOHOL_REPORT |
MARCH_15_ANNUAL | 49 CFR §382.403 | Annual Drug & Alcohol Testing MIS report to FMCSA (or on request within 10 biz days) |
CBP_ACE_ENTRY_BOND |
15_DAY_ARRIVAL | 19 CFR §142.13 | Merchandise entry must be filed within 15 days of vessel arrival at US port |
TSA_CCSP_SECURITY_INCIDENT |
IMMEDIATE | TSA SD 1542-04-08F / 49 CFR §1544.305 | Cargo security incident → immediate report to TSA; cloud iPaaS in cargo manifest chain = subpoena target |
SOC2_TYPE2_ANNUAL |
ANNUAL | AICPA TSC | SOC2 for logistics SaaS customers with sensitive cargo and shipment data |
Workflow 1: LogisticsTech SaaS Tier-Segmented Onboarding Drip
Routes new accounts by tier (TMS_SAAS_VENDOR, FLEET_TELEMATICS_SAAS, CUSTOMS_BROKERAGE_SAAS, etc.) and delivers a tier-specific compliance brief: PHMSA hazmat reporting windows, FMCSA ELD malfunction requirements, CBP ISF 24-hour deadlines.
{
"name": "LogisticsTech SaaS Tier-Segmented Onboarding Drip",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "logistics-onboarding",
"responseMode": "responseNode"
},
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
100,
300
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"tier\"]}}",
"operation": "equals",
"value2": "FLEET_TELEMATICS_SAAS"
}
]
}
},
"name": "Is ELD Vendor?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
350,
200
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"tier\"]}}",
"operation": "equals",
"value2": "CUSTOMS_BROKERAGE_SAAS"
}
]
}
},
"name": "Is Customs Broker?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
350,
450
]
},
{
"parameters": {
"fromEmail": "onboarding@flowkit.io",
"toEmail": "={{$json[\"email\"]}}",
"subject": "FMCSA ELD & HOS Compliance Automation \u2014 Your Fleet Telematics Brief",
"text": "Welcome to FlowKit.\n\nFMCSA ELD mandate compliance clocks:\n- ELD malfunction \u2192 24h driver notation + paper log fallback (49 CFR \u00a7395.22(j)(1))\n- Roadside inspection \u2192 IMMEDIATE HOS data transfer (49 CFR \u00a7395.22(i))\n- Annual Drug & Alcohol MIS \u2192 March 15 (49 CFR \u00a7382.403)\n\nYour n8n instance runs on your infrastructure \u2014 ELD malfunction alerts and HOS violation flags fire even when vendor SaaS is down.\n\nDay 3: ELD malfunction pipeline walkthrough.\nDay 7: FMCSA HOS violation auto-escalation setup."
},
"name": "Send ELD Brief",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2,
"position": [
600,
100
]
},
{
"parameters": {
"fromEmail": "onboarding@flowkit.io",
"toEmail": "={{$json[\"email\"]}}",
"subject": "CBP ISF 10+2 & Trade Compliance Automation \u2014 Your Customs Brokerage Brief",
"text": "Welcome to FlowKit.\n\nCBP trade compliance clocks:\n- ISF 10+2 \u2192 24h before vessel loading at foreign port (19 CFR \u00a7149.2)\n- ACE entry \u2192 15 days from vessel arrival (19 CFR \u00a7142.13)\n- OFAC SDN screen \u2192 real-time pre-shipment\n\nCloud iPaaS holding ISF data = CBP subpoena reaches vendor before your compliance team. Self-hosted n8n keeps filing records in your infrastructure boundary.\n\nDay 3: ISF 10+2 24h deadline tracker.\nDay 7: ACE entry bond expiry pipeline."
},
"name": "Send Customs Brief",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2,
"position": [
600,
400
]
},
{
"parameters": {
"fromEmail": "onboarding@flowkit.io",
"toEmail": "={{$json[\"email\"]}}",
"subject": "Logistics & FreightTech Compliance Automation \u2014 Your Brief",
"text": "Welcome to FlowKit.\n\nCore logistics compliance clocks:\n- PHMSA hazmat incident \u2192 IMMEDIATE NRC call (49 CFR \u00a7171.15)\n- CBP ISF 10+2 \u2192 24h before vessel load\n- FMCSA ELD malfunction \u2192 24h notation\n- OSHA fatality \u2192 8h report (29 CFR \u00a71904.39)\n\nDay 3: PHMSA/FMCSA/CBP deadline tracker.\nDay 7: Incident pipeline setup."
},
"name": "Send Default Brief",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2,
"position": [
600,
650
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={\"status\": \"ok\", \"tier\": \"{{$json['tier']}}\", \"brief\": \"queued\"}"
},
"name": "Respond OK",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
900,
400
]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Is ELD Vendor?",
"type": "main",
"index": 0
}
]
]
},
"Is ELD Vendor?": {
"main": [
[
{
"node": "Send ELD Brief",
"type": "main",
"index": 0
}
],
[
{
"node": "Is Customs Broker?",
"type": "main",
"index": 0
}
]
]
},
"Is Customs Broker?": {
"main": [
[
{
"node": "Send Customs Brief",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Default Brief",
"type": "main",
"index": 0
}
]
]
},
"Send ELD Brief": {
"main": [
[
{
"node": "Respond OK",
"type": "main",
"index": 0
}
]
]
},
"Send Customs Brief": {
"main": [
[
{
"node": "Respond OK",
"type": "main",
"index": 0
}
]
]
},
"Send Default Brief": {
"main": [
[
{
"node": "Respond OK",
"type": "main",
"index": 0
}
]
]
}
}
}
Workflow 2: FMCSA HOS / PHMSA / CBP Compliance Deadline Tracker
Polls your compliance database hourly. Routes IMMEDIATE clocks (PHMSA, TSA) to Slack PagerDuty-style, 8h OSHA clock to separate Slack channel, 24h clocks (CBP ISF, ELD malfunction) to email, all events logged to Google Sheets.
{
"name": "FMCSA HOS/PHMSA/CBP Compliance Deadline Tracker",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"minutesInterval": 1
}
]
}
},
"name": "Every Hour",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
100,
300
]
},
{
"parameters": {
"url": "https://your-logistics-api.io/api/compliance/deadlines",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"name": "Fetch Compliance Items",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
350,
300
]
},
{
"parameters": {
"conditions": {
"number": [
{
"value1": "={{$json[\"hours_until_due\"]}}",
"operation": "smallerEqual",
"value2": 1
}
]
}
},
"name": "IMMEDIATE (<1h)?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
600,
200
]
},
{
"parameters": {
"conditions": {
"number": [
{
"value1": "={{$json[\"hours_until_due\"]}}",
"operation": "smallerEqual",
"value2": 8
}
]
}
},
"name": "8H Clock (OSHA)?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
600,
400
]
},
{
"parameters": {
"conditions": {
"number": [
{
"value1": "={{$json[\"hours_until_due\"]}}",
"operation": "smallerEqual",
"value2": 24
}
]
}
},
"name": "24H Clock?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
600,
600
]
},
{
"parameters": {
"url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "text",
"value": "=\ud83d\udea8 IMMEDIATE REGULATORY CLOCK: {{$json['type']}} \u2014 {{$json['authority']}} \u2014 CLIENT: {{$json['client_name']}} \u2014 ACTION: {{$json['required_action']}} \u2014 NRC/AGENCY: {{$json['contact']}}"
}
]
}
},
"name": "Slack IMMEDIATE Alert",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
900,
100
]
},
{
"parameters": {
"url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "text",
"value": "=\u26a0\ufe0f 8H OSHA CLOCK: {{$json['type']}} \u2014 {{$json['authority']}} \u2014 REPORT TO OSHA NOW: 1-800-321-OSHA \u2014 CLIENT: {{$json['client_name']}} \u2014 Incident: {{$json['incident_description']}}"
}
]
}
},
"name": "Slack 8H OSHA Alert",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
900,
350
]
},
{
"parameters": {
"fromEmail": "compliance@flowkit.io",
"toEmail": "={{$json[\"compliance_officer_email\"]}}",
"subject": "=24H REGULATORY DEADLINE: {{$json['type']}} \u2014 {{$json['authority']}}",
"text": "=24-HOUR COMPLIANCE CLOCK \u2014 {{$json['type']}}\n\nAuthority: {{$json['authority']}}\nClient: {{$json['client_name']}}\nDue: {{$json['due_date']}}\nRequired action: {{$json['required_action']}}\nEnforcement risk: {{$json['enforcement_risk']}}"
},
"name": "Email 24H Alert",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2,
"position": [
900,
600
]
},
{
"parameters": {
"operation": "append",
"documentId": {
"value": "YOUR_SHEETS_DOC_ID"
},
"sheetName": "DeadlineLog",
"columnsUi": {
"values": [
{
"column": "deadline_id",
"fieldValue": "={{$json['id']}}"
},
{
"column": "type",
"fieldValue": "={{$json['type']}}"
},
{
"column": "authority",
"fieldValue": "={{$json['authority']}}"
},
{
"column": "clock",
"fieldValue": "={{$json['clock']}}"
},
{
"column": "client",
"fieldValue": "={{$json['client_name']}}"
},
{
"column": "due_date",
"fieldValue": "={{$json['due_date']}}"
},
{
"column": "status",
"fieldValue": "ALERTED"
},
{
"column": "alerted_at",
"fieldValue": "={{new Date().toISOString()}}"
}
]
}
},
"name": "Log to Sheets",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4,
"position": [
900,
800
]
}
],
"connections": {
"Every Hour": {
"main": [
[
{
"node": "Fetch Compliance Items",
"type": "main",
"index": 0
}
]
]
},
"Fetch Compliance Items": {
"main": [
[
{
"node": "IMMEDIATE (<1h)?",
"type": "main",
"index": 0
}
]
]
},
"IMMEDIATE (<1h)?": {
"main": [
[
{
"node": "Slack IMMEDIATE Alert",
"type": "main",
"index": 0
}
],
[
{
"node": "8H Clock (OSHA)?",
"type": "main",
"index": 0
}
]
]
},
"8H Clock (OSHA)?": {
"main": [
[
{
"node": "Slack 8H OSHA Alert",
"type": "main",
"index": 0
}
],
[
{
"node": "24H Clock?",
"type": "main",
"index": 0
}
]
]
},
"24H Clock?": {
"main": [
[
{
"node": "Email 24H Alert",
"type": "main",
"index": 0
}
],
[
{
"node": "Log to Sheets",
"type": "main",
"index": 0
}
]
]
}
}
}
Workflow 3: FMCSA ELD & Fleet HOS Health Monitor
15-minute polling of ELD/telematics API. Detects ELD malfunction status and HOS hours-remaining < 0.5h. Fires Slack alerts with FMCSA citation, driver details, and fleet manager escalation.
{
"name": "FMCSA ELD & Fleet HOS Health Monitor",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutesInterval": 15
}
]
}
},
"name": "Every 15min",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
100,
300
]
},
{
"parameters": {
"url": "={{$env['ELD_API_BASE_URL']}}/api/v1/drivers/hos-status",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"name": "Fetch HOS Status",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
350,
300
]
},
{
"parameters": {
"fieldToSplitOut": "drivers",
"include": "allOtherFields"
},
"name": "Split Drivers",
"type": "n8n-nodes-base.splitOut",
"typeVersion": 1,
"position": [
600,
300
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"eld_status\"]}}",
"operation": "equals",
"value2": "MALFUNCTION"
}
]
}
},
"name": "ELD Malfunction?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
850,
200
]
},
{
"parameters": {
"conditions": {
"number": [
{
"value1": "={{$json[\"hours_remaining\"]}}",
"operation": "smallerEqual",
"value2": 0.5
}
]
}
},
"name": "HOS Violation Imminent?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
850,
450
]
},
{
"parameters": {
"url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "text",
"value": "=\u26a0\ufe0f ELD MALFUNCTION \u2014 49 CFR \u00a7395.22(j)\nDriver: {{$json['driver_name']}} (CDL: {{$json['cdl_number']}})\nVehicle: {{$json['vehicle_id']}} | Route: {{$json['current_route']}}\nAction: Driver must note malfunction in CMV within 24h + paper log up to 8 days\nFleet manager: {{$json['fleet_manager_email']}}"
}
]
}
},
"name": "Slack ELD Malfunction",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
1100,
100
]
},
{
"parameters": {
"url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "text",
"value": "=\ud83d\ude9b HOS VIOLATION IMMINENT \u2014 {{$json['driver_name']}}\nHours remaining: {{$json['hours_remaining']}}h on {{$json['duty_cycle']}} cycle\nVehicle: {{$json['vehicle_id']}} | Location: {{$json['current_location']}}\n49 CFR \u00a7395.3: Driver must stop and rest now \u2014 coordinate dispatch re-routing"
}
]
}
},
"name": "Slack HOS Alert",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
1100,
400
]
},
{
"parameters": {
"operation": "append",
"documentId": {
"value": "YOUR_SHEETS_DOC_ID"
},
"sheetName": "HOSAlerts",
"columnsUi": {
"values": [
{
"column": "timestamp",
"fieldValue": "={{new Date().toISOString()}}"
},
{
"column": "driver",
"fieldValue": "={{$json['driver_name']}}"
},
{
"column": "cdl",
"fieldValue": "={{$json['cdl_number']}}"
},
{
"column": "vehicle",
"fieldValue": "={{$json['vehicle_id']}}"
},
{
"column": "alert_type",
"fieldValue": "={{$json['eld_status'] === 'MALFUNCTION' ? 'ELD_MALFUNCTION' : 'HOS_VIOLATION'}}"
},
{
"column": "hours_remaining",
"fieldValue": "={{$json['hours_remaining']}}"
}
]
}
},
"name": "Log HOS Alert",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4,
"position": [
1100,
650
]
}
],
"connections": {
"Every 15min": {
"main": [
[
{
"node": "Fetch HOS Status",
"type": "main",
"index": 0
}
]
]
},
"Fetch HOS Status": {
"main": [
[
{
"node": "Split Drivers",
"type": "main",
"index": 0
}
]
]
},
"Split Drivers": {
"main": [
[
{
"node": "ELD Malfunction?",
"type": "main",
"index": 0
}
]
]
},
"ELD Malfunction?": {
"main": [
[
{
"node": "Slack ELD Malfunction",
"type": "main",
"index": 0
}
],
[
{
"node": "HOS Violation Imminent?",
"type": "main",
"index": 0
}
]
]
},
"HOS Violation Imminent?": {
"main": [
[
{
"node": "Slack HOS Alert",
"type": "main",
"index": 0
}
],
[
{
"node": "Log HOS Alert",
"type": "main",
"index": 0
}
]
]
}
}
}
Workflow 4: Logistics Compliance Incident Pipeline (PHMSA / OSHA / TSA)
Webhook-triggered incident pipeline. Routes PHMSA hazmat incidents to NRC notification workflow, OSHA fatalities to 8-hour escalation, TSA CCSP security incidents to security officer email with audit trail reference.
{
"name": "Logistics Compliance Incident Pipeline (PHMSA / OSHA / TSA)",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "logistics-incident",
"responseMode": "responseNode"
},
"name": "Incident Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
100,
400
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"incident_type\"]}}",
"operation": "equals",
"value2": "PHMSA_HAZMAT_INCIDENT"
}
]
}
},
"name": "PHMSA Hazmat?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
350,
200
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"incident_type\"]}}",
"operation": "equals",
"value2": "OSHA_WORKPLACE_FATALITY"
}
]
}
},
"name": "OSHA Fatality?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
350,
450
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"incident_type\"]}}",
"operation": "contains",
"value2": "TSA"
}
]
}
},
"name": "TSA Security?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
350,
700
]
},
{
"parameters": {
"url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "text",
"value": "=\ud83d\udea8 PHMSA HAZMAT INCIDENT \u2014 IMMEDIATE NRC CALL: 1-800-424-8802\nHazmat: {{$json['material_name']}} | Class: {{$json['hazmat_class']}} | Quantity: {{$json['quantity']}} {{$json['unit']}}\nLocation: {{$json['location']}} | Client: {{$json['client_name']}}\n49 CFR \u00a7171.15: IMMEDIATE report required if death/injury/evacuation/carrier damage >$50K.\n30-day written report: 49 CFR \u00a7171.16."
}
]
}
},
"name": "PHMSA NRC Alert",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
600,
100
]
},
{
"parameters": {
"url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "text",
"value": "=\ud83d\udea8 OSHA 8H FATALITY CLOCK \u2014 29 CFR \u00a71904.39(a)(1)\nReport to OSHA NOW: 1-800-321-OSHA\nWorker: {{$json['worker_name']}} | Location: {{$json['facility_address']}}\nClient: {{$json['client_name']}} | NAICS: {{$json['naics_code']}}\nDeadline: 8 HOURS from incident. CLOCK STARTED AT: {{$json['incident_time']}}"
}
]
}
},
"name": "OSHA Fatality Alert",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
600,
400
]
},
{
"parameters": {
"fromEmail": "compliance@flowkit.io",
"toEmail": "={{$json[\"security_officer_email\"]}}",
"subject": "=TSA CCSP Security Incident \u2014 {{$json['incident_type']}} \u2014 IMMEDIATE",
"text": "=TSA CARGO SECURITY INCIDENT\n\nIncident type: {{$json['incident_type']}}\nClient: {{$json['client_name']}}\nFlight/Shipment: {{$json['shipment_id']}}\nLocation: {{$json['location']}}\n\nReport required to TSA per SD 1542-04-08F / 49 CFR \u00a71544.305.\nChain of custody for cargo manifest data has been preserved in self-hosted n8n audit log.\nContact TSA: 866-289-9673"
},
"name": "TSA Security Notice",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2,
"position": [
600,
700
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={\"status\": \"ok\", \"incident_type\": \"{{$json['incident_type']}}\", \"routed\": true, \"ts\": \"{{new Date().toISOString()}}\"}"
},
"name": "Respond OK",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
900,
400
]
}
],
"connections": {
"Incident Webhook": {
"main": [
[
{
"node": "PHMSA Hazmat?",
"type": "main",
"index": 0
}
]
]
},
"PHMSA Hazmat?": {
"main": [
[
{
"node": "PHMSA NRC Alert",
"type": "main",
"index": 0
}
],
[
{
"node": "OSHA Fatality?",
"type": "main",
"index": 0
}
]
]
},
"OSHA Fatality?": {
"main": [
[
{
"node": "OSHA Fatality Alert",
"type": "main",
"index": 0
}
],
[
{
"node": "TSA Security?",
"type": "main",
"index": 0
}
]
]
},
"TSA Security?": {
"main": [
[
{
"node": "TSA Security Notice",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond OK",
"type": "main",
"index": 0
}
]
]
},
"PHMSA NRC Alert": {
"main": [
[
{
"node": "Respond OK",
"type": "main",
"index": 0
}
]
]
},
"OSHA Fatality Alert": {
"main": [
[
{
"node": "Respond OK",
"type": "main",
"index": 0
}
]
]
},
"TSA Security Notice": {
"main": [
[
{
"node": "Respond OK",
"type": "main",
"index": 0
}
]
]
}
}
}
Workflow 5: Weekly LogisticsTech SaaS KPI & Compliance Dashboard
Monday 7AM: pulls MRR by tier (TMS/FLEET_TELEMATICS/FREIGHT_BROKERAGE/CUSTOMS_BROKERAGE/WAREHOUSE/OCEAN_FREIGHT/STARTUP), ELD vehicle counts, ISF filing volumes, open compliance deadline counts by type. HTML email to CEO + BCC compliance lead.
{
"name": "Weekly LogisticsTech SaaS KPI & Compliance Dashboard",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"weeksInterval": 1,
"triggerAtDay": [
1
],
"triggerAtHour": 7
}
]
}
},
"name": "Monday 7AM",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
100,
300
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT tier, COUNT(*) as accounts, SUM(mrr) as tier_mrr, SUM(eld_vehicles) as eld_vehicles, SUM(hazmat_shipments_monthly) as hazmat_shipments, SUM(isf_filings_monthly) as isf_filings FROM logistics_accounts WHERE active = true GROUP BY tier ORDER BY tier_mrr DESC"
},
"name": "Fetch KPI Data",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2,
"position": [
350,
300
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT type, COUNT(*) as open_count, MIN(due_date) as soonest_due FROM compliance_deadlines WHERE status = 'OPEN' AND due_date > NOW() GROUP BY type ORDER BY soonest_due ASC LIMIT 10"
},
"name": "Fetch Open Deadlines",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2,
"position": [
350,
500
]
},
{
"parameters": {
"fromEmail": "kpi@flowkit.io",
"toEmail": "ceo@yourcompany.io",
"additionalFields": {
"bcc": "compliance@yourcompany.io"
},
"subject": "=LogisticsTech SaaS Weekly KPI \u2014 {{new Date().toLocaleDateString('en-US', {weekday:'long',year:'numeric',month:'long',day:'numeric'})}}",
"html": "=<h2>LogisticsTech SaaS Weekly KPI</h2><p><b>Total MRR:</b> ${{$node['Fetch KPI Data'].json.reduce((s,r)=>s+Number(r.tier_mrr),0).toLocaleString()}}</p><h3>By Tier</h3><table border='1' cellpadding='4'>{{$node['Fetch KPI Data'].json.map(r=>`<tr><td>${r.tier}</td><td>${r.accounts} accounts</td><td>$${Number(r.tier_mrr).toLocaleString()} MRR</td><td>${r.eld_vehicles} ELD vehicles</td><td>${r.isf_filings} ISF/mo</td></tr>`).join('')}}</table><h3>Open Compliance Deadlines (Top 10)</h3><table border='1' cellpadding='4'>{{$node['Fetch Open Deadlines'].json.map(r=>`<tr><td>${r.type}</td><td>${r.open_count} open</td><td>Soonest: ${r.soonest_due}</td></tr>`).join('')}}</table>"
},
"name": "Send KPI Email",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2,
"position": [
600,
400
]
}
],
"connections": {
"Monday 7AM": {
"main": [
[
{
"node": "Fetch KPI Data",
"type": "main",
"index": 0
}
]
]
},
"Fetch KPI Data": {
"main": [
[
{
"node": "Fetch Open Deadlines",
"type": "main",
"index": 0
}
]
]
},
"Fetch Open Deadlines": {
"main": [
[
{
"node": "Send KPI Email",
"type": "main",
"index": 0
}
]
]
}
}
}
Self-Hosting Argument for LogisticsTech SaaS Vendors
The case for self-hosted n8n in logistics compliance infrastructure:
- PHMSA IMMEDIATE reporting requires architecture that functions independently of third-party SaaS availability. 49 CFR §171.15 has no vendor downtime exception.
- FMCSA ELD data is regulatory evidence. A cloud iPaaS holding HOS records creates an independent DOT subpoena vector that bypasses your client.
- CBP ISF filing records — 19 CFR §149 imposes strict liability for late filings. Cloud iPaaS between your platform and CBP ACE is a $5,000/violation exposure point.
- OSHA incident records — 29 CFR §1904.39 requires 8-hour and 24-hour reporting. Cloud iPaaS with SLA > 8h is architecturally exposed for fatality reporting obligations.
Self-hosted n8n keeps HOS data, hazmat incident records, ISF filings, and OSHA reports inside the client's infrastructure boundary — eliminating the independent vendor subpoena vector.
Ready-to-deploy workflow templates: https://stripeai.gumroad.com
This article is for informational purposes. Consult qualified transportation and trade counsel for site-specific compliance requirements.
Top comments (0)