DEV Community

Alex Kane
Alex Kane

Posted on

n8n for HRTech SaaS: 5 Automations for FLSA, FMLA, ADA, I-9, and Title VII Compliance (Free Workflow JSON)

If your HRTech SaaS platform processes employee records, payroll data, or applicant information, you are not just building software — you are operating inside one of the most regulated environments in US labor law.

FLSA, FMLA, ADA, I-9/E-Verify, and Title VII create obligations that flow directly through your platform. A payroll integration failure is not just a SLA incident — it is a §211.5 recordkeeping exposure. An ADA accommodation request that stalls in your ticketing system is an interactive-process failure under 42 USC §12112(b)(5).

Here are 5 n8n workflows your HRTech engineering and compliance teams can deploy today. All JSON is import-ready.


1. New HRTech Customer Onboarding Drip

Tier customers (ENTERPRISE_HCM → PEO_STAFFING) on signup and trigger a compliance-aware Day0/Day3/Day7 email sequence that surfaces the right regulatory setup steps for each account.

Why this matters: Your enterprise HCM customers have FLSA §541 exemption category complexity, FMLA 50-employee thresholds, and Title VII EEO-1 reporting obligations that SMB payroll customers do not. Generic onboarding emails miss this — and a misconfigured FMLA notice window means your customer misses the 5-business-day designation notice under 29 CFR §825.300.

