DEV Community

Alex Kane
Alex Kane

Posted on

n8n for LogiTech/Supply Chain SaaS Vendors: 5 Automations for CBP CTPAT, FDA FSMA, DOT HazMat 49 CFR Part 172, and USMCA Compliance

n8n for LogiTech/Supply Chain SaaS Vendors: 5 Automations for CBP C-TPAT, FDA FSMA, DOT HazMat 49 CFR Part 172, and USMCA Compliance

If you build software for freight brokers, 3PLs, customs brokers, or last-mile carriers — your platform handles data that is subject to CBP C-TPAT Minimum Security Criteria, FDA FSMA Prior Notice requirements, DOT HazMat 49 CFR Part 172, and USMCA Rules of Origin certification rules. The compliance clocks in this industry are unforgiving: an FDA Prior Notice submitted outside the 2-8h window triggers automatic detention. A DOT HazMat employee with an expired §172.704 training certification exposes your customer to $84,425 per violation.

This article gives you 5 import-ready n8n workflow templates built for the 7 major LogiTech SaaS buyer segments, with the specific regulatory hooks your compliance team and enterprise sales team can reference.

All workflows are free to download. If you want pre-built, tested versions, the FlowKit store has production-ready automation templates.


Who This Covers: 7 LogiTech SaaS Customer Tiers

Tier Who They Are Primary Compliance Driver
LARGE_3PL_SAAS_VENDOR Enterprise 3PL platform (500K+ shipments/yr) C-TPAT + SOC2 + GDPR cross-border
FREIGHT_BROKERAGE_SAAS Digital freight brokerage platforms FMCSA carrier validation + CTPAT
CUSTOMS_CLEARANCE_SAAS CBP AES/ACE customs entry software CBP 19 CFR §163 + FSMA + USMCA
LAST_MILE_DELIVERY_SAAS Final-mile routing and POD platforms CCPA/GDPR delivery address data
WAREHOUSE_MANAGEMENT_SAAS WMS and fulfillment automation OSHA + FDA FSMA (food warehouses)
COLD_CHAIN_LOGISTICS_SAAS Temperature monitoring and cold chain SaaS FDA 21 CFR Part 117 + FSMA
LOGITECH_STARTUP Early-stage logistics software SOC2 readiness + basic carrier APIs

Workflow 1: Customer Onboarding Drip (7-Tier Segmentation + Compliance Flag Injection)

The problem: A cold-chain WMS customer and a freight brokerage startup need completely different Day 0 messaging. Manual onboarding at scale means every enterprise customer gets the same generic email while your CSM manually figures out which compliance modules apply.

What this workflow does: Triggers on a new row in Google Sheets (your CRM or Salesforce → Sheets sync), detects the customer tier and active compliance flags (C-TPAT membership, FSMA prior notice requirements, HazMat carrier status, USMCA exporter status), then fires a 3-touch drip sequence with tier-specific integration checklists and compliance module callouts.

