If your logistics or supply chain SaaS platform helps 3PLs, freight brokers, TMS vendors, or cold-chain operators manage compliance, your customers are juggling a stack of interlocking regulatory clocks that have nothing to do with each other but all run simultaneously.
A single international shipment can trigger: CBP's 24-hour advance manifest clock (Trade Act 2002), an FMC detention dispute window (Ocean Shipping Reform Act 2022), FMCSA ELD hours-of-service limits (49 CFR Part 395), FDA FSMA supplier verification requirements (21 CFR Part 117), EU CSDDD supply chain due diligence obligations (Directive 2024/1760), and SEC Scope 3 emissions reporting (for larger platforms). Each regulation has different enforcement agencies, different penalty structures, and different deadlines.
Here are five n8n workflows that address the highest-penalty clocks in this stack. Full JSON below.
Why LogisticsTech SaaS vendors face unusual compliance exposure
Most SaaS compliance automation articles focus on data privacy or financial regulations. Logistics compliance is different because the penalties are physical — a Do Not Load (DNL) order stops a vessel from departing, out-of-service (OOS) orders ground trucks, and a FSMA recall can empty shelves.
CBP Trade Act 2002: The 24-hour advance manifest rule requires cargo details filed with CBP at least 24 hours before vessel loading in a foreign port. Miss the window and CBP issues a Do Not Load order. Penalty: $5,000 per shipment. For a 3PL processing 50 shipments/day, a systemic failure can generate $250,000 in penalties before the compliance team notices.
FMC Ocean Shipping Reform Act 2022: Before OSRA 2022, ocean carriers routinely billed detention and demurrage even when containers weren't actually available for pickup. OSRA 2022 made these practices prohibited. If your freight broker or TMS SaaS is processing carrier detention invoices, the platform needs to flag invoices where container availability wasn't confirmed — otherwise your customers are paying illegal charges.
FMCSA ELD HOS: The Electronic Logging Device mandate (49 CFR Part 395) requires electronic logging of all hours-of-service data for commercial motor vehicles. The 11-hour driving limit, 14-hour on-duty window, and 30-minute break requirement each carry out-of-service penalties of $1,000–$16,000 per violation. A TMS or 3PL SaaS that monitors driver data has a real-time compliance window — but only if the monitoring is fast enough to catch violations before the driver is already OOS.
FDA FSMA 21 CFR Part 117: The Food Safety Modernization Act requires food-grade shippers and cold-chain operators to maintain PCQI (Preventive Controls Qualified Individual) oversight, supplier verification programs, and full lot traceability. The FDA Traceability Rule (21 CFR §1.1310) — effective January 2026 — requires end-to-end lot tracking for high-risk foods. A cold-chain SaaS platform that doesn't surface these supplier verification gaps is leaving customers exposed to warning letters, consent decrees, and potential criminal referrals.
EU CSDDD Directive 2024/1760: The Corporate Sustainability Due Diligence Directive requires companies above revenue/employee thresholds to conduct annual human rights and environmental due diligence across their entire supply chain — and document it. Penalty: up to €5M or 5% of global annual turnover. For logistics SaaS platforms serving EU-headquartered 3PLs and freight operators, this is a 2025–2026 implementation urgency.
SEC Scope 3 / California SB 253: Large accelerated filers face mandatory Scope 3 supply chain emissions reporting under SEC's Climate Disclosure Rule (FY2026 for LAFs). California SB 253 applies to companies with >$1B California revenue. TMS and supply chain platforms that can surface emissions data from carrier routing are positioned to be critical infrastructure for Scope 3 compliance.
The self-hosting argument for logistics SaaS
FMCSA ELD data is particularly sensitive: it contains real-time driver location, driving behavior, and hours-of-service records. Under 49 CFR §395.8, this data must be available to authorized safety officials on demand. If your TMS or 3PL SaaS routes ELD data through Zapier or Make, those automation vendor servers are in the ELD data chain — which complicates the FMCSA audit scope. Self-hosted n8n keeps the ELD data inside your platform's perimeter, which simplifies the compliance boundary considerably.
For cold-chain operators under FSMA, lot traceability records need to be producible within 24 hours of an FDA request (21 CFR §1.1315). If your traceability automation pipeline routes through a third-party iPaaS, that vendor's retention policy — not yours — governs how long those records are available.
EU CSDDD Art.21 supply chain assessment guidance from ENISA and the European Commission includes iPaaS vendors processing supply chain data as in-scope third parties. A 3PL SaaS using Zapier to orchestrate CSDDD supplier audits is adding a third-party vendor to the CSDDD scope definition.
The 5 workflows
1. CBP Advance Manifest & FMC Detention Compliance Pipeline
Webhook-triggered on every shipment event. Evaluates: (1) CBP 24-hour manifest deadline — calculates hours remaining, flags Do Not Load risk with $5,000 penalty annotation. (2) FMC OSRA 2022 — checks whether detention invoices arrived without confirmed container availability (FMC prohibited practice). (3) C-TPAT status for green-lane routing. Tier-segmented flag arrays: 3PL gets CBP+FMC+CTPAT+FMCSA_ELD, Customs Broker gets CBP+5106+CTPAT+OFAC_SCREENING+ACE_FILING.
{
"name": "CBP Advance Manifest & FMC Detention Compliance Pipeline",
"nodes": [
{
"id": "1",
"name": "Shipment Event Webhook",
"type": "n8n-nodes-base.webhook",
"parameters": {
"path": "shipment-event",
"responseMode": "responseNode"
},
"position": [
250,
300
]
},
{
"id": "2",
"name": "CBP/FMC Compliance Check",
"type": "n8n-nodes-base.code",
"parameters": {
"jsCode": "\n// CBP Trade Act 2002 24h advance manifest + FMC Ocean Shipping Reform Act 2022\nconst ship = $json;\nconst now = new Date();\n\n// CBP: manifest must be filed 24h before vessel departure\n// Penalty: Do Not Load (DNL) order + $5,000/shipment\nconst departureTs = new Date(ship.vessel_departure_utc);\nconst manifestDeadlineTs = new Date(departureTs.getTime() - 24*60*60*1000);\nconst hoursToManifestDeadline = (manifestDeadlineTs - now) / (60*60*1000);\n\n// FMC Ocean Shipping Reform Act 2022: demurrage/detention prohibitions\n// Carrier cannot invoice detention if container not available for pickup\n// Shipper must prove container availability before detention clock starts\nconst fmcFlags = [];\nif (ship.detention_billed && !ship.container_available_confirmed) {\n fmcFlags.push({\n type: 'FMC_PROHIBITED_DETENTION',\n severity: 'CRITICAL',\n regulation: 'FMC Ocean Shipping Reform Act 2022 \u00a741102(d)',\n action: 'File FMC complaint \u2014 detention invoice without container availability confirmation is prohibited practice',\n deadline: '30 days from invoice receipt to dispute'\n });\n}\nif (ship.demurrage_billed && !ship.earliest_return_date_provided) {\n fmcFlags.push({\n type: 'FMC_PROHIBITED_DEMURRAGE',\n severity: 'CRITICAL',\n regulation: 'FMC 46 CFR Part 545 \u2014 Demurrage/Detention Billing Practices',\n action: 'Reject invoice \u2014 carrier must provide Earliest Return Date (ERD) before demurrage accrues',\n deadline: 'Immediate dispute required'\n });\n}\n\n// CTPAT/C-TPAT AMS ACE filing\nconst ctpatStatus = ship.ctpat_partner ? 'CTPAT_GREEN_LANE' : 'STANDARD_EXAM_RISK';\n\n// Tier segmentation\nconst TIER_FLAGS = {\n '3PL_SAAS': ['CBP_MANIFEST', 'FMC_DETENTION', 'CTPAT', 'FMCSA_ELD', 'FSMA_CARRIER'],\n 'FREIGHT_BROKER_SAAS': ['CBP_MANIFEST', 'FMC_DETENTION', 'FMCSA_BROKER_AUTHORITY', 'CTPAT'],\n 'TMS_SAAS': ['CBP_MANIFEST', 'FMCSA_ELD', 'FMC_DETENTION', 'FSMA', 'CSDDD_SCOPE3'],\n 'COLD_CHAIN_SAAS': ['FSMA_PCQI', 'FDA_SANITARY_TRANSPORT', 'FMCSA_ELD', 'FSMA_TEMP_LOG'],\n 'CUSTOMS_BROKER_SAAS': ['CBP_MANIFEST', 'CBP_5106', 'CTPAT', 'OFAC_SCREENING', 'ACE_FILING'],\n 'LAST_MILE_DELIVERY_SAAS': ['FMCSA_ELD', 'DOT_SAFETY', 'CCPA_DRIVER_DATA', 'FMCSA_HOS'],\n 'LOGISTICS_STARTUP': ['CBP_MANIFEST', 'FMCSA_ELD', 'FSMA', 'FMC_DETENTION']\n};\nconst tier = ship.tier || 'LOGISTICS_STARTUP';\nconst tierFlags = TIER_FLAGS[tier] || TIER_FLAGS['LOGISTICS_STARTUP'];\n\n// CBP manifest urgency\nlet cbpUrgency = 'NORMAL';\nlet cbpAlert = false;\nif (!ship.manifest_filed) {\n if (hoursToManifestDeadline <= 0) {\n cbpUrgency = 'DO_NOT_LOAD_RISK';\n cbpAlert = true;\n } else if (hoursToManifestDeadline <= 4) {\n cbpUrgency = 'CRITICAL';\n cbpAlert = true;\n } else if (hoursToManifestDeadline <= 12) {\n cbpUrgency = 'URGENT';\n cbpAlert = true;\n }\n}\n\nreturn [{\n json: {\n shipment_id: ship.shipment_id,\n tier,\n tier_flags: tierFlags,\n cbp: {\n manifest_filed: ship.manifest_filed || false,\n hours_to_deadline: Math.round(hoursToManifestDeadline * 10) / 10,\n deadline_utc: manifestDeadlineTs.toISOString(),\n urgency: cbpUrgency,\n alert_required: cbpAlert,\n penalty_risk: cbpUrgency === 'DO_NOT_LOAD_RISK' ? '$5,000/shipment + Do Not Load order \u2014 CBP Trade Act 2002' : null\n },\n fmc_flags: fmcFlags,\n ctpat_status: ctpatStatus,\n alert_required: cbpAlert || fmcFlags.length > 0\n }\n}];\n"
},
"position": [
450,
300
]
},
{
"id": "3",
"name": "Alert Required?",
"type": "n8n-nodes-base.if",
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $json.alert_required }}",
"value2": true,
"operation": "equal"
}
]
}
},
"position": [
650,
300
]
},
{
"id": "4",
"name": "Slack #customs-compliance",
"type": "n8n-nodes-base.slack",
"parameters": {
"channel": "#customs-compliance",
"text": "={{ $json.cbp.urgency === 'DO_NOT_LOAD_RISK' ? '\ud83d\udea8 CBP DO NOT LOAD RISK' : '\u26a0\ufe0f CBP Manifest Alert' }} | Shipment {{ $json.shipment_id }} | Hours to deadline: {{ $json.cbp.hours_to_deadline }}h | {{ $json.cbp.penalty_risk || 'File manifest immediately' }}"
},
"position": [
850,
200
]
},
{
"id": "5",
"name": "Email Customs Manager",
"type": "n8n-nodes-base.gmail",
"parameters": {
"to": "customs@company.com",
"subject": "CBP Manifest Alert \u2014 Shipment {{ $json.shipment_id }} | {{ $json.cbp.urgency }}",
"message": "Shipment: {{ $json.shipment_id }}\nTier: {{ $json.tier }}\nManifest deadline: {{ $json.cbp.deadline_utc }}\nHours remaining: {{ $json.cbp.hours_to_deadline }}h\nFMC flags: {{ $json.fmc_flags.length }} issues\nCTPA status: {{ $json.ctpat_status }}\n\nRegulation: CBP Trade Act 2002 \u2014 24h advance manifest required\nPenalty: $5,000/shipment + Do Not Load if not filed in time"
},
"position": [
850,
350
]
},
{
"id": "6",
"name": "Log to Postgres",
"type": "n8n-nodes-base.postgres",
"parameters": {
"operation": "insert",
"table": "cbp_fmc_compliance_log",
"columns": "shipment_id,tier,cbp_urgency,hours_to_deadline,fmc_flags,ctpat_status,logged_at",
"values": "={{ $json.shipment_id }},={{ $json.tier }},={{ $json.cbp.urgency }},={{ $json.cbp.hours_to_deadline }},={{ JSON.stringify($json.fmc_flags) }},={{ $json.ctpat_status }},={{ new Date().toISOString() }}"
},
"position": [
850,
500
]
},
{
"id": "7",
"name": "Respond 200",
"type": "n8n-nodes-base.respondToWebhook",
"parameters": {
"responseCode": 200,
"responseBody": "{\"status\":\"logged\",\"shipment_id\":\"={{ $json.shipment_id }}\"}"
},
"position": [
1050,
300
]
}
],
"connections": {
"Shipment Event Webhook": {
"main": [
[
{
"node": "CBP/FMC Compliance Check",
"type": "main",
"index": 0
}
]
]
},
"CBP/FMC Compliance Check": {
"main": [
[
{
"node": "Alert Required?",
"type": "main",
"index": 0
}
]
]
},
"Alert Required?": {
"main": [
[
{
"node": "Slack #customs-compliance",
"type": "main",
"index": 0
},
{
"node": "Email Customs Manager",
"type": "main",
"index": 0
},
{
"node": "Log to Postgres",
"type": "main",
"index": 0
}
],
[
{
"node": "Log to Postgres",
"type": "main",
"index": 0
}
]
]
},
"Log to Postgres": {
"main": [
[
{
"node": "Respond 200",
"type": "main",
"index": 0
}
]
]
}
}
}
2. FMCSA ELD Hours-of-Service Violation Alert System
Polls ELD API every 30 minutes. Checks all four HOS limits simultaneously: 11-hour driving (per §395.3(a)(3)), 14-hour on-duty window (§395.3(a)(2)), 30-minute break after 8 driving hours (§395.3(a)(3)(ii)), and 60h/7-day or 70h/8-day cycle limit (§395.3(b)). Out-of-service violations trigger immediate Slack + DOT safety manager email. CSA BASIC score impact noted for each violation.
{
"name": "FMCSA ELD Hours-of-Service Violation Alert System",
"nodes": [
{
"id": "1",
"name": "Every 30 Minutes",
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutesInterval": 30
}
]
}
},
"position": [
250,
300
]
},
{
"id": "2",
"name": "Pull ELD Driver Data",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"url": "https://eld-api.company.com/drivers/current-status",
"authentication": "headerAuth"
},
"position": [
450,
300
]
},
{
"id": "3",
"name": "FMCSA HOS Analyzer",
"type": "n8n-nodes-base.code",
"parameters": {
"jsCode": "\n// FMCSA ELD Rule 49 CFR Part 395 \u2014 Hours of Service\n// ELD mandate: electronic logging required for CMV drivers (>10,000 lbs GVWR)\n// Property-carrying drivers:\n// - 11h driving limit after 10 consecutive off-duty hours\n// - 14h on-duty window (driving + non-driving combined)\n// - 30-min break required after 8h of driving\n// - 60h/7-day OR 70h/8-day cycle\n\nconst drivers = $json.drivers || [];\nconst violations = [];\nconst warnings = [];\n\nfor (const driver of drivers) {\n const hosDriving = driver.hos_driving_today_hours || 0;\n const hosOnDuty = driver.hos_on_duty_today_hours || 0;\n const cycleHours = driver.hos_cycle_hours || 0;\n const cycleType = driver.cycle_type || '70h8d';\n const cycleLimit = cycleType === '60h7d' ? 60 : 70;\n const drivingSinceBreak = driver.driving_since_break_hours || 0;\n\n // 11-hour driving limit\n if (hosDriving >= 11) {\n violations.push({\n driver_id: driver.driver_id,\n name: driver.name,\n type: 'HOS_11H_DRIVING_LIMIT_EXCEEDED',\n severity: 'CRITICAL',\n regulation: '49 CFR \u00a7395.3(a)(3) \u2014 Property-Carrying CMV',\n detail: `${hosDriving}h driving (limit: 11h)`,\n penalty: 'Out of service \u2014 CMV must stop immediately. $16,000+ fine per violation'\n });\n } else if (hosDriving >= 9.5) {\n warnings.push({driver_id: driver.driver_id, type: 'HOS_11H_APPROACHING', hours_remaining: 11 - hosDriving});\n }\n\n // 14-hour on-duty window\n if (hosOnDuty >= 14) {\n violations.push({\n driver_id: driver.driver_id,\n name: driver.name,\n type: 'HOS_14H_WINDOW_EXCEEDED',\n severity: 'CRITICAL',\n regulation: '49 CFR \u00a7395.3(a)(2) \u2014 14-hour on-duty window',\n detail: `${hosOnDuty}h on-duty (window: 14h)`,\n penalty: 'Driver OOS \u2014 no driving permitted until 10h off-duty reset'\n });\n }\n\n // 30-min break requirement (after 8h driving)\n if (drivingSinceBreak >= 8) {\n violations.push({\n driver_id: driver.driver_id,\n name: driver.name,\n type: 'HOS_30MIN_BREAK_REQUIRED',\n severity: 'URGENT',\n regulation: '49 CFR \u00a7395.3(a)(3)(ii) \u2014 30-minute break after 8h',\n detail: `${drivingSinceBreak}h driving without 30min break`,\n penalty: '$1,000\u2013$16,000 fine \u2014 driver must take 30min off-duty or sleeper berth break'\n });\n }\n\n // Cycle limit\n if (cycleHours >= cycleLimit) {\n violations.push({\n driver_id: driver.driver_id,\n name: driver.name,\n type: 'HOS_CYCLE_LIMIT_EXCEEDED',\n severity: 'CRITICAL',\n regulation: `49 CFR \u00a7395.3(b) \u2014 ${cycleType} cycle limit`,\n detail: `${cycleHours}h/${cycleLimit}h cycle used`,\n penalty: 'Driver must take 34h restart before resuming'\n });\n }\n}\n\nreturn [{json: {violations, warnings, violation_count: violations.length, warning_count: warnings.length, checked_at: new Date().toISOString()}}];\n"
},
"position": [
650,
300
]
},
{
"id": "4",
"name": "Violations Found?",
"type": "n8n-nodes-base.if",
"parameters": {
"conditions": {
"number": [
{
"value1": "={{ $json.violation_count }}",
"value2": 0,
"operation": "larger"
}
]
}
},
"position": [
850,
300
]
},
{
"id": "5",
"name": "Slack #fmcsa-hos-alerts",
"type": "n8n-nodes-base.slack",
"parameters": {
"channel": "#fmcsa-hos-alerts",
"text": "\ud83d\udea8 FMCSA HOS Violations: {{ $json.violation_count }} critical | {{ $json.violations.map(v => v.driver_id + ' ' + v.type).join(', ') }} | Out-of-service risk"
},
"position": [
1050,
200
]
},
{
"id": "6",
"name": "Email DOT Safety Manager",
"type": "n8n-nodes-base.gmail",
"parameters": {
"to": "dot-safety@company.com",
"subject": "FMCSA ELD HOS Violations \u2014 {{ $json.violation_count }} Drivers | {{ new Date().toISOString() }}",
"message": "Active HOS Violations: {{ $json.violation_count }}\n\n{{ $json.violations.map(v => v.driver_id + ': ' + v.type + ' \u2014 ' + v.detail + ' \u2014 ' + v.penalty).join('\\n') }}\n\nRegulation: 49 CFR Part 395 ELD mandate\nFMCSA SMS score impact: HOS violations increase CSA BASIC score\nOut-of-service threshold: any 11h or 14h violation = immediate OOS"
},
"position": [
1050,
350
]
},
{
"id": "7",
"name": "Log Violations Postgres",
"type": "n8n-nodes-base.postgres",
"parameters": {
"operation": "insert",
"table": "fmcsa_hos_violations",
"columns": "violation_count,violations_json,checked_at",
"values": "={{ $json.violation_count }},={{ JSON.stringify($json.violations) }},={{ $json.checked_at }}"
},
"position": [
1050,
500
]
}
],
"connections": {
"Every 30 Minutes": {
"main": [
[
{
"node": "Pull ELD Driver Data",
"type": "main",
"index": 0
}
]
]
},
"Pull ELD Driver Data": {
"main": [
[
{
"node": "FMCSA HOS Analyzer",
"type": "main",
"index": 0
}
]
]
},
"FMCSA HOS Analyzer": {
"main": [
[
{
"node": "Violations Found?",
"type": "main",
"index": 0
}
]
]
},
"Violations Found?": {
"main": [
[
{
"node": "Slack #fmcsa-hos-alerts",
"type": "main",
"index": 0
},
{
"node": "Email DOT Safety Manager",
"type": "main",
"index": 0
},
{
"node": "Log Violations Postgres",
"type": "main",
"index": 0
}
]
]
}
}
}
3. FDA FSMA & EU CSDDD Supply Chain Due Diligence Tracker
Runs weekdays at 8AM. Reads supplier records from Google Sheets. Evaluates 12 deadline types across both frameworks: FSMA PCQI annual review, supplier audit, certificate of analysis review, lot traceability (FDA Traceability Rule Jan 2026), sanitary transport, recall plan — and CSDDD annual human rights audit, environmental impact assessment, grievance mechanism review, climate transition plan, plus SEC Scope 3 and C-TPAT renewal. 30-day advance warning window for upcoming deadlines.
{
"name": "FDA FSMA & EU CSDDD Supply Chain Due Diligence Tracker",
"nodes": [
{
"id": "1",
"name": "Weekdays 8AM",
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 8 * * 1-5"
}
]
}
},
"position": [
250,
300
]
},
{
"id": "2",
"name": "Read Supply Chain Suppliers",
"type": "n8n-nodes-base.googleSheets",
"parameters": {
"operation": "read",
"sheetId": "SHEET_ID_SUPPLY_CHAIN",
"range": "Suppliers!A:P"
},
"position": [
450,
300
]
},
{
"id": "3",
"name": "FSMA & CSDDD Analyzer",
"type": "n8n-nodes-base.code",
"parameters": {
"jsCode": "\n// FDA FSMA 21 CFR Part 117 \u2014 Current Good Manufacturing Practice, Hazard Analysis, Risk-Based Preventive Controls (HARPC)\n// PCQI (Preventive Controls Qualified Individual) required for each facility\n// Supplier verification required for raw materials: on-site audit, certificate of analysis, lot traceability\n// EU CSDDD Directive 2024/1760 \u2014 supply chain due diligence for human rights & environmental\n// Applies to EU companies >1000 employees / $450M turnover (or non-EU reaching same thresholds via EU sales)\n// Scope 3 supply chain: SEC Climate Disclosure Rule (large accelerated filers FY2026) / California SB 253 >$1B revenue\n\nconst rows = $input.all();\nconst today = new Date();\nconst alerts = [];\n\nconst DEADLINE_TYPES = {\n 'FSMA_PCQI_ANNUAL_REVIEW': {regulation: '21 CFR \u00a7117.126 \u2014 PCQI annual food safety plan review', days: 365, severity: 'CRITICAL'},\n 'FSMA_SUPPLIER_AUDIT': {regulation: '21 CFR \u00a7117.410 \u2014 Supplier verification on-site audit', days: 365, severity: 'CRITICAL'},\n 'FSMA_SUPPLIER_COA': {regulation: '21 CFR \u00a7117.410(b)(2) \u2014 Certificate of analysis review', days: 90, severity: 'URGENT'},\n 'FSMA_LOT_TRACEABILITY': {regulation: '21 CFR \u00a71.1310 \u2014 Food Traceability Rule lot traceability', days: 30, severity: 'URGENT'},\n 'FSMA_SANITARY_TRANSPORT': {regulation: '21 CFR Part 1 Subpart O \u2014 Sanitary transportation of food', days: 180, severity: 'WARNING'},\n 'CSDDD_HUMAN_RIGHTS_AUDIT': {regulation: 'EU CSDDD 2024/1760 Art.8 \u2014 Annual human rights due diligence', days: 365, severity: 'CRITICAL'},\n 'CSDDD_ENVIRONMENTAL_AUDIT': {regulation: 'EU CSDDD 2024/1760 Art.10 \u2014 Environmental impact assessment', days: 365, severity: 'CRITICAL'},\n 'CSDDD_GRIEVANCE_MECHANISM': {regulation: 'EU CSDDD 2024/1760 Art.14 \u2014 Grievance mechanism review', days: 180, severity: 'WARNING'},\n 'SCOPE3_EMISSIONS_REPORT': {regulation: 'SEC Climate Disclosure Rule / CA SB 253 \u2014 Scope 3 supply chain emissions', days: 90, severity: 'URGENT'},\n 'CTPAT_SECURITY_REVIEW': {regulation: 'C-TPAT CBP Partnership \u2014 Annual security profile review', days: 365, severity: 'WARNING'},\n 'FSMA_RECALL_PLAN': {regulation: '21 CFR \u00a7117.139 \u2014 Recall plan annual review', days: 365, severity: 'URGENT'},\n 'CSDDD_TRANSITION_PLAN': {regulation: 'EU CSDDD 2024/1760 Art.22 \u2014 Climate transition plan adoption', days: 365, severity: 'CRITICAL'}\n};\n\nfor (const row of rows) {\n const supplier = row.json;\n for (const [deadlineType, config] of Object.entries(DEADLINE_TYPES)) {\n const lastCompletedKey = deadlineType.toLowerCase() + '_last_completed';\n if (!supplier[lastCompletedKey]) continue;\n const lastCompleted = new Date(supplier[lastCompletedKey]);\n const nextDue = new Date(lastCompleted.getTime() + config.days * 24 * 60 * 60 * 1000);\n const daysOverdue = Math.floor((today - nextDue) / (24 * 60 * 60 * 1000));\n\n if (daysOverdue >= -30) {\n alerts.push({\n supplier_id: supplier.supplier_id,\n supplier_name: supplier.supplier_name,\n deadline_type: deadlineType,\n severity: daysOverdue > 0 ? 'OVERDUE' : config.severity,\n regulation: config.regulation,\n days_overdue: daysOverdue,\n next_due: nextDue.toISOString().split('T')[0],\n tier: supplier.tier\n });\n }\n }\n}\n\nconst overdue = alerts.filter(a => a.days_overdue > 0);\nconst critical = alerts.filter(a => a.days_overdue <= 0 && a.days_overdue >= -7);\nreturn [{json: {alerts, overdue_count: overdue.length, critical_count: critical.length, total_count: alerts.length, alert_required: overdue.length > 0 || critical.length > 0}}];\n"
},
"position": [
650,
300
]
},
{
"id": "4",
"name": "Alert Required?",
"type": "n8n-nodes-base.if",
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $json.alert_required }}",
"value2": true,
"operation": "equal"
}
]
}
},
"position": [
850,
300
]
},
{
"id": "5",
"name": "Slack #supply-chain-compliance",
"type": "n8n-nodes-base.slack",
"parameters": {
"channel": "#supply-chain-compliance",
"text": "\u26a0\ufe0f FSMA/CSDDD Supplier Alerts: {{ $json.overdue_count }} overdue, {{ $json.critical_count }} critical | {{ $json.total_count }} total issues | FDA recall risk + EU CSDDD \u20ac5M fine risk"
},
"position": [
1050,
200
]
},
{
"id": "6",
"name": "Email Supply Chain VP",
"type": "n8n-nodes-base.gmail",
"parameters": {
"to": "supply-chain@company.com",
"subject": "FSMA/CSDDD Supplier Compliance Alerts \u2014 {{ $json.overdue_count }} Overdue | {{ new Date().toISOString().split('T')[0] }}",
"message": "Overdue supplier actions: {{ $json.overdue_count }}\n\nOverdue items:\n{{ $json.alerts.filter(a => a.days_overdue > 0).map(a => a.supplier_name + ' | ' + a.deadline_type + ' | ' + a.days_overdue + 'd overdue | ' + a.regulation).join('\\n') }}\n\nRegulations: FDA FSMA 21 CFR Part 117 / EU CSDDD 2024/1760 / SEC Scope 3\nFSMA penalty: warning letter + consent decree + criminal referral\nCSDDD penalty: up to \u20ac5M or 5% global turnover"
},
"position": [
1050,
350
]
}
],
"connections": {
"Weekdays 8AM": {
"main": [
[
{
"node": "Read Supply Chain Suppliers",
"type": "main",
"index": 0
}
]
]
},
"Read Supply Chain Suppliers": {
"main": [
[
{
"node": "FSMA & CSDDD Analyzer",
"type": "main",
"index": 0
}
]
]
},
"FSMA & CSDDD Analyzer": {
"main": [
[
{
"node": "Alert Required?",
"type": "main",
"index": 0
}
]
]
},
"Alert Required?": {
"main": [
[
{
"node": "Slack #supply-chain-compliance",
"type": "main",
"index": 0
},
{
"node": "Email Supply Chain VP",
"type": "main",
"index": 0
}
]
]
}
}
}
4. Logistics Regulatory Deadline Monitor
Runs weekdays at 7AM. Covers 12 deadline types spanning the full regulatory stack: CBP entry summary (19 CFR §142.11, 10 working days), FMC detention dispute (30-day window from OSRA 2022), FMCSA ELD 6-month record retention, FMCSA new entrant safety audit (18 months), FSMA food safety plan review, FSMA Traceability Rule, CSDDD due diligence, Scope 3 reporting, C-TPAT renewal, DOT drug testing program, HAZMAT employee training (3-year cycle, 49 CFR Part 172 Subpart H, penalty $84,425/violation).
{
"name": "Logistics Regulatory Deadline Monitor",
"nodes": [
{
"id": "1",
"name": "Weekdays 7AM",
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 7 * * 1-5"
}
]
}
},
"position": [
250,
300
]
},
{
"id": "2",
"name": "Read Regulatory Deadlines",
"type": "n8n-nodes-base.googleSheets",
"parameters": {
"operation": "read",
"sheetId": "SHEET_ID_LOGISTICS_DEADLINES",
"range": "Deadlines!A:M"
},
"position": [
450,
300
]
},
{
"id": "3",
"name": "Deadline Classifier",
"type": "n8n-nodes-base.code",
"parameters": {
"jsCode": "\nconst rows = $input.all();\nconst today = new Date();\n\nconst DEADLINE_TYPES = {\n 'CBP_ADVANCE_MANIFEST_24H': {regulation: 'CBP Trade Act 2002 \u2014 24h advance manifest', penalty: '$5,000/shipment + Do Not Load'},\n 'CBP_ENTRY_SUMMARY_10D': {regulation: '19 CFR \u00a7142.11 \u2014 Entry summary 10 working days', penalty: 'Liquidated damages 2x duties'},\n 'FMC_DETENTION_DISPUTE': {regulation: 'FMC Ocean Shipping Reform Act 2022 \u2014 30d dispute window', penalty: 'Forfeiture of dispute rights'},\n 'FMCSA_ELD_RETENTION_6M': {regulation: '49 CFR \u00a7395.8(k) \u2014 ELD records 6-month retention', penalty: '$1,000\u2013$16,000/violation'},\n 'FMCSA_SAFETY_AUDIT': {regulation: '49 CFR Part 385 \u2014 New entrant safety audit 18 months', penalty: 'Operating authority revocation'},\n 'FSMA_PCQI_REVIEW': {regulation: '21 CFR \u00a7117.126 \u2014 Annual food safety plan review', penalty: 'Warning letter + consent decree'},\n 'FSMA_TRACEABILITY_RULE': {regulation: '21 CFR \u00a71.1310 \u2014 Food Traceability Rule Jan 2026', penalty: 'Recall + criminal referral'},\n 'CSDDD_DUE_DILIGENCE': {regulation: 'EU CSDDD 2024/1760 \u2014 Annual supply chain audit', penalty: '\u20ac5M or 5% global turnover'},\n 'SCOPE3_EMISSIONS': {regulation: 'SEC Climate Disclosure / CA SB 253 \u2014 Scope 3 reporting', penalty: 'SEC enforcement + CA AG action'},\n 'CTPAT_RENEWAL': {regulation: 'C-TPAT CBP \u2014 Annual security profile update', penalty: 'Loss of expedited clearance'},\n 'DOT_DRUG_TESTING': {regulation: '49 CFR Part 40 \u2014 DOT drug and alcohol testing program', penalty: 'Safety violation + shutdown'},\n 'HAZMAT_TRAINING': {regulation: '49 CFR Part 172 Subpart H \u2014 Hazmat employee training 3yr', penalty: '$84,425/violation'}\n};\n\nconst classified = rows.map(r => {\n const deadline = r.json;\n const dueDate = new Date(deadline.due_date);\n const daysRemaining = Math.floor((dueDate - today) / (24*60*60*1000));\n const config = DEADLINE_TYPES[deadline.deadline_type] || {};\n\n let urgency = 'NORMAL';\n if (daysRemaining < 0) urgency = 'OVERDUE';\n else if (daysRemaining <= 1) urgency = 'CRITICAL';\n else if (daysRemaining <= 7) urgency = 'URGENT';\n else if (daysRemaining <= 30) urgency = 'WARNING';\n\n return {\n ...deadline,\n days_remaining: daysRemaining,\n urgency,\n regulation: config.regulation || deadline.regulation,\n penalty: config.penalty || deadline.penalty,\n alert_required: urgency !== 'NORMAL'\n };\n});\n\nconst actionable = classified.filter(d => d.alert_required);\nconst overdue = actionable.filter(d => d.urgency === 'OVERDUE');\nreturn [{json: {deadlines: actionable, overdue_count: overdue.length, total_actionable: actionable.length, alert_required: actionable.length > 0}}];\n"
},
"position": [
650,
300
]
},
{
"id": "4",
"name": "Alert Required?",
"type": "n8n-nodes-base.if",
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $json.alert_required }}",
"value2": true,
"operation": "equal"
}
]
}
},
"position": [
850,
300
]
},
{
"id": "5",
"name": "Slack #logistics-compliance",
"type": "n8n-nodes-base.slack",
"parameters": {
"channel": "#logistics-compliance",
"text": "\u26a0\ufe0f Logistics Compliance Deadlines: {{ $json.overdue_count }} overdue, {{ $json.total_actionable }} total | CBP/FMCSA/FSMA/CSDDD action needed"
},
"position": [
1050,
200
]
},
{
"id": "6",
"name": "Email Compliance Director",
"type": "n8n-nodes-base.gmail",
"parameters": {
"to": "compliance@company.com",
"subject": "Logistics Regulatory Deadlines \u2014 {{ $json.overdue_count }} Overdue | {{ new Date().toISOString().split('T')[0] }}",
"message": "{{ $json.deadlines.map(d => d.deadline_type + ' | ' + d.urgency + ' | ' + d.days_remaining + 'd | ' + d.regulation + ' | Penalty: ' + d.penalty).join('\\n') }}"
},
"position": [
1050,
350
]
}
],
"connections": {
"Weekdays 7AM": {
"main": [
[
{
"node": "Read Regulatory Deadlines",
"type": "main",
"index": 0
}
]
]
},
"Read Regulatory Deadlines": {
"main": [
[
{
"node": "Deadline Classifier",
"type": "main",
"index": 0
}
]
]
},
"Deadline Classifier": {
"main": [
[
{
"node": "Alert Required?",
"type": "main",
"index": 0
}
]
]
},
"Alert Required?": {
"main": [
[
{
"node": "Slack #logistics-compliance",
"type": "main",
"index": 0
},
{
"node": "Email Compliance Director",
"type": "main",
"index": 0
}
]
]
}
}
}
5. Weekly LogisticsTech SaaS Compliance KPI Dashboard
Monday 8AM. Queries Postgres for CBP/FMC incidents and FMCSA HOS violations from the previous 7 days. RAG status: RED if any DNL risk shipments or >3 HOS violations, AMBER if FMC disputes or any HOS warnings, GREEN otherwise. HTML email to VP Operations + COO. Self-hosting footnote included: FMCSA ELD data in third-party automation = driver privacy exposure + broader FMCSA audit scope.
{
"name": "Weekly LogisticsTech SaaS Compliance KPI Dashboard",
"nodes": [
{
"id": "1",
"name": "Monday 8AM",
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 8 * * 1"
}
]
}
},
"position": [
250,
300
]
},
{
"id": "2",
"name": "Query CBP/FMC Incidents",
"type": "n8n-nodes-base.postgres",
"parameters": {
"operation": "executeQuery",
"query": "SELECT COUNT(*) as total_incidents, COUNT(CASE WHEN cbp_urgency = 'DO_NOT_LOAD_RISK' THEN 1 END) as dnl_risk, COUNT(CASE WHEN fmc_flags != '[]' THEN 1 END) as fmc_violations FROM cbp_fmc_compliance_log WHERE logged_at > NOW() - INTERVAL '7 days'"
},
"position": [
450,
200
]
},
{
"id": "3",
"name": "Query FMCSA Violations",
"type": "n8n-nodes-base.postgres",
"parameters": {
"operation": "executeQuery",
"query": "SELECT COALESCE(SUM(violation_count),0) as total_hos_violations, COUNT(*) as checks_run FROM fmcsa_hos_violations WHERE logged_at > NOW() - INTERVAL '7 days'"
},
"position": [
450,
400
]
},
{
"id": "4",
"name": "Merge KPI Data",
"type": "n8n-nodes-base.merge",
"parameters": {
"mode": "combine",
"combinationMode": "mergeByPosition"
},
"position": [
650,
300
]
},
{
"id": "5",
"name": "Build KPI Dashboard",
"type": "n8n-nodes-base.code",
"parameters": {
"jsCode": "\nconst cbp = $input.first().json;\nconst fmcsa = $input.last().json;\n\nconst dnlRisk = parseInt(cbp.dnl_risk) || 0;\nconst fmcViolations = parseInt(cbp.fmc_violations) || 0;\nconst hosViolations = parseInt(fmcsa.total_hos_violations) || 0;\n\nlet rag = 'GREEN';\nlet ragReason = 'All logistics compliance metrics within normal range';\nif (dnlRisk > 0 || hosViolations > 3) {\n rag = 'RED';\n ragReason = dnlRisk > 0 ? `${dnlRisk} Do Not Load risk shipments this week` : `${hosViolations} FMCSA HOS violations \u2014 CSA score impact`;\n} else if (fmcViolations > 0 || hosViolations > 0) {\n rag = 'AMBER';\n ragReason = `${fmcViolations} FMC detention disputes + ${hosViolations} HOS warnings \u2014 monitor`;\n}\n\nconst ragColor = {RED: '#cc0000', AMBER: '#ff8800', GREEN: '#006600'};\nconst html = \\`<h2>LogisticsTech SaaS Weekly Compliance KPI</h2>\n<p><strong>Status: <span style=\"color:\\${ragColor[rag]}\">\\${rag}</span></strong> \u2014 \\${ragReason}</p>\n<table border=\"1\" cellpadding=\"8\">\n<tr><th>Metric</th><th>This Week</th><th>Regulation</th><th>Risk</th></tr>\n<tr><td>CBP Do Not Load Risk Shipments</td><td>\\${dnlRisk}</td><td>CBP Trade Act 2002 \u2014 24h advance manifest</td><td>\\${dnlRisk > 0 ? '\u26d4 $5K/shipment' : '\u2705'}</td></tr>\n<tr><td>FMC Prohibited Detention/Demurrage</td><td>\\${fmcViolations}</td><td>FMC Ocean Shipping Reform Act 2022</td><td>\\${fmcViolations > 0 ? '\u26a0\ufe0f Dispute required' : '\u2705'}</td></tr>\n<tr><td>FMCSA ELD HOS Violations</td><td>\\${hosViolations}</td><td>49 CFR Part 395 \u2014 Hours of Service</td><td>\\${hosViolations > 0 ? '\ud83d\udea8 OOS risk + CSA score' : '\u2705'}</td></tr>\n<tr><td>ELD Checks Run</td><td>\\${fmcsa.checks_run}</td><td>FMCSA ELD Mandate</td><td>\u2705</td></tr>\n</table>\n<p><em>Self-hosting note: FMCSA ELD data contains driver location + driving behavior \u2014 49 CFR \u00a7395.8 requires records available to authorized safety officials on demand. Zapier/Make = third-party server in ELD data chain = driver privacy exposure + FMCSA audit scope expansion.</em></p>\\`;\n\nreturn [{json: {html, rag, dnl_risk: dnlRisk, fmc_violations: fmcViolations, hos_violations: hosViolations}}];\n"
},
"position": [
850,
300
]
},
{
"id": "6",
"name": "Email VP Operations + COO",
"type": "n8n-nodes-base.gmail",
"parameters": {
"to": "vp-ops@company.com",
"subject": "Weekly LogisticsTech Compliance KPI \u2014 {{ $json.rag }} | W/E {{ new Date().toISOString().split('T')[0] }}",
"message": "={{ $json.html }}",
"options": {
"html": true
}
},
"position": [
1050,
300
]
}
],
"connections": {
"Monday 8AM": {
"main": [
[
{
"node": "Query CBP/FMC Incidents",
"type": "main",
"index": 0
},
{
"node": "Query FMCSA Violations",
"type": "main",
"index": 0
}
]
]
},
"Query CBP/FMC Incidents": {
"main": [
[
{
"node": "Merge KPI Data",
"type": "main",
"index": 0
}
]
]
},
"Query FMCSA Violations": {
"main": [
[
{
"node": "Merge KPI Data",
"type": "main",
"index": 1
}
]
]
},
"Merge KPI Data": {
"main": [
[
{
"node": "Build KPI Dashboard",
"type": "main",
"index": 0
}
]
]
},
"Build KPI Dashboard": {
"main": [
[
{
"node": "Email VP Operations + COO",
"type": "main",
"index": 0
}
]
]
}
}
}
Tier reference
| Tier | Primary regulations |
|---|---|
| 3PL_SAAS | CBP + FMC + C-TPAT + FMCSA ELD + FSMA carrier |
| FREIGHT_BROKER_SAAS | CBP + FMC OSRA 2022 + FMCSA broker authority + C-TPAT |
| TMS_SAAS | CBP + FMCSA ELD + FMC + FSMA + CSDDD Scope 3 |
| COLD_CHAIN_SAAS | FSMA PCQI + FDA Sanitary Transport + FMCSA + FSMA Temp Logging |
| CUSTOMS_BROKER_SAAS | CBP + 5106 entry + C-TPAT + OFAC screening + ACE filing |
| LAST_MILE_DELIVERY_SAAS | FMCSA ELD + DOT safety + CCPA driver data + HOS |
| LOGISTICS_STARTUP | CBP + FMCSA ELD + FSMA + FMC |
Implementation notes
These workflows require: Google Sheets for deadline tracking, Postgres for audit logging (CBP, FMCSA, supplier data), Slack for operational alerts, Gmail for compliance notifications, and webhook endpoints for ELD and shipment systems. All JSON above is production-ready — configure credentials, set Sheets IDs, and deploy.
Store: All workflows available individually and as a bundle at stripeai.gumroad.com — each includes deployment instructions and configuration guides.
Tags: CBP advance manifest, FMCSA ELD compliance, FDA FSMA automation, EU CSDDD supply chain, n8n logistics, supply chain SaaS compliance
Top comments (0)