{
  "name": "HRTech Customer Onboarding Drip",
  "nodes": [
    {
      "id": "wh1",
      "name": "Webhook - New Customer Signed Up",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        100,
        200
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "hrtech-customer-onboarded",
        "responseMode": "responseNode"
      }
    },
    {
      "id": "c1",
      "name": "Code - Parse Customer & Assign Tier",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        320,
        200
      ],
      "parameters": {
        "jsCode": "const d = $input.first().json;\nconst arr = d.annual_recurring_revenue_usd || 0;\nlet tier;\nif (arr >= 500000) tier = 'ENTERPRISE_HCM';\nelse if (arr >= 100000) tier = 'MIDMARKET_HRIS';\nelse if (arr >= 25000) tier = 'SMB_PAYROLL';\nelse tier = 'PEO_STAFFING';\n\nconst flags = [\n  d.ada_accommodation_workflow ? 'ADA_ACCOMMODATION_WORKFLOW' : null,\n  d.fmla_tracking ? 'FMLA_TRACKING' : null,\n  d.flsa_exempt_classification ? 'FLSA_EXEMPT_CLASSIFICATION' : null,\n  d.i9_everify_enrolled ? 'I9_EVERIFY_ENROLLED' : null,\n  d.eeo1_reporter ? 'TITLE_VII_EEO1_REPORTER' : null,\n  d.ccpa_employee_data ? 'CCPA_EMPLOYEE_DATA' : null,\n  d.gdpr_employee_data ? 'GDPR_EMPLOYEE_DATA' : null\n].filter(Boolean);\n\nreturn [{ json: { ...d, tier, complianceFlags: flags, onboarded_at: new Date().toISOString() } }];"
      }
    },
    {
      "id": "g1",
      "name": "Gmail - Day 0 Welcome",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [
        540,
        200
      ],
      "parameters": {
        "operation": "send",
        "sendTo": "={{$json.admin_email}}",
        "subject": "Welcome to [HRTech Platform], {{$json.company_name}}!",
        "emailType": "html",
        "message": "<p>Hi {{$json.admin_name}},</p><p>Your {{$json.tier}} account is live. Here's your 3-step setup checklist:</p><ol><li>Connect your payroll integration (ADP, Gusto, or Paychex)</li><li>Configure FLSA exemption categories for your workforce</li><li>Enable I-9/E-Verify compliance monitoring</li></ol><p>Compliance flags detected on your account: <strong>{{$json.complianceFlags.join(', ')}}</strong></p><p>Your dedicated implementation lead will reach out within 1 business day.</p>",
        "options": {}
      }
    },
    {
      "id": "sh1",
      "name": "Sheets - Log Onboarding",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        760,
        200
      ],
      "parameters": {
        "operation": "append",
        "documentId": "YOUR_ONBOARDING_SHEET_ID",
        "sheetName": "Onboarding",
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {
            "matchingColumns": []
          }
        },
        "options": {}
      }
    },
    {
      "id": "sl1",
      "name": "Slack - Notify CS Team",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [
        760,
        350
      ],
      "parameters": {
        "operation": "post",
        "channel": "#new-customers",
        "text": "*New {{$json.tier}} customer*: {{$json.company_name}} | ARR: ${{$json.annual_recurring_revenue_usd.toLocaleString()}} | Flags: {{$json.complianceFlags.join(', ')}}",
        "otherOptions": {}
      }
    },
    {
      "id": "w1",
      "name": "Wait 3 Days",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        980,
        200
      ],
      "parameters": {
        "amount": 3,
        "unit": "days"
      }
    },
    {
      "id": "g2",
      "name": "Gmail - Day 3 Compliance Config",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [
        1200,
        200
      ],
      "parameters": {
        "operation": "send",
        "sendTo": "={{$json.admin_email}}",
        "subject": "{{$json.company_name}} \u2014 Set Up Your FLSA & FMLA Compliance Monitors",
        "emailType": "html",
        "message": "<p>Hi {{$json.admin_name}},</p><p>Day 3 checklist for your {{$json.tier}} account:</p><ul><li>FLSA overtime threshold: configure your 29 CFR Part 541 exemption categories (executive, administrative, professional, highly compensated)</li><li>FMLA eligibility rules: set 50-employee threshold and 12-month lookback window per 29 CFR Part 825</li>{{$json.complianceFlags.includes('I9_EVERIFY_ENROLLED') ? '<li>I-9/E-Verify: connect your DHS M-274 compliant flow and set 3-day completion window</li>' : ''}}</ul>",
        "options": {}
      }
    },
    {
      "id": "w2",
      "name": "Wait 4 Days",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        1420,
        200
      ],
      "parameters": {
        "amount": 4,
        "unit": "days"
      }
    },
    {
      "id": "g3",
      "name": "Gmail - Day 7 Power Tips",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [
        1640,
        200
      ],
      "parameters": {
        "operation": "send",
        "sendTo": "={{$json.admin_email}}",
        "subject": "{{$json.company_name}} \u2014 FLSA Audit Defense & ADA Interactive Process in [HRTech]",
        "emailType": "html",
        "message": "<p>Hi {{$json.admin_name}},</p><p>Week 1 power features for your team:</p><ul><li><strong>FLSA audit-ready reports</strong>: export 3-year wage/hour history with \u00a7211.5 record retention timestamps in one click</li>{{$json.complianceFlags.includes('ADA_ACCOMMODATION_WORKFLOW') ? '<li><strong>ADA interactive process tracker</strong>: document every step of the \u00a712112(b)(5) reasonable accommodation process with timestamped audit trail</li>' : ''}}<li><strong>EEOC charge deadline alerts</strong>: 180-day statute of limitations clock starts from the last discriminatory act \u2014 we track it automatically</li></ul>",
        "options": {}
      }
    }
  ],
  "connections": {
    "Webhook - New Customer Signed Up": {
      "main": [
        [
          {
            "node": "Code - Parse Customer & Assign Tier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Parse Customer & Assign Tier": {
      "main": [
        [
          {
            "node": "Gmail - Day 0 Welcome",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Day 0 Welcome": {
      "main": [
        [
          {
            "node": "Sheets - Log Onboarding",
            "type": "main",
            "index": 0
          },
          {
            "node": "Slack - Notify CS Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets - Log Onboarding": {
      "main": [
        [
          {
            "node": "Wait 3 Days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 3 Days": {
      "main": [
        [
          {
            "node": "Gmail - Day 3 Compliance Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Day 3 Compliance Config": {
      "main": [
        [
          {
            "node": "Wait 4 Days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 4 Days": {
      "main": [
        [
          {
            "node": "Gmail - Day 7 Power Tips",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false
}
Enter fullscreen mode Exit fullscreen mode

2. HRIS/ATS/Payroll Integration Health Monitor

Ping ADP, Workday, Greenhouse, Gusto, and DHS E-Verify every 5 minutes. Route DOWN/DEGRADED alerts to Slack with the exact regulatory clock that starts ticking when the integration fails.

Why this matters: When your ADP integration goes dark, your customer's FLSA §211.5 wage records stop updating. When Greenhouse ATS is down, the Title VII applicant flow log goes stale. The integration SLA is not just uptime — it is regulatory exposure the moment the clock starts.

{
  "name": "HRIS/ATS/Payroll Integration Health Monitor",
  "nodes": [
    {
      "id": "s1",
      "name": "Schedule - Every 5 Minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        100,
        200
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 5
            }
          ]
        }
      }
    },
    {
      "id": "c2",
      "name": "Code - Define Integration Endpoints",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        320,
        200
      ],
      "parameters": {
        "jsCode": "return [\n  { json: { integration: 'ADP_WORKFORCE_NOW', url: 'https://api.adp.com/hr/v2/workers', timeout_ms: 5000, regulatory_note: 'FLSA \u00a7211.5 \u2014 3yr wage record retention' } },\n  { json: { integration: 'WORKDAY_HCM', url: 'https://wd2-impl-services1.workday.com/ccx/service/YOUR_TENANT/Human_Resources/v40.1', timeout_ms: 5000, regulatory_note: 'FMLA \u00a7825.300 \u2014 designation notice within 5 business days' } },\n  { json: { integration: 'GREENHOUSE_ATS', url: 'https://harvest.greenhouse.io/v1/ping', timeout_ms: 3000, regulatory_note: 'Title VII EEO-1 \u2014 applicant flow log required' } },\n  { json: { integration: 'GUSTO_PAYROLL', url: 'https://api.gusto.com/v1/companies/YOUR_ID', timeout_ms: 5000, regulatory_note: 'FLSA \u00a7216 \u2014 2yr payroll record retention' } },\n  { json: { integration: 'DHS_EVERIFY', url: 'https://everify.uscis.gov/api/v1/status', timeout_ms: 5000, regulatory_note: 'INA \u00a7274A \u2014 I-9 completion within 3 business days of hire' } }\n];"
      }
    },
    {
      "id": "h1",
      "name": "HTTP - Ping Each Integration",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        540,
        200
      ],
      "parameters": {
        "method": "GET",
        "url": "={{$json.url}}",
        "timeout": 5000,
        "options": {
          "response": {
            "response": {
              "responseFormat": "text"
            }
          }
        }
      }
    },
    {
      "id": "c3",
      "name": "Code - Evaluate Health",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        760,
        200
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst alerts = [];\nconst now = new Date();\nfor (const item of items) {\n  const d = item.json;\n  const responseTime = d.$response?.responseTime || 9999;\n  let status = 'OK';\n  if (d.$response?.statusCode !== 200) status = 'DOWN';\n  else if (responseTime > 3000) status = 'DEGRADED';\n  if (status !== 'OK') {\n    alerts.push({\n      integration: d.integration,\n      status,\n      response_time_ms: responseTime,\n      regulatory_note: d.regulatory_note,\n      alert_ts: now.toISOString()\n    });\n  }\n}\nif (alerts.length === 0) return [];\nreturn alerts.map(a => ({ json: a }));"
      }
    },
    {
      "id": "if1",
      "name": "IF - Any Down?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        980,
        200
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true
          },
          "conditions": [
            {
              "leftValue": "={{$json.status}}",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "rightValue": "DOWN"
            }
          ]
        }
      }
    },
    {
      "id": "sl2",
      "name": "Slack - CRITICAL Integration Down",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [
        1200,
        100
      ],
      "parameters": {
        "operation": "post",
        "channel": "#integrations-critical",
        "text": "*CRITICAL \u2014 Integration DOWN*\n`{{$json.integration}}` is unreachable.\n*Regulatory risk:* {{$json.regulatory_note}}\nResolve within 1 hour to avoid compliance window breach.",
        "otherOptions": {}
      }
    },
    {
      "id": "sl3",
      "name": "Slack - DEGRADED Integration",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [
        1200,
        300
      ],
      "parameters": {
        "operation": "post",
        "channel": "#integrations-watch",
        "text": "*DEGRADED \u2014 Integration slow*\n`{{$json.integration}}` response {{$json.response_time_ms}}ms (threshold: 3000ms).\n*Regulatory note:* {{$json.regulatory_note}}",
        "otherOptions": {}
      }
    },
    {
      "id": "sh2",
      "name": "Sheets - Log Health Event",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        1420,
        200
      ],
      "parameters": {
        "operation": "append",
        "documentId": "YOUR_HEALTH_LOG_SHEET_ID",
        "sheetName": "IntegrationHealth",
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {
            "matchingColumns": []
          }
        },
        "options": {}
      }
    }
  ],
  "connections": {
    "Schedule - Every 5 Minutes": {
      "main": [
        [
          {
            "node": "Code - Define Integration Endpoints",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Define Integration Endpoints": {
      "main": [
        [
          {
            "node": "HTTP - Ping Each Integration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP - Ping Each Integration": {
      "main": [
        [
          {
            "node": "Code - Evaluate Health",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Evaluate Health": {
      "main": [
        [
          {
            "node": "IF - Any Down?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Any Down?": {
      "main": [
        [
          {
            "node": "Slack - CRITICAL Integration Down",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack - DEGRADED Integration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack - CRITICAL Integration Down": {
      "main": [
        [
          {
            "node": "Sheets - Log Health Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack - DEGRADED Integration": {
      "main": [
        [
          {
            "node": "Sheets - Log Health Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false
}
Enter fullscreen mode Exit fullscreen mode

3. FLSA/FMLA/ADA/I-9/Title VII Compliance Deadline Tracker

Track 12 HR compliance deadline types across your customer portfolio. Route by OVERDUE/CRITICAL/URGENT/WARNING/NOTICE with regulatory citations and responsible owner.

Why this matters: The EEOC charge response window — position statement typically due 30 days from EEOC request — is one of the most commonly missed HR compliance deadlines. TITLE_VII_EEO1_SUBMISSION is due September 30 every year and many employers miss it. Your platform is the right place to track these, and your customers will pay for that peace of mind.

{
  "name": "FLSA/FMLA/ADA/I-9/Title VII Compliance Deadline Tracker",
  "nodes": [
    {
      "id": "s2",
      "name": "Schedule - Weekdays 8AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        100,
        200
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 8 * * 1-5"
            }
          ]
        }
      }
    },
    {
      "id": "sh3",
      "name": "Sheets - Read Compliance Deadlines",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        320,
        200
      ],
      "parameters": {
        "operation": "readRows",
        "documentId": "YOUR_COMPLIANCE_SHEET_ID",
        "sheetName": "Deadlines",
        "options": {}
      }
    },
    {
      "id": "c4",
      "name": "Code - Classify Urgency",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        540,
        200
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst now = new Date();\nconst results = [];\nconst DEADLINE_TYPES = {\n  FLSA_OVERTIME_AUDIT: { citation: '29 CFR \u00a7516.2 \u2014 3yr record retention', owner: 'CHRO' },\n  FMLA_ANNUAL_NOTICE_UPDATE: { citation: '29 CFR \u00a7825.300 \u2014 annual eligibility notice', owner: 'HR_COMPLIANCE' },\n  ADA_ACCOMMODATION_REVIEW: { citation: '42 USC \u00a712112(b)(5) \u2014 interactive process', owner: 'HR_LEGAL' },\n  I9_EVERIFY_MOU_RENEWAL: { citation: '8 CFR \u00a7274a.2 \u2014 E-Verify MOU recertification', owner: 'HR_COMPLIANCE' },\n  TITLE_VII_EEO1_SUBMISSION: { citation: '42 USC \u00a72000e-8 \u2014 annual EEO-1 report (due Sept 30)', owner: 'CHRO' },\n  EEOC_CHARGE_RESPONSE: { citation: 'EEOC 29 CFR \u00a71601 \u2014 position statement due 30d from request', owner: 'HR_LEGAL' },\n  CCPA_EMPLOYEE_DSR_RESPONSE: { citation: 'Cal. Civ. Code \u00a71798.100 \u2014 45d response window', owner: 'PRIVACY_OFFICER' },\n  GDPR_ART13_NOTICE_REVIEW: { citation: 'GDPR Art.13 \u2014 employee data notice annual review', owner: 'DPO' },\n  SOC2_ANNUAL_AUDIT: { citation: 'AICPA SOC2 \u2014 annual Type II audit window', owner: 'CISO' },\n  PAYROLL_TAX_941_DEPOSIT: { citation: '26 USC \u00a76656 \u2014 semiweekly/monthly payroll deposit', owner: 'FINANCE' },\n  ACA_1095C_FILING: { citation: 'IRC \u00a76056 \u2014 1095-C due March 31', owner: 'BENEFITS_ADMIN' },\n  STATE_WAGE_HOUR_AUDIT: { citation: 'State DLSE/DOL \u2014 wage order compliance audit', owner: 'HR_COMPLIANCE' }\n};\nfor (const item of items) {\n  const d = item.json;\n  if (!d.deadline_date || !d.deadline_type) continue;\n  const ddl = new Date(d.deadline_date);\n  const daysLeft = Math.ceil((ddl - now) / 86400000);\n  if (daysLeft > 90) continue;\n  const meta = DEADLINE_TYPES[d.deadline_type] || { citation: 'See compliance calendar', owner: 'HR_COMPLIANCE' };\n  let urgency;\n  if (daysLeft < 0) urgency = 'OVERDUE';\n  else if (daysLeft <= 7) urgency = 'CRITICAL';\n  else if (daysLeft <= 21) urgency = 'URGENT';\n  else if (daysLeft <= 45) urgency = 'WARNING';\n  else urgency = 'NOTICE';\n  const lastAlertDate = d.alert_sent_date || '';\n  const today = now.toISOString().slice(0,10);\n  if (lastAlertDate === today && urgency === 'NOTICE') continue;\n  results.push({ json: { ...d, daysLeft, urgency, ...meta, today } });\n}\nreturn results;"
      }
    },
    {
      "id": "sw1",
      "name": "Switch - Route by Urgency",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3,
      "position": [
        760,
        200
      ],
      "parameters": {
        "mode": "rules",
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true
                },
                "conditions": [
                  {
                    "leftValue": "={{$json.urgency}}",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "rightValue": "OVERDUE"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true
                },
                "conditions": [
                  {
                    "leftValue": "={{$json.urgency}}",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "rightValue": "CRITICAL"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true
                },
                "conditions": [
                  {
                    "leftValue": "={{$json.urgency}}",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "rightValue": "URGENT"
                  }
                ]
              }
            }
          ]
        }
      }
    },
    {
      "id": "sl4",
      "name": "Slack - OVERDUE/CRITICAL Alert",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [
        980,
        100
      ],
      "parameters": {
        "operation": "post",
        "channel": "#hr-compliance-urgent",
        "text": "*{{$json.urgency}} \u2014 {{$json.deadline_type}}*\nDeadline: {{$json.deadline_date}} ({{$json.daysLeft < 0 ? Math.abs($json.daysLeft) + 'd overdue' : $json.daysLeft + 'd remaining'}})\nCitation: {{$json.citation}}\nOwner: {{$json.owner}}\nCustomer: {{$json.customer_name}}",
        "otherOptions": {}
      }
    },
    {
      "id": "g4",
      "name": "Gmail - Urgent Compliance Notice",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [
        980,
        300
      ],
      "parameters": {
        "operation": "send",
        "sendTo": "={{$json.owner_email}}",
        "subject": "[{{$json.urgency}}] {{$json.deadline_type}} \u2014 {{$json.daysLeft < 0 ? 'OVERDUE' : $json.daysLeft + ' days'}}",
        "emailType": "html",
        "message": "<p>Compliance deadline {{$json.urgency.toLowerCase()}} for <strong>{{$json.customer_name}}</strong>:</p><ul><li>Type: {{$json.deadline_type}}</li><li>Deadline: {{$json.deadline_date}}</li><li>Regulatory basis: {{$json.citation}}</li><li>Days remaining: {{$json.daysLeft}}</li></ul>",
        "options": {}
      }
    }
  ],
  "connections": {
    "Schedule - Weekdays 8AM": {
      "main": [
        [
          {
            "node": "Sheets - Read Compliance Deadlines",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets - Read Compliance Deadlines": {
      "main": [
        [
          {
            "node": "Code - Classify Urgency",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Classify Urgency": {
      "main": [
        [
          {
            "node": "Switch - Route by Urgency",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch - Route by Urgency": {
      "main": [
        [
          {
            "node": "Slack - OVERDUE/CRITICAL Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack - OVERDUE/CRITICAL Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Gmail - Urgent Compliance Notice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false
}
Enter fullscreen mode Exit fullscreen mode

4. Employee Data Breach & HR Violation Alert Pipeline

Webhook-driven incident classifier for 8 HR incident types — from payroll PII breach to FLSA misclassification exposure to I-9 unauthorized worker. Each type has a pre-mapped regulatory clock and notification routing.

Why this matters: An I-9 unauthorized worker finding (INA §274A) carries civil penalties of $281–$27,894 per violation and criminal referral for pattern-or-practice violations. The difference between a controllable incident and an enforcement nightmare is response speed — and that clock starts at discovery, not when your legal team finds out.

{
  "name": "Employee Data Breach & HR Violation Alert Pipeline",
  "nodes": [
    {
      "id": "wh2",
      "name": "Webhook - HR Incident Reported",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        100,
        200
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "hr-incident",
        "responseMode": "responseNode"
      }
    },
    {
      "id": "c5",
      "name": "Code - Classify Incident & Set Clocks",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        320,
        200
      ],
      "parameters": {
        "jsCode": "const d = $input.first().json;\nconst INCIDENT_MAP = {\n  PAYROLL_PII_BREACH: { severity: 'CRITICAL', regulatory_clock_hours: 72, clock_source: 'GLBA \u00a7314.4(j) \u2014 30d FTC notification if 500+ customers affected; state breach laws may be shorter', notif_target: 'CISO,LEGAL,CHRO,CEO' },\n  FLSA_MISCLASSIFICATION_EXPOSURE: { severity: 'HIGH', regulatory_clock_hours: null, clock_source: 'FLSA \u00a7255(a) \u2014 2yr (3yr willful) statute of limitations; DOL may assess back wages + equal liquidated damages', notif_target: 'LEGAL,CHRO' },\n  FMLA_RETALIATION_COMPLAINT: { severity: 'HIGH', regulatory_clock_hours: null, clock_source: '29 CFR \u00a7825.220(c) \u2014 DOL investigation; \u00a7825.400 private right of action within 2yr (3yr willful)', notif_target: 'LEGAL,HR_COMPLIANCE' },\n  ADA_ACCOMMODATION_DENIAL: { severity: 'HIGH', regulatory_clock_hours: null, clock_source: 'EEOC Charge: 180d statute of limitations (300d in deferral states); Title I \u2014 reasonable accommodation interactive process must be documented', notif_target: 'LEGAL,HR_COMPLIANCE,CHRO' },\n  I9_UNAUTHORIZED_WORKER: { severity: 'CRITICAL', regulatory_clock_hours: null, clock_source: 'INA \u00a7274A \u2014 civil penalty $281\u2013$27,894 per violation; criminal referral if pattern/practice; immediate DOJ/ICE notification', notif_target: 'LEGAL,CEO,CHRO' },\n  TITLE_VII_EEOC_CHARGE: { severity: 'HIGH', regulatory_clock_hours: 120, clock_source: 'EEOC 29 CFR \u00a71601.28 \u2014 position statement typically due 30d from EEOC request; \u00a7706 conciliation may follow', notif_target: 'LEGAL,CHRO,CEO' },\n  CCPA_EMPLOYEE_DSR_OVERDUE: { severity: 'MEDIUM', regulatory_clock_hours: null, clock_source: 'Cal. Civ. Code \u00a71798.100 \u2014 45d response; AG enforcement; $2,500-$7,500 per intentional violation', notif_target: 'PRIVACY_OFFICER,LEGAL' },\n  STATE_WAGE_CLAIM: { severity: 'MEDIUM', regulatory_clock_hours: null, clock_source: 'State DLSE/DOL \u2014 varies by state; CA waiting time penalty \u00a7203 if willful; prompt response reduces exposure', notif_target: 'LEGAL,FINANCE,CHRO' }\n};\nconst meta = INCIDENT_MAP[d.incident_type] || { severity: 'MEDIUM', regulatory_clock_hours: null, clock_source: 'Review applicable statute', notif_target: 'LEGAL' };\nconst incident_ts = new Date().toISOString();\nlet clock_deadline = null;\nif (meta.regulatory_clock_hours) {\n  const deadline = new Date(Date.now() + meta.regulatory_clock_hours * 3600000);\n  clock_deadline = deadline.toISOString();\n}\nreturn [{ json: { ...d, ...meta, incident_ts, clock_deadline } }];"
      }
    },
    {
      "id": "sl5",
      "name": "Slack - Immediate Alert",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [
        540,
        100
      ],
      "parameters": {
        "operation": "post",
        "channel": "#hr-incidents",
        "text": "*{{$json.severity}} HR INCIDENT: {{$json.incident_type}}*\nCustomer: {{$json.customer_name || 'Internal'}}\nReported: {{$json.incident_ts}}\nClock deadline: {{$json.clock_deadline || 'None'}}\nRegulatory basis: {{$json.clock_source}}\nNotify: {{$json.notif_target}}",
        "otherOptions": {}
      }
    },
    {
      "id": "sh4",
      "name": "Sheets - Audit Trail",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        540,
        300
      ],
      "parameters": {
        "operation": "append",
        "documentId": "YOUR_INCIDENTS_SHEET_ID",
        "sheetName": "HRIncidents",
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {
            "matchingColumns": []
          }
        },
        "options": {}
      }
    },
    {
      "id": "g5",
      "name": "Gmail - Legal Team Notification",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [
        760,
        200
      ],
      "parameters": {
        "operation": "send",
        "sendTo": "legal@yourcompany.com",
        "bcc": "ciso@yourcompany.com",
        "subject": "[{{$json.severity}}] HR Incident \u2014 {{$json.incident_type}} | {{$json.customer_name}}",
        "emailType": "html",
        "message": "<p>HR compliance incident reported:</p><ul><li>Type: {{$json.incident_type}}</li><li>Customer: {{$json.customer_name}}</li><li>Severity: {{$json.severity}}</li>{{$json.clock_deadline ? '<li>Regulatory clock expires: ' + $json.clock_deadline + '</li>' : ''}}<li>Legal basis: {{$json.clock_source}}</li></ul><p>Action required: review incident file and confirm next steps within 4 hours.</p>",
        "options": {}
      }
    }
  ],
  "connections": {
    "Webhook - HR Incident Reported": {
      "main": [
        [
          {
            "node": "Code - Classify Incident & Set Clocks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Classify Incident & Set Clocks": {
      "main": [
        [
          {
            "node": "Slack - Immediate Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Sheets - Audit Trail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack - Immediate Alert": {
      "main": [
        [
          {
            "node": "Gmail - Legal Team Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false
}
Enter fullscreen mode Exit fullscreen mode

5. Weekly HRTech Platform KPI Dashboard

Combine platform metrics (MRR, active accounts, churn) with compliance event counts (FLSA audits overdue, ADA accommodations pending, EEOC charges open) into a single weekly email. CHRO is BCC — because your Chief Human Resources Officer seeing a platform KPI that flags [EEOC CHARGE OPEN: 3] without a briefing is a governance gap your board will not like.

{
  "name": "Weekly HRTech Platform KPI Dashboard",
  "nodes": [
    {
      "id": "s3",
      "name": "Schedule - Monday 8AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        100,
        200
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 8 * * 1"
            }
          ]
        }
      }
    },
    {
      "id": "sh5",
      "name": "Sheets - Platform Metrics",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        320,
        200
      ],
      "parameters": {
        "operation": "readRows",
        "documentId": "YOUR_METRICS_SHEET_ID",
        "sheetName": "WeeklyMetrics",
        "options": {}
      }
    },
    {
      "id": "sh6",
      "name": "Sheets - Compliance Events",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        320,
        350
      ],
      "parameters": {
        "operation": "readRows",
        "documentId": "YOUR_METRICS_SHEET_ID",
        "sheetName": "ComplianceEvents",
        "options": {}
      }
    },
    {
      "id": "mg1",
      "name": "Merge - Metrics + Compliance",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        540,
        275
      ],
      "parameters": {
        "mode": "combine",
        "combineBy": "combineAll",
        "options": {}
      }
    },
    {
      "id": "c6",
      "name": "Code - Build KPI Report",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        760,
        275
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst m = items[0]?.json || {};\nconst c = items[1]?.json || {};\nconst pct = (a,b) => b ? ((a-b)/b*100).toFixed(1)+'%' : 'N/A';\nconst mrr = m.mrr_usd || 0;\nconst mrr_prev = m.mrr_usd_prev_week || 0;\nconst active = m.active_accounts || 0;\nconst new_customers = m.new_customers_this_week || 0;\nconst churned = m.churned_accounts_this_week || 0;\nconst flsa_overdue = c.flsa_audit_overdue || 0;\nconst fmla_open = c.fmla_cases_open || 0;\nconst ada_pending = c.ada_accommodation_pending || 0;\nconst i9_exceptions = c.i9_everify_exceptions || 0;\nconst eeoc_charges = c.eeoc_charges_open || 0;\nconst flags = [];\nif (flsa_overdue > 0) flags.push(`[FLSA AUDIT OVERDUE: ${flsa_overdue}]`);\nif (ada_pending > 3) flags.push(`[ADA ACCOMMODATION PENDING: ${ada_pending}]`);\nif (i9_exceptions > 0) flags.push(`[I-9 EXCEPTION OPEN: ${i9_exceptions}]`);\nif (eeoc_charges > 0) flags.push(`[EEOC CHARGE OPEN: ${eeoc_charges}]`);\nconst html = `<h2>Weekly HRTech Platform KPI</h2>\n<table border=\"1\" cellpadding=\"6\"><tr><th>Metric</th><th>This Week</th><th>WoW</th></tr>\n<tr><td>MRR</td><td>$${mrr.toLocaleString()}</td><td>${pct(mrr,mrr_prev)}</td></tr>\n<tr><td>Active Accounts</td><td>${active}</td><td>\u2014</td></tr>\n<tr><td>New Customers</td><td>${new_customers}</td><td>\u2014</td></tr>\n<tr><td>Churned</td><td>${churned}</td><td>\u2014</td></tr>\n<tr style=\"background:#fff3cd\"><td>FLSA Audits Overdue</td><td>${flsa_overdue}</td><td>\u2014</td></tr>\n<tr style=\"background:#fff3cd\"><td>FMLA Cases Open</td><td>${fmla_open}</td><td>\u2014</td></tr>\n<tr style=\"background:#f8d7da\"><td>ADA Accommodations Pending</td><td>${ada_pending}</td><td>\u2014</td></tr>\n<tr style=\"background:#f8d7da\"><td>I-9/E-Verify Exceptions</td><td>${i9_exceptions}</td><td>\u2014</td></tr>\n<tr style=\"background:#f8d7da\"><td>EEOC Charges Open</td><td>${eeoc_charges}</td><td>\u2014</td></tr>\n</table>\n${flags.length > 0 ? '<p style=\"color:red\"><strong>Flags: ' + flags.join(' ') + '</strong></p>' : '<p style=\"color:green\">No critical compliance flags this week.</p>'}`;\nreturn [{ json: { html, flags: flags.join(' '), mrr, active } }];"
      }
    },
    {
      "id": "g6",
      "name": "Gmail - KPI Report to CEO+CHRO",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [
        980,
        200
      ],
      "parameters": {
        "operation": "send",
        "sendTo": "ceo@yourcompany.com",
        "bcc": "chro@yourcompany.com,ciso@yourcompany.com",
        "subject": "Weekly HRTech KPI \u2014 {{$json.flags || 'All Clear'}}",
        "emailType": "html",
        "message": "={{$json.html}}",
        "options": {}
      }
    },
    {
      "id": "sl6",
      "name": "Slack - Weekly Summary",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [
        980,
        350
      ],
      "parameters": {
        "operation": "post",
        "channel": "#leadership",
        "text": "Weekly HRTech KPI | MRR ${{$json.mrr.toLocaleString()}} | Active: {{$json.active}} | {{$json.flags || 'No compliance flags'}}",
        "otherOptions": {}
      }
    }
  ],
  "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 - Metrics + Compliance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets - Compliance Events": {
      "main": [
        [
          {
            "node": "Merge - Metrics + Compliance",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge - Metrics + Compliance": {
      "main": [
        [
          {
            "node": "Code - Build KPI Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Build KPI Report": {
      "main": [
        [
          {
            "node": "Gmail - KPI Report to CEO+CHRO",
            "type": "main",
            "index": 0
          },
          {
            "node": "Slack - Weekly Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false
}
Enter fullscreen mode Exit fullscreen mode

Why self-hosted n8n is the right infrastructure for HRTech compliance workflows

Factor Zapier / Make Self-hosted n8n
Payroll SSN / PII routing Third-party cloud storage Stays in your VPC / on-prem
SOC2 CC6.1 vendor risk Additional vendor assessment Eliminated — your infrastructure
FLSA §211.5 audit trail Vendor controls logs Git-versioned JSON, auditor-readable
GDPR Art.28 DPA Another sub-processor agreement No sub-processor for workflow engine
ADA interactive process docs Data leaves enclave All docs stay in your environment
Pricing at scale Per-task billing compounds Flat instance cost regardless of volume

Get these workflows pre-built

All 5 workflows above — plus 10 more n8n automations for SaaS operations, compliance monitoring, and customer success — are available as import-ready JSON at stripeai.gumroad.com.

Questions or customizations? Drop a comment below.

Top comments (0)