{
  "name": "LogiTech SaaS Customer Onboarding Drip (7-Tier)",
  "nodes": [
    {
      "id": "1",
      "name": "SheetsTrigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "parameters": {
        "sheetId": "YOUR_SHEET_ID",
        "triggerOn": "rowAdded"
      },
      "position": [
        0,
        0
      ]
    },
    {
      "id": "2",
      "name": "Code - Tier & Flag Detect",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "\nconst r = $input.first().json;\nconst tier = (() => {\n  const arr = parseInt(r.annual_shipments || 0);\n  const size = (r.company_size || '').toLowerCase();\n  if (arr > 500000) return 'LARGE_3PL_SAAS_VENDOR';\n  if (r.entity_type === 'freight_broker') return 'FREIGHT_BROKERAGE_SAAS';\n  if (r.entity_type === 'customs_broker') return 'CUSTOMS_CLEARANCE_SAAS';\n  if (r.entity_type === 'last_mile') return 'LAST_MILE_DELIVERY_SAAS';\n  if (r.entity_type === 'wms') return 'WAREHOUSE_MANAGEMENT_SAAS';\n  if (r.entity_type === 'cold_chain') return 'COLD_CHAIN_LOGISTICS_SAAS';\n  return 'LOGITECH_STARTUP';\n})();\nconst flags = [];\nif (r.ctpat_member === 'true') flags.push('CBP_CTPAT_MEMBER');\nif (r.imports_food === 'true') flags.push('FDA_FSMA_PRIOR_NOTICE_REQUIRED');\nif (r.hazmat_carrier === 'true') flags.push('DOT_HAZMAT_CARRIER');\nif (r.usmca_exporter === 'true') flags.push('USMCA_CERTIFIED_EXPORTER');\nif (r.ftc_safeguards === 'true') flags.push('FTC_SAFEGUARDS_RULE_APPLICABLE');\nif (r.soc2_required === 'true') flags.push('SOC2_TYPE2_REQUIRED');\nreturn [{ json: { ...r, tier, flags: flags.join(','), flagsArr: flags } }];\n"
      },
      "position": [
        200,
        0
      ]
    },
    {
      "id": "3",
      "name": "Gmail - Day 0 Welcome",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "operation": "send",
        "to": "={{$json.email}}",
        "subject": "Welcome to {{$json.platform_name}} \u2014 Your Supply Chain Automation Platform",
        "message": "Hi {{$json.contact_name}},\n\nWelcome aboard as a {{$json.tier}} customer. Your account is live.\n\n{{$json.flagsArr.includes('CBP_CTPAT_MEMBER') ? 'As a C-TPAT member, we have pre-configured your customs data isolation settings to meet CBP Minimum Security Criteria.' : ''}}\n{{$json.flagsArr.includes('DOT_HAZMAT_CARRIER') ? 'Your HazMat module is activated. 49 CFR Part 172 shipping paper templates are ready.' : ''}}\n{{$json.flagsArr.includes('FDA_FSMA_PRIOR_NOTICE_REQUIRED') ? 'FSMA Prior Notice integration is staged for your import workflows \u2014 see Setup Guide Section 3.' : ''}}\n\nYour dedicated implementation guide: {{$json.onboarding_url}}\n\nAlex Kane | FlowKit"
      },
      "position": [
        400,
        0
      ]
    },
    {
      "id": "4",
      "name": "Sheets - Log Onboarding",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "append",
        "sheetId": "YOUR_LOG_SHEET",
        "columns": {
          "day0_sent": "true",
          "day0_ts": "={{$now.toISO()}}"
        }
      },
      "position": [
        600,
        0
      ]
    },
    {
      "id": "5",
      "name": "Wait 3d",
      "type": "n8n-nodes-base.wait",
      "parameters": {
        "unit": "days",
        "amount": 3
      },
      "position": [
        800,
        0
      ]
    },
    {
      "id": "6",
      "name": "Gmail - Day 4 Integration Guide",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "operation": "send",
        "to": "={{$json.email}}",
        "subject": "Your {{$json.tier}} integration checklist \u2014 Day 4",
        "message": "Hi {{$json.contact_name}},\n\nDay 4 check-in. Here are the integrations most {{$json.tier}} customers connect first:\n\n{{$json.tier === 'CUSTOMS_CLEARANCE_SAAS' ? '1. CBP ACE portal webhook (AES filing confirmations)\\n2. HTS code lookup API (USMCA origin verification)\\n3. FDA Prior Notice API (FSMA 21 CFR \u00a71.281 2-8h window)' : ''}}\n{{$json.tier === 'FREIGHT_BROKERAGE_SAAS' ? '1. Carrier API (FMCSA SaferSys status check)\\n2. Load board webhooks (rate confirmation sync)\\n3. ELD provider API (HOS compliance alerts)' : ''}}\n{{$json.tier === 'LAST_MILE_DELIVERY_SAAS' ? '1. Route optimization API webhook\\n2. Proof of delivery webhook (dedup + customer notify)\\n3. Exception handler (damage / access failure)' : ''}}\n\nFull integration library: {{$json.docs_url}}"
      },
      "position": [
        1000,
        0
      ]
    },
    {
      "id": "7",
      "name": "Wait 4d",
      "type": "n8n-nodes-base.wait",
      "parameters": {
        "unit": "days",
        "amount": 4
      },
      "position": [
        1200,
        0
      ]
    },
    {
      "id": "8",
      "name": "Gmail - Day 8 Compliance Tips",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "operation": "send",
        "to": "={{$json.email}}",
        "subject": "Advanced compliance automation for {{$json.tier}} \u2014 Day 8",
        "message": "Hi {{$json.contact_name}},\n\nYour week-1 compliance automation quick wins:\n\n{{$json.flagsArr.includes('DOT_HAZMAT_CARRIER') ? 'HazMat \u00a7172.604: Set up the immediate-notification pipeline (fire/explosion/spill events must notify PHMSA within 30 minutes). Template in your dashboard > Compliance > HazMat.' : ''}}\n{{$json.flagsArr.includes('CBP_CTPAT_MEMBER') ? 'C-TPAT Minimum Security Criteria: Configure the quarterly audit tracker. CBP validates C-TPAT records annually \u2014 automation flags renewal 120 days early.' : ''}}\n{{$json.flagsArr.includes('USMCA_CERTIFIED_EXPORTER') ? 'USMCA Art. 32.10: Origin certifications valid 4 years. The expiry monitor workflow sends cascading alerts at 120/90/60/30/14 days.' : ''}}\n\nBook a power-user session: {{$json.calendly_url}}"
      },
      "position": [
        1400,
        0
      ]
    }
  ],
  "connections": {
    "SheetsTrigger": {
      "main": [
        [
          {
            "node": "Code - Tier & Flag Detect",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Tier & Flag Detect": {
      "main": [
        [
          {
            "node": "Gmail - Day 0 Welcome",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Day 0 Welcome": {
      "main": [
        [
          {
            "node": "Sheets - Log Onboarding",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets - Log Onboarding": {
      "main": [
        [
          {
            "node": "Wait 3d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 3d": {
      "main": [
        [
          {
            "node": "Gmail - Day 4 Integration Guide",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Day 4 Integration Guide": {
      "main": [
        [
          {
            "node": "Wait 4d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 4d": {
      "main": [
        [
          {
            "node": "Gmail - Day 8 Compliance Tips",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Compliance flags injected into Day 0 email:

  • CBP_CTPAT_MEMBER → activates customs data isolation messaging + MSC configuration callout
  • DOT_HAZMAT_CARRIER → activates §172.704 training tracker + §172.604 incident pipeline setup steps
  • FDA_FSMA_PRIOR_NOTICE_REQUIRED → activates FSMA integration setup instructions
  • USMCA_CERTIFIED_EXPORTER → activates Art. 32.10 expiry monitor configuration

Workflow 2: CBP C-TPAT Minimum Security Criteria Audit & Renewal Monitor

The problem: C-TPAT membership lapses silently. CBP doesn't send a renewal reminder — your customer loses Priority Processing benefits, Reduced Exam rates, and Front of Line inspection priority without warning. Enterprise 3PL customers feel this immediately as port dwell time spikes.

The regulatory hook: CBP C-TPAT Minimum Security Criteria requires annual validation. Records retention under 19 CFR Part 163 is 5 years. A lapsed C-TPAT record can trigger Enhanced Targeting — your platform gets associated with the resulting port delays.

What this workflow does: Reads your C-TPAT customer records from Google Sheets daily at 7 AM. Classifies each by urgency (EXPIRED / CRITICAL ≤14d / URGENT ≤45d / WARNING ≤90d / NOTICE ≤120d) with deduplication (skips if already alerted today for the same urgency level). Fires to Slack #customs-compliance and Gmail customs team with CBP portal link and specific MSC action items.

{
  "name": "CBP C-TPAT Minimum Security Criteria Audit & Renewal Monitor",
  "nodes": [
    {
      "id": "1",
      "name": "Schedule - Daily 7AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 7 * * *"
            }
          ]
        }
      },
      "position": [
        0,
        0
      ]
    },
    {
      "id": "2",
      "name": "Sheets - Read C-TPAT Records",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "readRows",
        "sheetId": "YOUR_CTPAT_SHEET",
        "filters": {
          "conditions": [
            {
              "leftValue": "={{$json.status}}",
              "condition": "notEqual",
              "rightValue": "INACTIVE"
            }
          ]
        }
      },
      "position": [
        200,
        0
      ]
    },
    {
      "id": "3",
      "name": "Code - Classify Urgency",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "\nconst rows = $input.all();\nconst now = new Date();\nconst results = [];\nfor (const item of rows) {\n  const r = item.json;\n  const expiry = new Date(r.ctpat_validation_expiry);\n  const daysLeft = Math.floor((expiry - now) / 86400000);\n  let urgency = null;\n  if (daysLeft < 0) urgency = 'EXPIRED';\n  else if (daysLeft <= 14) urgency = 'CRITICAL';\n  else if (daysLeft <= 45) urgency = 'URGENT';\n  else if (daysLeft <= 90) urgency = 'WARNING';\n  else if (daysLeft <= 120) urgency = 'NOTICE';\n  if (!urgency) continue;\n  // Deduplicate: skip if already alerted today for same urgency\n  if (r.last_alert_urgency === urgency && r.last_alert_date === now.toISOString().slice(0,10)) continue;\n  results.push({ json: { ...r, urgency, daysLeft,\n    ctpat_type: r.ctpat_tier || 'TIER_2',\n    cbp_requirement: urgency === 'EXPIRED' ? 'Immediate suspension risk \u2014 19 CFR Part 163 annual validation overdue' :\n      urgency === 'CRITICAL' ? 'C-TPAT Minimum Security Criteria revalidation due within 14 days \u2014 CBP Customs-Trade Partnership' :\n      urgency === 'URGENT' ? '45-day renewal window \u2014 schedule third-party C-TPAT compliance review' :\n      urgency === 'WARNING' ? '90-day window \u2014 gather MSC evidence package (physical security, personnel, IT, business partners)' :\n      '120-day advance notice \u2014 initiate CBP C-TPAT portal revalidation submission'\n  }});\n}\nreturn results;\n"
      },
      "position": [
        400,
        0
      ]
    },
    {
      "id": "4",
      "name": "IF - Any Alerts?",
      "type": "n8n-nodes-base.if",
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.urgency}}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "position": [
        600,
        0
      ]
    },
    {
      "id": "5",
      "name": "Slack - #customs-compliance",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#customs-compliance",
        "text": "*C-TPAT Alert \u2014 {{$json.urgency}}*\nCustomer: {{$json.company_name}} ({{$json.ctpat_tier}})\nValidation expiry: {{$json.ctpat_validation_expiry}} ({{$json.daysLeft}} days)\nAction: {{$json.cbp_requirement}}\nCBP Ref: 19 CFR Part 163 \u2014 C-TPAT Minimum Security Criteria"
      },
      "position": [
        800,
        100
      ]
    },
    {
      "id": "6",
      "name": "Gmail - Customs Team Alert",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "operation": "send",
        "to": "customs-compliance@yourcompany.com",
        "subject": "[C-TPAT {{$json.urgency}}] {{$json.company_name}} \u2014 validation expires {{$json.ctpat_validation_expiry}}",
        "message": "C-TPAT Validation Status: {{$json.urgency}}\n\nCustomer: {{$json.company_name}}\nC-TPAT Tier: {{$json.ctpat_tier}}\nValidation Expiry: {{$json.ctpat_validation_expiry}} ({{$json.daysLeft}} days remaining)\nCBP Partner ID: {{$json.cbp_partner_id}}\n\nRequired Action: {{$json.cbp_requirement}}\n\nRegulatory basis: 19 CFR Part 163 / CBP C-TPAT Minimum Security Criteria (MSC)\nC-TPAT portal: ctpat.cbp.dhs.gov\n\nNote: C-TPAT suspension results in loss of reduced exam rate, Priority Processing, and Front of Line inspection benefits. EXPIRED status may trigger CBP Enhanced Targeting."
      },
      "position": [
        800,
        -100
      ]
    },
    {
      "id": "7",
      "name": "Sheets - Update Alert Date",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "update",
        "sheetId": "YOUR_CTPAT_SHEET",
        "columns": {
          "last_alert_urgency": "={{$json.urgency}}",
          "last_alert_date": "={{$now.toISO().slice(0,10)}}"
        }
      },
      "position": [
        1000,
        0
      ]
    }
  ],
  "connections": {
    "Schedule - Daily 7AM": {
      "main": [
        [
          {
            "node": "Sheets - Read C-TPAT Records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets - Read C-TPAT Records": {
      "main": [
        [
          {
            "node": "Code - Classify Urgency",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Classify Urgency": {
      "main": [
        [
          {
            "node": "IF - Any Alerts?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Any Alerts?": {
      "main": [
        [
          {
            "node": "Slack - #customs-compliance",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Slack - #customs-compliance": {
      "main": [
        [
          {
            "node": "Gmail - Customs Team Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Customs Team Alert": {
      "main": [
        [
          {
            "node": "Sheets - Update Alert Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Why this matters for enterprise sales: Fortune 500 3PL buyers ask in RFPs: "Does your platform proactively monitor C-TPAT renewal status?" This workflow is the answer. It turns a passive data field into an active compliance alert system.


Workflow 3: FDA FSMA Prior Notice & Import Alert Incident Pipeline

The problem: FDA FSMA 21 CFR §1.281 requires Prior Notice submission 2-8 hours before arrival (2h for air/land, 8h for sea). If your customs clearance SaaS processes the import record and the Prior Notice window is violated — FDA can refuse entry to the entire shipment under 21 CFR §1.285. If an FDA Import Alert is active against the shipper, all shipments face Detention Without Physical Examination (DWPE).

The regulatory clock: Prior Notice violation → immediate FDA detention. Import Alert (DWPE) → indefinite hold until FDA petition approved. Both clocks start the moment the import record is processed — not when your compliance team reviews the queue Monday morning.

What this workflow does: Webhook receives import record events from your platform (prior_notice_submitted, import_status_update, fda_detention, fda_import_alert). Code node calculates hours-to-arrival against the 2h/8h minimum window by transport mode. Routes CRITICAL and HIGH severity events to Slack #food-safety-critical and Gmail VP Compliance. Logs all FSMA incidents to Google Sheets with full regulatory citation.

{
  "name": "FDA FSMA Prior Notice & Import Alert Incident Pipeline",
  "nodes": [
    {
      "id": "1",
      "name": "Webhook - Import Record Event",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "httpMethod": "POST",
        "path": "fsma-import-event",
        "responseMode": "lastNode"
      },
      "position": [
        0,
        0
      ]
    },
    {
      "id": "2",
      "name": "Code - FSMA Classify",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "\nconst r = $input.first().json;\nconst eventType = r.event_type; // prior_notice_submitted | import_status_update | fda_detention | fda_import_alert\nconst arrivalTime = new Date(r.estimated_arrival);\nconst now = new Date();\nconst hoursToArrival = (arrivalTime - now) / 3600000;\n\nlet severity = 'INFO';\nlet action = '';\nlet regulation = '';\nlet clock = '';\n\nif (eventType === 'prior_notice_submitted') {\n  // 21 CFR \u00a71.281: must submit 2h (air/land) to 8h (sea) before arrival\n  const modeMinHours = r.transport_mode === 'sea' ? 8 : 2;\n  if (hoursToArrival < modeMinHours) {\n    severity = 'CRITICAL';\n    action = `Prior Notice submitted ${hoursToArrival.toFixed(1)}h before arrival \u2014 BELOW ${modeMinHours}h minimum for ${r.transport_mode}. FDA may refuse entry under 21 CFR \u00a71.285.`;\n    regulation = '21 CFR \u00a71.281 \u2014 FSMA Prior Notice Minimum Submission Window';\n    clock = `Arrival: ${r.estimated_arrival} \u2014 ${hoursToArrival.toFixed(1)}h from now`;\n  } else {\n    severity = 'OK';\n    action = 'Prior Notice submitted within required window.';\n  }\n} else if (eventType === 'fda_detention') {\n  severity = 'CRITICAL';\n  action = 'FDA DETENTION issued. Notify importer of record immediately. Goods cannot be delivered \u2014 21 CFR \u00a71.293.';\n  regulation = '21 CFR \u00a71.293 \u2014 FDA Detention of Imported Articles';\n  clock = 'FDA has 60 days to examine detained shipment';\n} else if (eventType === 'fda_import_alert') {\n  severity = 'CRITICAL';\n  action = `FDA Import Alert ${r.import_alert_number} active. ALL shipments from this shipper/product subject to Detention Without Physical Examination (DWPE).`;\n  regulation = `FDA Import Alert ${r.import_alert_number} \u2014 DWPE`;\n  clock = 'DWPE active until FDA removes from import alert list (petition required)';\n} else if (eventType === 'import_status_update') {\n  severity = r.status === 'REFUSED_ENTRY' ? 'HIGH' : 'MEDIUM';\n  action = `Import status: ${r.status}. Product: ${r.product_description}, HTS: ${r.hts_code}.`;\n  regulation = '21 USC \u00a7381 \u2014 Importation of Adulterated/Misbranded Food';\n}\n\nreturn [{ json: { ...r, severity, action, regulation, clock, hoursToArrival: hoursToArrival.toFixed(1) } }];\n"
      },
      "position": [
        200,
        0
      ]
    },
    {
      "id": "3",
      "name": "Switch - Severity",
      "type": "n8n-nodes-base.switch",
      "parameters": {
        "dataType": "string",
        "value1": "={{$json.severity}}",
        "rules": {
          "rules": [
            {
              "value2": "CRITICAL",
              "output": 0
            },
            {
              "value2": "HIGH",
              "output": 1
            },
            {
              "value2": "MEDIUM",
              "output": 2
            }
          ]
        }
      },
      "position": [
        400,
        0
      ]
    },
    {
      "id": "4",
      "name": "Slack - #food-safety-critical",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#food-safety-critical",
        "text": "*\ud83d\udea8 FDA FSMA CRITICAL \u2014 {{$json.event_type}}*\nShipper: {{$json.shipper_name}}\nProduct: {{$json.product_description}} (HTS {{$json.hts_code}})\nAction Required: {{$json.action}}\nRegulation: {{$json.regulation}}\n{{$json.clock ? 'Clock: ' + $json.clock : ''}}\nEntry #: {{$json.entry_number}}"
      },
      "position": [
        600,
        -200
      ]
    },
    {
      "id": "5",
      "name": "Gmail - VP Compliance",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "operation": "send",
        "to": "vp-compliance@yourcompany.com",
        "cc": "food-safety@yourcompany.com",
        "subject": "[FDA CRITICAL] {{$json.event_type}} \u2014 {{$json.shipper_name}} \u2014 Entry {{$json.entry_number}}",
        "message": "SEVERITY: {{$json.severity}}\n\nEvent: {{$json.event_type}}\nShipper: {{$json.shipper_name}}\nProduct: {{$json.product_description}}\nHTS Code: {{$json.hts_code}}\nPort of Entry: {{$json.port_of_entry}}\nEntry Number: {{$json.entry_number}}\nEstimated Arrival: {{$json.estimated_arrival}}\nHours to Arrival: {{$json.hoursToArrival}}h\n\nRequired Action: {{$json.action}}\nRegulatory Basis: {{$json.regulation}}\n{{$json.clock ? 'Compliance Clock: ' + $json.clock : ''}}\n\nFDA Prior Notice System Interface: https://www.access.fda.gov/\nFDA Import Alerts: https://www.accessdata.fda.gov/cms_ia/"
      },
      "position": [
        600,
        -100
      ]
    },
    {
      "id": "6",
      "name": "Sheets - Log FSMA Incident",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "append",
        "sheetId": "YOUR_FSMA_LOG_SHEET",
        "columns": {
          "ts": "={{$now.toISO()}}",
          "event_type": "={{$json.event_type}}",
          "severity": "={{$json.severity}}",
          "entry_number": "={{$json.entry_number}}",
          "shipper": "={{$json.shipper_name}}",
          "action": "={{$json.action}}",
          "regulation": "={{$json.regulation}}"
        }
      },
      "position": [
        800,
        0
      ]
    },
    {
      "id": "7",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "parameters": {
        "respondWith": "json",
        "responseBody": "={\"received\": true, \"severity\": \"{{$json.severity}}\"}"
      },
      "position": [
        1000,
        0
      ]
    }
  ],
  "connections": {
    "Webhook - Import Record Event": {
      "main": [
        [
          {
            "node": "Code - FSMA Classify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - FSMA Classify": {
      "main": [
        [
          {
            "node": "Switch - Severity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch - Severity": {
      "main": [
        [
          {
            "node": "Slack - #food-safety-critical",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Gmail - VP Compliance",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Sheets - Log FSMA Incident",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack - #food-safety-critical": {
      "main": [
        [
          {
            "node": "Gmail - VP Compliance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - VP Compliance": {
      "main": [
        [
          {
            "node": "Sheets - Log FSMA Incident",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets - Log FSMA Incident": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Self-hosting note: FDA Prior Notice data, HTS codes, shipper names, and import alert cross-references are CBP/FDA confidential commercial information. Routing this data through Zapier or Make puts it on US cloud infrastructure subject to third-party subprocessor audit — a finding in enterprise food safety due diligence reviews.


Workflow 4: DOT HazMat 49 CFR Part 172 Training Deadline Tracker

The problem: 49 CFR §172.704 requires HazMat employee training every 3 years. An employee with an expired certification cannot legally perform HazMat functions — penalty: up to $84,425 per violation (49 USC §5123). Your WMS or 3PL SaaS customers have dozens of HazMat-certified employees. Nobody tracks expiry dates systematically.

The regulatory chain: §172.704(a) covers general awareness, function-specific, safety, and security awareness training. §172.704(c)(1) sets the 3-year recurrent training cycle. Initial training must be completed within 90 days of hire. Your platform becomes the system of record for employee HazMat certification status — making this tracker a high-value compliance module.

What this workflow does: Reads HazMat employee training records from Google Sheets daily at 8 AM. Classifies urgency (EXPIRED / CRITICAL ≤7d / URGENT ≤30d / WARNING ≤60d / NOTICE ≤90d). Includes penalty exposure in EXPIRED alerts ($84,425/violation). Deduplicates by employee + date to prevent alert fatigue. Routes to Slack #dot-compliance and Gmail DOT compliance officer.

{
  "name": "DOT HazMat 49 CFR Part 172 Incident Report & Training Deadline Tracker",
  "nodes": [
    {
      "id": "1",
      "name": "Schedule - Daily 8AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 8 * * *"
            }
          ]
        }
      },
      "position": [
        0,
        0
      ]
    },
    {
      "id": "2",
      "name": "Sheets - Read HazMat Training Records",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "readRows",
        "sheetId": "YOUR_HAZMAT_SHEET"
      },
      "position": [
        200,
        0
      ]
    },
    {
      "id": "3",
      "name": "Code - Training Expiry Classify",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "\nconst rows = $input.all();\nconst now = new Date();\nconst results = [];\nfor (const item of rows) {\n  const r = item.json;\n  // 49 CFR \u00a7172.704: HazMat employee training must be completed within 90 days of hire\n  // and recurrent training every 3 years\n  const trainingExpiry = new Date(r.training_expiry_date);\n  const daysLeft = Math.floor((trainingExpiry - now) / 86400000);\n  let urgency = null;\n  if (daysLeft < 0) urgency = 'EXPIRED';\n  else if (daysLeft <= 7) urgency = 'CRITICAL';\n  else if (daysLeft <= 30) urgency = 'URGENT';\n  else if (daysLeft <= 60) urgency = 'WARNING';\n  else if (daysLeft <= 90) urgency = 'NOTICE';\n  if (!urgency) continue;\n  // Skip if already alerted today\n  if (r.last_training_alert_date === now.toISOString().slice(0,10)) continue;\n  const hazmat_classes = r.hazmat_classes_handled || 'Class 3 Flammable Liquids';\n  results.push({ json: { ...r, urgency, daysLeft, hazmat_classes,\n    dot_requirement: urgency === 'EXPIRED' ? `49 CFR \u00a7172.704 training EXPIRED \u2014 employee may not perform HazMat functions. Penalty: up to $84,425/violation per 49 USC \u00a75123` :\n      urgency === 'CRITICAL' ? `HazMat training expires in ${daysLeft} days \u2014 schedule recurrent training immediately (49 CFR \u00a7172.704(c))` :\n      urgency === 'URGENT' ? `30-day window \u2014 register employee in DOT HazMat recurrent training (49 CFR \u00a7172.704(c)(1))` :\n      urgency === 'WARNING' ? `60-day notice \u2014 identify approved trainer / PHMSA-compliant course for ${hazmat_classes}` :\n      `90-day advance notice \u2014 plan HazMat recurrent training renewal (\u00a7172.704 3-year cycle)`\n  }});\n}\nreturn results;\n"
      },
      "position": [
        400,
        0
      ]
    },
    {
      "id": "4",
      "name": "IF - Any Alerts?",
      "type": "n8n-nodes-base.if",
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.urgency}}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "position": [
        600,
        0
      ]
    },
    {
      "id": "5",
      "name": "Slack - #dot-compliance",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#dot-compliance",
        "text": "*DOT HazMat Training Alert \u2014 {{$json.urgency}}*\nEmployee: {{$json.employee_name}} ({{$json.employee_id}})\nHazMat Classes: {{$json.hazmat_classes}}\nTraining Expiry: {{$json.training_expiry_date}} ({{$json.daysLeft}} days)\nAction: {{$json.dot_requirement}}\nRef: 49 CFR \u00a7172.704 \u2014 HazMat Employee Training"
      },
      "position": [
        800,
        100
      ]
    },
    {
      "id": "6",
      "name": "Gmail - DOT Compliance Officer",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "operation": "send",
        "to": "dot-compliance@yourcompany.com",
        "subject": "[DOT \u00a7172.704 {{$json.urgency}}] {{$json.employee_name}} \u2014 training expires {{$json.training_expiry_date}}",
        "message": "HazMat Training Status: {{$json.urgency}}\n\nEmployee: {{$json.employee_name}}\nEmployee ID: {{$json.employee_id}}\nDepartment: {{$json.department}}\nHazMat Classes Handled: {{$json.hazmat_classes}}\nCurrent Training Expiry: {{$json.training_expiry_date}} ({{$json.daysLeft}} days)\n\nRequired Action: {{$json.dot_requirement}}\n\nRegulatory Basis: 49 CFR \u00a7172.704 \u2014 Hazardous Materials Employee Training Requirements\nRecurrent training required every 3 years per \u00a7172.704(c)(1)\nTraining must cover: general awareness, function-specific, safety, and security awareness (\u00a7172.704(a)(1)-(4))\n\nDOT PHMSA Training Resources: https://www.phmsa.dot.gov/training\nPenalty for employing untrained HazMat employee: up to $84,425/violation (49 USC \u00a75123)"
      },
      "position": [
        800,
        -100
      ]
    },
    {
      "id": "7",
      "name": "Sheets - Mark Alert Sent",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "update",
        "sheetId": "YOUR_HAZMAT_SHEET",
        "columns": {
          "last_training_alert_date": "={{$now.toISO().slice(0,10)}}",
          "last_training_alert_urgency": "={{$json.urgency}}"
        }
      },
      "position": [
        1000,
        0
      ]
    }
  ],
  "connections": {
    "Schedule - Daily 8AM": {
      "main": [
        [
          {
            "node": "Sheets - Read HazMat Training Records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets - Read HazMat Training Records": {
      "main": [
        [
          {
            "node": "Code - Training Expiry Classify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Training Expiry Classify": {
      "main": [
        [
          {
            "node": "IF - Any Alerts?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Any Alerts?": {
      "main": [
        [
          {
            "node": "Slack - #dot-compliance",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Slack - #dot-compliance": {
      "main": [
        [
          {
            "node": "Gmail - DOT Compliance Officer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - DOT Compliance Officer": {
      "main": [
        [
          {
            "node": "Sheets - Mark Alert Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Bonus: HazMat incident immediate notification: 49 CFR §172.604 requires immediate notification to PHMSA for incidents involving fire, explosion, or unintentional release during transport. Add a webhook trigger for HazMat incident events from your TMS — Code node classifies immediate-notify vs. 30-day report, routes to #emergency Slack channel and PHMSA emergency line (1-800-424-8802) reference in the email body.


Workflow 5: USMCA Rules of Origin Certification Expiry Monitor + Weekly KPI Dashboard

The problem: USMCA certifications of origin are valid for up to 4 years (Article 32.10). When a certification expires, your customs clearance customer loses tariff preference — the full MFN duty rate kicks in retroactively from the expiry date if CBP audits under 19 CFR §163.4 (5-year record retention). A $2M/year auto-parts importer can owe $200K+ in back duties for a lapsed certification nobody noticed.

The workflow: Reads USMCA certification records from Google Sheets daily at 9 AM. Classifies by urgency (EXPIRED / CRITICAL ≤30d / URGENT ≤60d / WARNING ≤90d / NOTICE ≤120d). Includes annual tariff savings at risk in every alert. Routes to Slack #trade-compliance and Gmail trade compliance team with CBP Form 434 reference and RVC threshold reminder.

Weekly KPI dashboard included in this workflow file: Monday 8AM schedule pulls platform metrics (MRR, shipments, clearance time, API calls) and open compliance counts from Sheets, generates HTML table with WoW% comparison via $getWorkflowStaticData, emails leadership BCC and posts Slack one-liner.

{
  "name": "USMCA Rules of Origin Certification Expiry Monitor + Weekly LogiTech KPI Dashboard",
  "nodes": [
    {
      "id": "1",
      "name": "Schedule - Daily 9AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * *"
            }
          ]
        }
      },
      "position": [
        0,
        0
      ]
    },
    {
      "id": "2",
      "name": "Sheets - Read USMCA Certs",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "readRows",
        "sheetId": "YOUR_USMCA_SHEET"
      },
      "position": [
        200,
        0
      ]
    },
    {
      "id": "3",
      "name": "Code - Certif Expiry Classify",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "\nconst rows = $input.all();\nconst now = new Date();\nconst results = [];\nfor (const item of rows) {\n  const r = item.json;\n  // USMCA Art. 32.10: Certification of origin valid for up to 4 years\n  // Importer must retain for 5 years (19 CFR \u00a7163.4)\n  const certExpiry = new Date(r.certification_expiry);\n  const daysLeft = Math.floor((certExpiry - now) / 86400000);\n  let urgency = null;\n  if (daysLeft < 0) urgency = 'EXPIRED';\n  else if (daysLeft <= 30) urgency = 'CRITICAL';\n  else if (daysLeft <= 60) urgency = 'URGENT';\n  else if (daysLeft <= 90) urgency = 'WARNING';\n  else if (daysLeft <= 120) urgency = 'NOTICE';\n  if (!urgency) continue;\n  if (r.last_usmca_alert_date === now.toISOString().slice(0,10)) continue;\n  const tariffPreference = parseFloat(r.annual_tariff_savings_usd || 0);\n  results.push({ json: { ...r, urgency, daysLeft, tariffPreference,\n    usmca_requirement: urgency === 'EXPIRED' ? `USMCA tariff preference LOST \u2014 duty on ${r.hts_code} now applies. Retroactive exposure if CBP audits under 19 CFR \u00a7163.4 (5-yr record retention)` :\n      urgency === 'CRITICAL' ? `30-day renewal window \u2014 contact supplier to re-issue USMCA certification of origin (Art. 32.10). $${tariffPreference.toLocaleString()}/yr tariff savings at risk.` :\n      urgency === 'URGENT' ? `60-day window \u2014 initiate supplier outreach for USMCA origin recertification (HTSUS Chapter 98 / GRI Rule 4)` :\n      urgency === 'WARNING' ? `90-day notice \u2014 review BOM for qualifying content threshold (USMCA RVC \u226575% net cost / 85% transaction value for autos; 60% others)` :\n      `120-day advance notice \u2014 schedule USMCA origin review with trade counsel`\n  }});\n}\nreturn results;\n"
      },
      "position": [
        400,
        0
      ]
    },
    {
      "id": "4",
      "name": "IF - Any Alerts?",
      "type": "n8n-nodes-base.if",
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.urgency}}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "position": [
        600,
        0
      ]
    },
    {
      "id": "5",
      "name": "Slack - #trade-compliance",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#trade-compliance",
        "text": "*USMCA Origin Cert Alert \u2014 {{$json.urgency}}*\nSupplier: {{$json.supplier_name}}\nProduct: {{$json.product_description}} (HTS {{$json.hts_code}})\nCert Expiry: {{$json.certification_expiry}} ({{$json.daysLeft}} days)\nAnnual Tariff Savings at Risk: ${{$json.annual_tariff_savings_usd}}\nAction: {{$json.usmca_requirement}}\nRef: USMCA Art. 32.10 / 19 CFR \u00a7163.4"
      },
      "position": [
        800,
        100
      ]
    },
    {
      "id": "6",
      "name": "Gmail - Trade Compliance Team",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "operation": "send",
        "to": "trade-compliance@yourcompany.com",
        "cc": "{{$json.account_manager_email}}",
        "subject": "[USMCA {{$json.urgency}}] {{$json.supplier_name}} \u2014 cert expires {{$json.certification_expiry}} \u2014 ${{$json.annual_tariff_savings_usd}} at risk",
        "message": "USMCA Certification Status: {{$json.urgency}}\n\nSupplier: {{$json.supplier_name}}\nSupplier Country: {{$json.supplier_country}} (USMCA party)\nProduct: {{$json.product_description}}\nHTS Code: {{$json.hts_code}}\nCertification Number: {{$json.cert_number}}\nCertification Expiry: {{$json.certification_expiry}} ({{$json.daysLeft}} days)\nAnnual Tariff Savings: ${{$json.annual_tariff_savings_usd}}\n\nRequired Action: {{$json.usmca_requirement}}\n\nUSMCA Reference:\n- Art. 32.10: Certification of origin valid up to 4 years from date of signing\n- 19 CFR \u00a7163.4: 5-year record retention requirement for CBP audit\n- CBP Form 434 or equivalent supplier certification required\n- RVC threshold: \u226560% Net Cost (general); \u226575% for automotive products\n\nCBP USMCA resources: https://www.cbp.gov/trade/free-trade-agreements/usmca"
      },
      "position": [
        800,
        -100
      ]
    },
    {
      "id": "7",
      "name": "Sheets - Mark Alert Sent",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "update",
        "sheetId": "YOUR_USMCA_SHEET",
        "columns": {
          "last_usmca_alert_date": "={{$now.toISO().slice(0,10)}}",
          "last_usmca_alert_urgency": "={{$json.urgency}}"
        }
      },
      "position": [
        1000,
        0
      ]
    }
  ],
  "connections": {
    "Schedule - Daily 9AM": {
      "main": [
        [
          {
            "node": "Sheets - Read USMCA Certs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets - Read USMCA Certs": {
      "main": [
        [
          {
            "node": "Code - Certif Expiry Classify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Certif Expiry Classify": {
      "main": [
        [
          {
            "node": "IF - Any Alerts?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Any Alerts?": {
      "main": [
        [
          {
            "node": "Slack - #trade-compliance",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Slack - #trade-compliance": {
      "main": [
        [
          {
            "node": "Gmail - Trade Compliance Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Trade Compliance Team": {
      "main": [
        [
          {
            "node": "Sheets - Mark Alert Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode
{
  "name": "Weekly LogiTech Platform KPI & Compliance Dashboard",
  "nodes": [
    {
      "id": "1",
      "name": "Schedule - Monday 8AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 8 * * 1"
            }
          ]
        }
      },
      "position": [
        0,
        0
      ]
    },
    {
      "id": "2",
      "name": "Sheets - Platform Metrics",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "readRows",
        "sheetId": "YOUR_METRICS_SHEET",
        "range": "weekly_metrics!A:Z"
      },
      "position": [
        200,
        0
      ]
    },
    {
      "id": "3",
      "name": "Sheets - Compliance Events",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "readRows",
        "sheetId": "YOUR_METRICS_SHEET",
        "range": "compliance_events!A:Z"
      },
      "position": [
        200,
        200
      ]
    },
    {
      "id": "4",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "parameters": {
        "mode": "mergeByIndex"
      },
      "position": [
        400,
        100
      ]
    },
    {
      "id": "5",
      "name": "Code - KPI Dashboard HTML",
      "type": "n8n-nodes-base.code",
      "parameters": {
        "jsCode": "\nconst metrics = $input.first().json;\nconst prev = $getWorkflowStaticData('global');\nconst prevMRR = parseFloat(prev.mrr || metrics.mrr_usd);\nconst currMRR = parseFloat(metrics.mrr_usd);\nconst mrrWoW = prevMRR > 0 ? ((currMRR - prevMRR) / prevMRR * 100).toFixed(1) : 'N/A';\n\n// Save for next week comparison\nprev.mrr = currMRR;\nprev.active_customers = metrics.active_customers;\n\nconst ctpatOpen = parseInt(metrics.ctpat_open_alerts || 0);\nconst fsmaOpen = parseInt(metrics.fsma_open_incidents || 0);\nconst hazmatOpen = parseInt(metrics.hazmat_training_expired || 0);\nconst usmcaOpen = parseInt(metrics.usmca_certs_expiring_30d || 0);\n\nconst html = `<h2>LogiTech Platform \u2014 Weekly KPI Report</h2>\n<p><strong>Week of ${new Date().toISOString().slice(0,10)}</strong></p>\n<table border='1' cellpadding='6' style='border-collapse:collapse'>\n<tr><th>Metric</th><th>This Week</th><th>WoW</th></tr>\n<tr><td>MRR (USD)</td><td>$${currMRR.toLocaleString()}</td><td>${mrrWoW}%</td></tr>\n<tr><td>Active Customers</td><td>${metrics.active_customers}</td><td>\u2014</td></tr>\n<tr><td>API Calls (7d)</td><td>${parseInt(metrics.api_calls_7d || 0).toLocaleString()}</td><td>\u2014</td></tr>\n<tr><td>Shipments Processed</td><td>${parseInt(metrics.shipments_processed_7d || 0).toLocaleString()}</td><td>\u2014</td></tr>\n<tr><td>Avg Clearance Time</td><td>${metrics.avg_clearance_hours || 'N/A'}h</td><td>\u2014</td></tr>\n</table>\n<h3>Compliance Summary</h3>\n<table border='1' cellpadding='6' style='border-collapse:collapse'>\n<tr><th>Regulation</th><th>Open Alerts</th><th>Status</th></tr>\n<tr><td>CBP C-TPAT (19 CFR \u00a7163)</td><td>${ctpatOpen}</td><td>${ctpatOpen > 0 ? '\u26a0\ufe0f ACTION REQUIRED' : '\u2705 Clear'}</td></tr>\n<tr><td>FDA FSMA Incidents (21 CFR \u00a71.281)</td><td>${fsmaOpen}</td><td>${fsmaOpen > 0 ? '\ud83d\udea8 CRITICAL' : '\u2705 Clear'}</td></tr>\n<tr><td>DOT HazMat Training Expired (\u00a7172.704)</td><td>${hazmatOpen}</td><td>${hazmatOpen > 0 ? '\u26a0\ufe0f ACTION REQUIRED' : '\u2705 Clear'}</td></tr>\n<tr><td>USMCA Certs Expiring 30d (Art. 32.10)</td><td>${usmcaOpen}</td><td>${usmcaOpen > 0 ? '\u26a0\ufe0f RENEWAL NEEDED' : '\u2705 Clear'}</td></tr>\n</table>`;\n\nreturn [{ json: { ...metrics, html, mrrWoW, ctpatOpen, fsmaOpen, hazmatOpen, usmcaOpen } }];\n"
      },
      "position": [
        600,
        100
      ]
    },
    {
      "id": "6",
      "name": "Gmail - Leadership BCC",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "operation": "send",
        "to": "ceo@yourcompany.com",
        "bcc": "coo@yourcompany.com, cto@yourcompany.com, vp-compliance@yourcompany.com",
        "subject": "LogiTech Weekly KPI \u2014 MRR ${{$json.mrr_usd}} ({{$json.mrrWoW}}% WoW) \u2014 {{$json.ctpatOpen + $json.fsmaOpen + $json.hazmatOpen + $json.usmcaOpen}} compliance alerts",
        "message": "={{$json.html}}"
      },
      "position": [
        800,
        0
      ]
    },
    {
      "id": "7",
      "name": "Slack - #management",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#management",
        "text": "\ud83d\udce6 LogiTech Weekly KPI: MRR ${{$json.mrr_usd}} ({{$json.mrrWoW}}% WoW) | {{$json.active_customers}} customers | {{$json.shipments_processed_7d}} shipments | Compliance: {{$json.ctpatOpen}}\u00d7CTPAT {{$json.fsmaOpen}}\u00d7FSMA {{$json.hazmatOpen}}\u00d7HazMat {{$json.usmcaOpen}}\u00d7USMCA open"
      },
      "position": [
        800,
        200
      ]
    }
  ],
  "connections": {
    "Schedule - Monday 8AM": {
      "main": [
        [
          {
            "node": "Sheets - Platform Metrics",
            "type": "main",
            "index": 0
          },
          {
            "node": "Sheets - Compliance Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets - Platform Metrics": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets - Compliance Events": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Code - KPI Dashboard HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - KPI Dashboard HTML": {
      "main": [
        [
          {
            "node": "Gmail - Leadership BCC",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Leadership BCC": {
      "main": [
        [
          {
            "node": "Slack - #management",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

The Self-Hosting Angle: Why LogiTech SaaS Buyers Reject Cloud Automation Vendors

This is the compliance conversation that keeps happening in enterprise 3PL and customs broker procurement:

Data Type Regulatory Risk of Cloud iPaaS Self-Hosted n8n Solution
CBP AES filing data CBP export compliance record = controlled commercial info n8n runs in your VPC — data never leaves your boundary
FDA Prior Notice records 21 CFR §1.281 submission window breach liability Webhook processing in-house — no third-party custodian
USMCA origin certifications 19 CFR §163.4 5-year audit trail — third-party cloud = chain-of-custody question Git-versioned workflow = auditable cert chain
DOT HazMat shipping papers 49 CFR §172.604 — emergency responder access required instantly Self-hosted = no cloud API dependency during incident response
C-TPAT security records CBP MSC — third-party cloud custodian = MSC physical security criteria gap On-prem or private cloud = MSC-compliant data isolation

The enterprise sales question is not "Do you use automation?" — it's "Where does the automation data live?" Self-hosted n8n gives your customers a clear, auditable answer.


n8n vs Zapier vs Make for LogiTech SaaS

Capability n8n (self-hosted) Zapier Make
CBP AES data isolation ✅ On-prem/VPC ❌ US cloud ❌ EU cloud
49 CFR §172.604 HazMat incident webhook ✅ Custom webhook + immediate routing ⚠️ Polling delay ⚠️ Polling delay
USMCA cert tracker (4yr cycle) ✅ Native Sheets + custom code ⚠️ Limited code ⚠️ Limited code
FDA Prior Notice window calc (2-8h logic) ✅ JS code node ❌ No custom logic ⚠️ Limited
Self-hosted / air-gapped ✅ Full support ❌ Cloud only ❌ Cloud only
Price $0 (self-hosted) $19-799+/mo $9-299+/mo

Get These Workflows Pre-Built

These 5 workflows are available as tested, production-ready templates in the FlowKit n8n template store. Each comes as an importable JSON file with setup instructions and Sheets templates.

Individual templates: $12-$29. Full bundle (14+ templates): $97.

Browse the FlowKit store →


All regulations cited are current as of 2026. CBP C-TPAT MSC: ctpat.cbp.dhs.gov. FDA Prior Notice: access.fda.gov. DOT PHMSA HazMat: phmsa.dot.gov. USMCA: cbp.gov/trade/free-trade-agreements/usmca.

Top comments (0)