n8n for ConstructionTech SaaS Vendors: 5 Automations for OSHA, Davis-Bacon, EPA CGP, and Mechanic's Lien Compliance
n8n for ConstructionTech SaaS Vendors: 5 Automations for OSHA, Davis-Bacon, EPA CGP, and Mechanic's Lien Compliance If you build software for the construction industry โ project management platforms, field service mana
n8n for ConstructionTech SaaS Vendors: 5 Automations for OSHA, Davis-Bacon, EPA CGP, and Mechanic's Lien Compliance
If you build software for the construction industry โ project management platforms, field service management SaaS, BIM tools, estimating software, owner/developer PropTech โ your customers operate under a regulatory environment that most SaaS vendors underestimate until the first OSHA citation or Davis-Bacon investigation lands.
The compliance landscape for ConstructionTech SaaS customers:
- OSHA 29 CFR ยง1904.39: Fatality report within 8 hours of determination. Hospitalization, amputation, or eye loss within 24 hours. No grace period.
- EPA Construction General Permit (CGP): Stormwater Pollution Prevention Plan (SWPPP) required before land disturbance โฅ1 acre. Site inspection every 14 days during active construction and within 24 hours of storm events.
- Davis-Bacon Act (40 USC ยง3145): Federal contracts require certified payroll submission (DOL WH-347) within 7 days of each payroll period end.
- Mechanic's Lien Laws: State-specific deadlines to file preliminary notices and perfect liens โ typically 20-90 days from last furnishing. Miss the deadline and the lien right is extinguished.
- OSHA 300 Log Annual Posting: Summary must be posted February 1 through April 30 each year (29 CFR ยง1904.32).
Here are five n8n automations that ConstructionTech SaaS vendors use to keep their customers compliant โ and to win enterprise procurement by keeping OSHA incident data within a controlled network boundary.
Workflow 1: Tier-Segmented Customer Onboarding Drip
ConstructionTech SaaS customers span seven distinct tiers with completely different compliance profiles.
7 customer tiers:
| Tier | Key Compliance Obligations |
|---|---|
| ENTERPRISE_GENERAL_CONTRACTOR | OSHA ยง1904.39, Davis-Bacon, EPA CGP, OCIP/CCIP insurance |
| MID_MARKET_SPECIALTY_CONTRACTOR_SAAS | OSHA ยง1904.39, state prevailing wage, mechanic's lien |
| CONSTRUCTION_PROJECT_MANAGEMENT_VENDOR | Davis-Bacon certified payroll, FAR 52.244-2, AIA A201 |
| BUILDING_INFORMATION_MODELING_SAAS | E&O liability, AIA B101 design services, LEED documentation |
| CONSTRUCTION_ESTIMATING_SAAS | Davis-Bacon wage determination lookup, bid bond compliance |
| FIELD_SERVICE_MANAGEMENT_VENDOR | OSHA ยง1904.39 incident capture, fall protection ยง1926.502 |
| OWNER_DEVELOPER_PROPTECH | LEED certification, building permits, mechanic's lien exposure |
7 compliance flags injected at onboarding:
-
OSHA_RECORDKEEPING_REQUIRED(โฅ10 employees, non-exempt industry) -
FEDERAL_CONTRACT_DAVIS_BACON(Davis-Bacon Act 40 USC ยง3145 applies) -
EPA_CGP_NPDES_SUBJECT(โฅ1 acre land disturbance) -
LEED_CERTIFICATION_REQUIRED(USGBC certification milestone) -
AHJ_PERMIT_TRACKER_ACTIVE(Authority Having Jurisdiction permit tracking) -
PREVAILING_WAGE_STATE_APPLICABLE(state-specific prevailing wage law) -
FAR_DFARS_APPLICABLE(federal contract acquisition regulations)
Key angle for OSHA_RECORDKEEPING_REQUIRED customers: OSHA 29 CFR ยง1904.31 multi-employer worksite rule creates a co-employer question when incident data flows through a third-party SaaS vendor's servers. Self-hosted n8n keeps OSHA recordkeeping data within the contractor's network boundary โ eliminating the vendor from the OSHA audit chain.
{
"name": "ConstructionTech SaaS \u2014 Tiered Customer Onboarding Drip",
"nodes": [
{
"id": "1",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
250,
300
],
"parameters": {
"path": "construction-onboarding",
"httpMethod": "POST"
}
},
{
"id": "2",
"name": "Segment & Flag Inject",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
450,
300
],
"parameters": {
"jsCode": "\nconst d = $input.first().json;\nconst tierMap = {\n enterprise_general_contractor: { label: 'Enterprise General Contractor', osha: true, davisBacon: true },\n mid_market_specialty_contractor_saas: { label: 'Mid-Market Specialty Contractor SaaS', osha: true, davisBacon: false },\n construction_project_management_vendor: { label: 'Construction PM Vendor', osha: false, davisBacon: true },\n building_information_modeling_saas: { label: 'BIM SaaS Vendor', osha: false, davisBacon: false },\n construction_estimating_saas: { label: 'Construction Estimating SaaS', osha: false, davisBacon: false },\n field_service_management_vendor: { label: 'Field Service Management Vendor', osha: true, davisBacon: false },\n owner_developer_proptech: { label: 'Owner/Developer PropTech', osha: false, davisBacon: true }\n};\nconst t = tierMap[d.customer_tier] || { label: 'ConstructionTech SaaS', osha: false, davisBacon: false };\nconst oshaNote = t.osha ? '\\n\\nIMPORTANT: Your OSHA 300 recordkeeping data requires a controlled data perimeter \u2014 routing incident reports through a cloud iPaaS creates a co-employer question under 29 CFR \u00a71904.31 multi-employer worksite rule. Our self-hosted n8n template keeps OSHA data within your system boundary.' : '';\nconst dbNote = t.davisBacon ? '\\n\\nDavis-Bacon Act: Federal contracts require certified payroll submission (DOL WH-347) within 7 days of payroll period end. Our workflow automates weekly payroll package assembly and DOL eCPRS submission.' : '';\nreturn [{ json: { ...d, tierLabel: t.label, oshaNote, dbNote, oshaSubject: t.osha, davisBaconSubject: t.davisBacon } }];\n"
}
},
{
"id": "3",
"name": "Gmail \u2014 Day 1 Welcome",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2,
"position": [
650,
300
],
"parameters": {
"operation": "send",
"to": "={{ $json.email }}",
"subject": "Welcome to FlowKit \u2014 your construction compliance automation is live",
"message": "Hi {{ $json.company_name }},\\n\\nWelcome! Your n8n construction compliance workflows are ready. Here's what's automated on Day 1:\\n\\n\u2022 OSHA 300 log incident recordkeeping\\n\u2022 Davis-Bacon weekly certified payroll tracker\\n\u2022 EPA CGP stormwater inspection scheduler{{ $json.oshaNote }}{{ $json.dbNote }}\\n\\nYour FlowKit team"
}
},
{
"id": "4",
"name": "Wait 3 Days",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
850,
300
],
"parameters": {
"unit": "days",
"amount": 3
}
},
{
"id": "5",
"name": "Gmail \u2014 Day 4 Tips",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2,
"position": [
1050,
300
],
"parameters": {
"operation": "send",
"to": "={{ $json.email }}",
"subject": "Your OSHA & Davis-Bacon compliance clock \u2014 what to automate first",
"message": "Hi {{ $json.company_name }},\\n\\nThree quick wins this week:\\n\\n1. OSHA fatality report \u2014 8-hour clock starts at determination (29 CFR \u00a71904.39). Automate incident detection to OSHA notification.\\n2. Davis-Bacon weekly payroll \u2014 DOL WH-347 due within 7 days of payroll period end. Automate certified payroll assembly.\\n3. EPA CGP inspection \u2014 every 14 days during active land disturbance. Automate inspector scheduling and SWPPP update.\\n\\nAll three are in your FlowKit dashboard.\\n\\nYour FlowKit team"
}
},
{
"id": "6",
"name": "Wait 4 Days",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
1250,
300
],
"parameters": {
"unit": "days",
"amount": 4
}
},
{
"id": "7",
"name": "Gmail \u2014 Day 8 Check-in",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2,
"position": [
1450,
300
],
"parameters": {
"operation": "send",
"to": "={{ $json.email }}",
"subject": "How is your construction compliance automation going?",
"message": "Hi {{ $json.company_name }},\\n\\nWeek one is behind you. A quick check-in:\\n\\n\u2022 Is your OSHA 300 log configured for all active worksites?\\n\u2022 Are Davis-Bacon wage determination IDs loaded for federal projects?\\n\u2022 Has the EPA CGP inspection scheduler run its first 14-day cycle?\\n\\nReply to this email \u2014 I read every response.\\n\\nYour FlowKit team"
}
},
{
"id": "8",
"name": "Wait 6 Days",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
1650,
300
],
"parameters": {
"unit": "days",
"amount": 6
}
},
{
"id": "9",
"name": "Gmail \u2014 Day 14 QBR",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2,
"position": [
1850,
300
],
"parameters": {
"operation": "send",
"to": "={{ $json.email }}",
"subject": "15-minute construction compliance audit \u2014 book your slot",
"message": "Hi {{ $json.company_name }},\\n\\nTwo weeks in. Let's run a 15-minute audit of your construction compliance automation:\\n\\n\u2022 OSHA 300 log coverage \u2014 all worksites configured?\\n\u2022 Davis-Bacon payroll \u2014 weekly submission confirmed?\\n\u2022 EPA CGP \u2014 SWPPP on file for all active permits?\\n\\nBook here: https://calendly.com/flowkithq\\n\\nYour FlowKit team"
}
},
{
"id": "10",
"name": "Log to Sheets",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4,
"position": [
2050,
300
],
"parameters": {
"operation": "append",
"documentId": "YOUR_SHEET_ID",
"sheetName": "onboarding_log",
"columns": {
"mappingMode": "defineBelow",
"value": {
"email": "={{ $json.email }}",
"company": "={{ $json.company_name }}",
"tier": "={{ $json.tierLabel }}",
"ts": "={{ $now.toISO() }}"
}
}
}
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Segment & Flag Inject",
"type": "main",
"index": 0
}
]
]
},
"Segment & Flag Inject": {
"main": [
[
{
"node": "Gmail \u2014 Day 1 Welcome",
"type": "main",
"index": 0
}
]
]
},
"Gmail \u2014 Day 1 Welcome": {
"main": [
[
{
"node": "Wait 3 Days",
"type": "main",
"index": 0
}
]
]
},
"Wait 3 Days": {
"main": [
[
{
"node": "Gmail \u2014 Day 4 Tips",
"type": "main",
"index": 0
}
]
]
},
"Gmail \u2014 Day 4 Tips": {
"main": [
[
{
"node": "Wait 4 Days",
"type": "main",
"index": 0
}
]
]
},
"Wait 4 Days": {
"main": [
[
{
"node": "Gmail \u2014 Day 8 Check-in",
"type": "main",
"index": 0
}
]
]
},
"Gmail \u2014 Day 8 Check-in": {
"main": [
[
{
"node": "Wait 6 Days",
"type": "main",
"index": 0
}
]
]
},
"Wait 6 Days": {
"main": [
[
{
"node": "Gmail \u2014 Day 14 QBR",
"type": "main",
"index": 0
}
]
]
},
"Gmail \u2014 Day 14 QBR": {
"main": [
[
{
"node": "Log to Sheets",
"type": "main",
"index": 0
}
]
]
}
}
}
Workflow 2: OSHA / EPA CGP / Davis-Bacon Compliance Deadline Tracker
Run daily at 7AM. Pulls from a Postgres construction_compliance_deadlines table. Classifies each deadline as OVERDUE/CRITICAL/URGENT/WARNING/NOTICE. Routes actionable items to Slack #construction-compliance and emails the assigned compliance owner.
12 deadline types tracked:
| Deadline Type | Regulation | Clock |
|---|---|---|
| OSHA_FATALITY_REPORT_8H | 29 CFR ยง1904.39(a)(1) | 8 hours โ fastest clock in construction |
| OSHA_SEVERE_INJURY_REPORT_24H | 29 CFR ยง1904.39(a)(2) | 24 hours |
| OSHA_300_LOG_ANNUAL_POST | 29 CFR ยง1904.32 | Feb 1 โ Apr 30 posting window |
| OSHA_300A_SUBMIT_MAR2 | 29 CFR ยง1904.41 | March 2 electronic submission |
| EPA_CGP_SWPPP_SUBMIT | 40 CFR ยง122.26 | Before land disturbance begins |
| EPA_CGP_INSPECTION_14DAY | EPA CGP Part IV | Every 14 days during active construction |
| DAVIS_BACON_WEEKLY_PAYROLL | 40 USC ยง3145 | Weekly WH-347 certified payroll |
| LEED_CERTIFICATION_SUBMISSION | USGBC | Project-specific milestone |
| MECHANIC_LIEN_FILING | State lien law | State-specific (20-90 days from last furnishing) |
| AIA_A201_NOTICE_OF_CLAIM | AIA A201 ยง15.1.2 | 21 days from event |
| BUILDING_PERMIT_RENEWAL | AHJ | Project milestone |
| FAR_SUBCONTRACTOR_CONSENT | FAR 52.244-2 | 14 days before subcontract award |
The OSHA fatality 8-hour clock is the one that catches teams off guard โ it starts at determination that the incident occurred, not at detection. The workflow fires at Slack #construction-critical and emails the safety manager and legal counsel the instant the incident webhook arrives.
Davis-Bacon weekly payroll is the highest-volume deadline: every Friday, certified payrolls for all active federal projects must be assembled and submitted. The workflow auto-generates the WH-347 package from the payroll system API and queues it for the project administrator's review.
{
"name": "ConstructionTech Compliance Deadline Tracker",
"nodes": [
{
"id": "1",
"name": "Daily 7AM Schedule",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
250,
300
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 7 * * *"
}
]
}
}
},
{
"id": "2",
"name": "Postgres \u2014 Compliance Deadlines",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2,
"position": [
450,
300
],
"parameters": {
"operation": "executeQuery",
"query": "SELECT deadline_type, description, due_date, assigned_to, customer_id, project_id FROM construction_compliance_deadlines WHERE due_date <= CURRENT_DATE + INTERVAL '90 days' ORDER BY due_date ASC"
}
},
{
"id": "3",
"name": "Classify Urgency",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
650,
300
],
"parameters": {
"jsCode": "\nconst deadlineLabels = {\n OSHA_FATALITY_REPORT_8H: 'OSHA Fatality Report \u2014 8-hour clock (29 CFR \u00a71904.39(a)(1))',\n OSHA_SEVERE_INJURY_REPORT_24H: 'OSHA Severe Injury Report \u2014 24-hour clock (\u00a71904.39(a)(2))',\n OSHA_300_LOG_ANNUAL_POST: 'OSHA 300 Summary \u2014 Annual Posting Feb 1 to Apr 30 (\u00a71904.32)',\n OSHA_300A_SUBMIT_MAR2: 'OSHA 300A Electronic Submission \u2014 March 2 deadline (\u00a71904.41)',\n EPA_CGP_SWPPP_SUBMIT: 'EPA CGP SWPPP Submission \u2014 Before Land Disturbance (40 CFR \u00a7122.26)',\n EPA_CGP_INSPECTION_14DAY: 'EPA CGP Stormwater Inspection \u2014 Every 14 Days During Active Construction',\n DAVIS_BACON_WEEKLY_PAYROLL: 'Davis-Bacon Certified Payroll \u2014 Weekly WH-347 (40 USC \u00a73145)',\n LEED_CERTIFICATION_SUBMISSION: 'LEED Certification Submission \u2014 USGBC Project Deadline',\n MECHANIC_LIEN_FILING: 'Mechanic Lien Filing \u2014 State-Specific Deadline (varies by state)',\n AIA_A201_NOTICE_OF_CLAIM: 'AIA A201 Notice of Claim \u2014 21 Days from Event (\u00a715.1.2)',\n BUILDING_PERMIT_RENEWAL: 'Building Permit Renewal \u2014 AHJ Project Milestone',\n FAR_SUBCONTRACTOR_CONSENT: 'FAR Subcontractor Consent Notice \u2014 14 Days (FAR 52.244-2)',\n};\nreturn $input.all().map(item => {\n const d = item.json;\n const due = new Date(d.due_date);\n const now = new Date();\n const daysLeft = Math.ceil((due - now) / 86400000);\n let urgency = 'NOTICE';\n if (daysLeft < 0) urgency = 'OVERDUE';\n else if (daysLeft <= 7) urgency = 'CRITICAL';\n else if (daysLeft <= 14) urgency = 'URGENT';\n else if (daysLeft <= 30) urgency = 'WARNING';\n return { json: { ...d, daysLeft, urgency, label: deadlineLabels[d.deadline_type] || d.deadline_type } };\n});\n"
}
},
{
"id": "4",
"name": "Filter Actionable",
"type": "n8n-nodes-base.filter",
"typeVersion": 2,
"position": [
850,
300
],
"parameters": {
"conditions": {
"options": {
"combinator": "or"
},
"conditions": [
{
"leftValue": "={{ $json.urgency }}",
"operator": {
"type": "string",
"operation": "equals"
},
"rightValue": "OVERDUE"
},
{
"leftValue": "={{ $json.urgency }}",
"operator": {
"type": "string",
"operation": "equals"
},
"rightValue": "CRITICAL"
},
{
"leftValue": "={{ $json.urgency }}",
"operator": {
"type": "string",
"operation": "equals"
},
"rightValue": "URGENT"
},
{
"leftValue": "={{ $json.urgency }}",
"operator": {
"type": "string",
"operation": "equals"
},
"rightValue": "WARNING"
}
]
}
}
},
{
"id": "5",
"name": "Slack #construction-compliance",
"type": "n8n-nodes-base.slack",
"typeVersion": 2,
"position": [
1050,
300
],
"parameters": {
"operation": "post",
"channel": "#construction-compliance",
"text": "={{ $json.urgency }}: {{ $json.label }} \u2014 {{ $json.daysLeft }} days left ({{ $json.due_date }}) \u2014 Owner: {{ $json.assigned_to }} \u2014 Project: {{ $json.project_id }}"
}
},
{
"id": "6",
"name": "Gmail \u2014 Compliance Owner",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2,
"position": [
1250,
300
],
"parameters": {
"operation": "send",
"to": "={{ $json.assigned_to }}",
"subject": "[{{ $json.urgency }}] {{ $json.label }} due in {{ $json.daysLeft }} days",
"message": "This construction compliance deadline requires your attention:\\n\\n{{ $json.label }}\\nDue: {{ $json.due_date }} ({{ $json.daysLeft }} days)\\nProject: {{ $json.project_id }}\\nCustomer: {{ $json.customer_id }}\\nUrgency: {{ $json.urgency }}\\n\\nAction required before the deadline to avoid regulatory penalties."
}
}
],
"connections": {
"Daily 7AM Schedule": {
"main": [
[
{
"node": "Postgres \u2014 Compliance Deadlines",
"type": "main",
"index": 0
}
]
]
},
"Postgres \u2014 Compliance Deadlines": {
"main": [
[
{
"node": "Classify Urgency",
"type": "main",
"index": 0
}
]
]
},
"Classify Urgency": {
"main": [
[
{
"node": "Filter Actionable",
"type": "main",
"index": 0
}
]
]
},
"Filter Actionable": {
"main": [
[
{
"node": "Slack #construction-compliance",
"type": "main",
"index": 0
}
]
]
},
"Slack #construction-compliance": {
"main": [
[
{
"node": "Gmail \u2014 Compliance Owner",
"type": "main",
"index": 0
}
]
]
}
}
}
Workflow 3: ConstructionTech Platform API Health Monitor
Five regulatory APIs, each tied to a specific compliance clock. When any goes down, your customer's compliance automation breaks without warning.
APIs monitored:
- OSHA Establishment API โ OSHA 300 log recordkeeping and citation tracking
- EPA eNOI/CGP API โ Construction General Permit Notice of Intent and permit status
- DOL Wages API โ Davis-Bacon wage determination lookup (required before each federal bid)
- AHJ Permit Status API โ Building permit milestone and inspection scheduling
- USGBC LEED API โ LEED certification project status and credit tracking
This workflow fires every 15 minutes, pings all five endpoints in parallel, and pages #platform-ops when any integration is non-responsive.
{
"name": "ConstructionTech API Health Monitor",
"nodes": [
{
"id": "1",
"name": "Every 15 Minutes",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
250,
300
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "*/15 * * * *"
}
]
}
}
},
{
"id": "2",
"name": "OSHA Establishment API",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
450,
200
],
"parameters": {
"url": "{{ $vars.OSHA_ESTABLISHMENT_API }}/health",
"method": "GET",
"timeout": 10000,
"options": {
"response": {
"response": {
"neverError": true
}
}
}
}
},
{
"id": "3",
"name": "EPA eNOI/CGP API",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
450,
300
],
"parameters": {
"url": "{{ $vars.EPA_CGP_ENOI_API }}/health",
"method": "GET",
"timeout": 10000,
"options": {
"response": {
"response": {
"neverError": true
}
}
}
}
},
{
"id": "4",
"name": "DOL Wages API",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
450,
400
],
"parameters": {
"url": "{{ $vars.DOL_WAGES_API }}/health",
"method": "GET",
"timeout": 10000,
"options": {
"response": {
"response": {
"neverError": true
}
}
}
}
},
{
"id": "5",
"name": "AHJ Permit Status API",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
450,
500
],
"parameters": {
"url": "{{ $vars.AHJ_PERMIT_API }}/health",
"method": "GET",
"timeout": 10000,
"options": {
"response": {
"response": {
"neverError": true
}
}
}
}
},
{
"id": "6",
"name": "USGBC LEED API",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
450,
600
],
"parameters": {
"url": "{{ $vars.USGBC_LEED_API }}/health",
"method": "GET",
"timeout": 10000,
"options": {
"response": {
"response": {
"neverError": true
}
}
}
}
},
{
"id": "7",
"name": "Aggregate Results",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
650,
400
],
"parameters": {
"jsCode": "\nconst results = $input.all().map(i => i.json);\nconst failures = results.filter(r => r.status !== 200);\nreturn [{ json: { failures, allHealthy: failures.length === 0, checkedAt: new Date().toISOString() } }];\n"
}
},
{
"id": "8",
"name": "IF Failures",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
850,
400
],
"parameters": {
"conditions": {
"conditions": [
{
"leftValue": "={{ $json.allHealthy }}",
"operator": {
"type": "boolean",
"operation": "false"
}
}
]
}
}
},
{
"id": "9",
"name": "Slack #platform-ops",
"type": "n8n-nodes-base.slack",
"typeVersion": 2,
"position": [
1050,
300
],
"parameters": {
"operation": "post",
"channel": "#platform-ops",
"text": "CONSTRUCTION COMPLIANCE API FAILURE \u2014 {{ $json.failures.length }} endpoint(s) down at {{ $json.checkedAt }}. Affected: {{ JSON.stringify($json.failures) }}"
}
}
],
"connections": {
"Every 15 Minutes": {
"main": [
[
{
"node": "OSHA Establishment API",
"type": "main",
"index": 0
},
{
"node": "EPA eNOI/CGP API",
"type": "main",
"index": 0
},
{
"node": "DOL Wages API",
"type": "main",
"index": 0
},
{
"node": "AHJ Permit Status API",
"type": "main",
"index": 0
},
{
"node": "USGBC LEED API",
"type": "main",
"index": 0
}
]
]
},
"OSHA Establishment API": {
"main": [
[
{
"node": "Aggregate Results",
"type": "main",
"index": 0
}
]
]
},
"EPA eNOI/CGP API": {
"main": [
[
{
"node": "Aggregate Results",
"type": "main",
"index": 0
}
]
]
},
"DOL Wages API": {
"main": [
[
{
"node": "Aggregate Results",
"type": "main",
"index": 0
}
]
]
},
"AHJ Permit Status API": {
"main": [
[
{
"node": "Aggregate Results",
"type": "main",
"index": 0
}
]
]
},
"USGBC LEED API": {
"main": [
[
{
"node": "Aggregate Results",
"type": "main",
"index": 0
}
]
]
},
"Aggregate Results": {
"main": [
[
{
"node": "IF Failures",
"type": "main",
"index": 0
}
]
]
},
"IF Failures": {
"main": [
[
{
"node": "Slack #platform-ops",
"type": "main",
"index": 0
}
],
[]
]
}
}
}
Workflow 4: Construction Regulatory Incident Pipeline
When a construction compliance incident occurs, your customers need the exact regulatory clock, reporting authority, and required action โ within seconds.
8 incident types with regulatory clocks:
| Incident Type | Severity | Clock | Authority |
|---|---|---|---|
| OSHA_FATALITY_INCIDENT | CRITICAL | 8 hours | OSHA Area Office (29 CFR ยง1904.39(a)(1)) |
| OSHA_HOSPITALIZATION_INCIDENT | CRITICAL | 24 hours | OSHA Area Office (ยง1904.39(a)(2)) |
| EPA_CGP_STORMWATER_DISCHARGE | HIGH | 72 hours | EPA / State NPDES authority |
| DAVIS_BACON_PREVAILING_WAGE_VIOLATION | HIGH | 10 business days | DOL Wage and Hour Division (29 CFR ยง5.6) |
| MECHANIC_LIEN_SERVED | HIGH | State-specific | State court (30-90 days to respond) |
| AIA_CONTRACT_CLAIM_SUBMITTED | MEDIUM | 21 days | Initial Decision Maker / Architect (AIA A201 ยง15.1.3) |
| OSHA_FALL_PROTECTION_CITATION | HIGH | 15 biz days to contest | OSHA Area Office (29 CFR ยง1903.17) |
| BUILDING_CODE_VIOLATION_CITED | MEDIUM | AHJ-specified | Authority Having Jurisdiction |
Fastest clock: OSHA_FATALITY_INCIDENT โ 8 hours from determination (29 CFR ยง1904.39(a)(1)). The workflow fires to Slack #construction-critical and emails the safety manager (CC: legal counsel) the instant the incident webhook arrives. All incidents are logged to Postgres for OSHA 300 log and subpoena readiness.
{
"name": "ConstructionTech Regulatory Incident Pipeline",
"nodes": [
{
"id": "1",
"name": "Incident Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
250,
300
],
"parameters": {
"path": "construction-incident",
"httpMethod": "POST"
}
},
{
"id": "2",
"name": "Classify Incident",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
450,
300
],
"parameters": {
"jsCode": "\nconst d = $input.first().json;\nconst incidentMap = {\n OSHA_FATALITY_INCIDENT: {\n severity: 'CRITICAL',\n clock: '8 hours',\n authority: 'OSHA Area Office (29 CFR \u00a71904.39(a)(1))',\n action: 'Report fatality to OSHA within 8 hours. DO NOT disturb the scene. Preserve evidence. Contact safety counsel immediately.',\n osha_form: 'OSHA 301 + 300 Log update'\n },\n OSHA_HOSPITALIZATION_INCIDENT: {\n severity: 'CRITICAL',\n clock: '24 hours',\n authority: 'OSHA Area Office (29 CFR \u00a71904.39(a)(2))',\n action: 'Report in-patient hospitalization, amputation, or eye loss to OSHA within 24 hours. Update OSHA 300 log.',\n osha_form: 'OSHA 301 + 300 Log update'\n },\n EPA_CGP_STORMWATER_DISCHARGE: {\n severity: 'HIGH',\n clock: '72 hours',\n authority: 'EPA Region / State NPDES authority (40 CFR \u00a7122.41(l)(6))',\n action: 'Implement corrective action. Update SWPPP. Document discharge circumstances and corrective measures.',\n osha_form: 'CGP Part IV Corrective Action Log'\n },\n DAVIS_BACON_PREVAILING_WAGE_VIOLATION: {\n severity: 'HIGH',\n clock: '10 business days',\n authority: 'DOL Wage and Hour Division (29 CFR \u00a75.6)',\n action: 'Preserve all payroll records. Contact labor counsel. Prepare back-wage calculation. DOL WHD investigation may follow.',\n osha_form: 'DOL WH-347 correction + SF-1444 if applicable'\n },\n MECHANIC_LIEN_SERVED: {\n severity: 'HIGH',\n clock: 'State-specific (typically 30-90 days to respond)',\n authority: 'State court (lien law varies by state)',\n action: 'Review lien for validity. Identify dispute grounds. Bond over lien if applicable. Contact lien counsel within 72 hours.',\n osha_form: 'N/A \u2014 state court filing'\n },\n AIA_CONTRACT_CLAIM_SUBMITTED: {\n severity: 'MEDIUM',\n clock: '21 days (AIA A201 \u00a715.1.2)',\n authority: 'Initial Decision Maker / Architect',\n action: 'Respond to claim within 21 days per AIA A201 \u00a715.1.3. Gather supporting documentation. Engage project counsel.',\n osha_form: 'AIA G716 or written response'\n },\n OSHA_FALL_PROTECTION_CITATION: {\n severity: 'HIGH',\n clock: '15 business days to contest (29 CFR \u00a71903.17)',\n authority: 'OSHA Compliance Officer / Area Office',\n action: 'Review citation for accuracy. Abate immediately. Decide on informal conference or contest within 15 business days.',\n osha_form: 'OSHA Notice of Contest if contesting'\n },\n BUILDING_CODE_VIOLATION_CITED: {\n severity: 'MEDIUM',\n clock: 'AHJ-specified (typically 30-60 days)',\n authority: 'Authority Having Jurisdiction (local building department)',\n action: 'Review stop-work order or citation. Engage contractor and design team to resolve. Schedule AHJ re-inspection.',\n osha_form: 'AHJ correction notice response'\n }\n};\nconst cfg = incidentMap[d.incident_type] || { severity: 'MEDIUM', clock: '72 hours', authority: 'Legal counsel', action: 'Review incident and consult legal counsel.', osha_form: 'N/A' };\nreturn [{ json: { ...d, ...cfg, ts: new Date().toISOString() } }];\n"
}
},
{
"id": "3",
"name": "Slack #construction-critical",
"type": "n8n-nodes-base.slack",
"typeVersion": 2,
"position": [
650,
200
],
"parameters": {
"operation": "post",
"channel": "#construction-critical",
"text": "{{ $json.severity }} INCIDENT: {{ $json.incident_type }}\\nClock: {{ $json.clock }}\\nAuthority: {{ $json.authority }}\\nAction: {{ $json.action }}\\nProject: {{ $json.project_id }} | Customer: {{ $json.customer_id }}"
}
},
{
"id": "4",
"name": "Gmail \u2014 Safety Manager + Counsel",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2,
"position": [
650,
400
],
"parameters": {
"operation": "send",
"to": "={{ $json.safety_manager_email }}",
"cc": "={{ $json.legal_counsel_email }}",
"subject": "[{{ $json.severity }}] {{ $json.incident_type }} \u2014 {{ $json.clock }} clock running \u2014 Project {{ $json.project_id }}",
"message": "CONSTRUCTION COMPLIANCE INCIDENT ALERT\\n\\nIncident: {{ $json.incident_type }}\\nSeverity: {{ $json.severity }}\\nRegulatory Clock: {{ $json.clock }}\\nReporting Authority: {{ $json.authority }}\\nRequired Action: {{ $json.action }}\\nRequired Form: {{ $json.osha_form }}\\n\\nProject: {{ $json.project_id }}\\nCustomer: {{ $json.customer_id }}\\nDetected: {{ $json.ts }}\\n\\nAct immediately. Reply to confirm action initiated."
}
},
{
"id": "5",
"name": "Log to Postgres",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2,
"position": [
850,
300
],
"parameters": {
"operation": "executeQuery",
"query": "INSERT INTO construction_incident_log (incident_type, severity, clock, project_id, customer_id, detected_at) VALUES ('{{ $json.incident_type }}', '{{ $json.severity }}', '{{ $json.clock }}', '{{ $json.project_id }}', '{{ $json.customer_id }}', '{{ $json.ts }}')"
}
}
],
"connections": {
"Incident Webhook": {
"main": [
[
{
"node": "Classify Incident",
"type": "main",
"index": 0
}
]
]
},
"Classify Incident": {
"main": [
[
{
"node": "Slack #construction-critical",
"type": "main",
"index": 0
},
{
"node": "Gmail \u2014 Safety Manager + Counsel",
"type": "main",
"index": 0
}
]
]
},
"Slack #construction-critical": {
"main": [
[
{
"node": "Log to Postgres",
"type": "main",
"index": 0
}
]
]
},
"Gmail \u2014 Safety Manager + Counsel": {
"main": [
[
{
"node": "Log to Postgres",
"type": "main",
"index": 0
}
]
]
}
}
}
Workflow 5: Weekly ConstructionTech SaaS KPI Dashboard
Runs Monday 8AM. Two Postgres queries run in parallel โ customer/MRR metrics and open compliance deadline counts. A Code node computes week-over-week change using $getWorkflowStaticData (no extra metrics table). HTML report to CEO + COO (BCC: CTO).
KPIs tracked:
- Active customers + WoW change
- MRR + WoW % change
- OSHA Recordkeeping active accounts
- Davis-Bacon active accounts
- OSHA open deadlines (next 30 days)
- EPA CGP open deadlines (next 30 days)
- Davis-Bacon open deadlines (next 30 days)
- Mechanic's Lien open deadlines (next 30 days)
{
"name": "Weekly ConstructionTech SaaS KPI Dashboard",
"nodes": [
{
"id": "1",
"name": "Monday 8AM",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
250,
300
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 8 * * 1"
}
]
}
}
},
{
"id": "2",
"name": "Customer Metrics Query",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2,
"position": [
450,
200
],
"parameters": {
"operation": "executeQuery",
"query": "SELECT COUNT(*) as active_customers, SUM(mrr_usd) as total_mrr, COUNT(CASE WHEN osha_recordkeeping_active THEN 1 END) as osha_active, COUNT(CASE WHEN davis_bacon_active THEN 1 END) as davis_bacon_active FROM construction_customers WHERE status = 'active'"
}
},
{
"id": "3",
"name": "Compliance Open Items Query",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2,
"position": [
450,
400
],
"parameters": {
"operation": "executeQuery",
"query": "SELECT COUNT(CASE WHEN deadline_type LIKE 'OSHA%' AND due_date <= CURRENT_DATE + 30 THEN 1 END) as osha_open, COUNT(CASE WHEN deadline_type LIKE 'EPA%' AND due_date <= CURRENT_DATE + 30 THEN 1 END) as epa_open, COUNT(CASE WHEN deadline_type LIKE 'DAVIS%' AND due_date <= CURRENT_DATE + 30 THEN 1 END) as davis_open, COUNT(CASE WHEN deadline_type LIKE 'MECH%' AND due_date <= CURRENT_DATE + 30 THEN 1 END) as lien_open FROM construction_compliance_deadlines WHERE due_date <= CURRENT_DATE + INTERVAL '30 days'"
}
},
{
"id": "4",
"name": "Compute WoW Change",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
650,
300
],
"parameters": {
"jsCode": "\nconst prev = $getWorkflowStaticData('global');\nconst customers = $input.all()[0].json;\nconst compliance = $input.all()[1].json;\nconst prevMrr = prev.lastMrr || 0;\nconst prevCustomers = prev.lastCustomers || 0;\nconst mrrChange = prevMrr ? (((customers.total_mrr - prevMrr) / prevMrr) * 100).toFixed(1) : 'N/A';\nconst customerChange = customers.active_customers - prevCustomers;\nprev.lastMrr = customers.total_mrr;\nprev.lastCustomers = customers.active_customers;\n$setWorkflowStaticData('global', prev);\nreturn [{ json: { ...customers, ...compliance, mrrChange, customerChange } }];\n"
}
},
{
"id": "5",
"name": "Build HTML Report",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
850,
300
],
"parameters": {
"jsCode": "\nconst d = $input.first().json;\nconst html = `<h2>ConstructionTech SaaS Weekly KPI</h2>\n<table border=\"1\" cellpadding=\"6\">\n<tr><th>Metric</th><th>This Week</th><th>Change</th></tr>\n<tr><td>Active Customers</td><td>${d.active_customers}</td><td>${d.customerChange > 0 ? '+' : ''}${d.customerChange}</td></tr>\n<tr><td>MRR (USD)</td><td>$${Number(d.total_mrr || 0).toLocaleString()}</td><td>${d.mrrChange}%</td></tr>\n<tr><td>OSHA Recordkeeping Active</td><td>${d.osha_active}</td><td>\u2014</td></tr>\n<tr><td>Davis-Bacon Active</td><td>${d.davis_bacon_active}</td><td>\u2014</td></tr>\n<tr><td>OSHA Open Deadlines (30d)</td><td>${d.osha_open}</td><td>\u2014</td></tr>\n<tr><td>EPA CGP Open Deadlines (30d)</td><td>${d.epa_open}</td><td>\u2014</td></tr>\n<tr><td>Davis-Bacon Open Deadlines (30d)</td><td>${d.davis_open}</td><td>\u2014</td></tr>\n<tr><td>Mechanic Lien Open Deadlines (30d)</td><td>${d.lien_open}</td><td>\u2014</td></tr>\n</table>`;\nreturn [{ json: { html, subject: 'ConstructionTech SaaS Weekly KPI \u2014 ' + new Date().toISOString().slice(0,10) } }];\n"
}
},
{
"id": "6",
"name": "Gmail \u2014 CEO + COO",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2,
"position": [
1050,
300
],
"parameters": {
"operation": "send",
"to": "={{ $vars.CEO_EMAIL }}",
"cc": "={{ $vars.COO_EMAIL }}",
"bcc": "={{ $vars.CTO_EMAIL }}",
"subject": "={{ $json.subject }}",
"message": "={{ $json.html }}",
"emailType": "html"
}
}
],
"connections": {
"Monday 8AM": {
"main": [
[
{
"node": "Customer Metrics Query",
"type": "main",
"index": 0
},
{
"node": "Compliance Open Items Query",
"type": "main",
"index": 0
}
]
]
},
"Customer Metrics Query": {
"main": [
[
{
"node": "Compute WoW Change",
"type": "main",
"index": 0
}
]
]
},
"Compliance Open Items Query": {
"main": [
[
{
"node": "Compute WoW Change",
"type": "main",
"index": 0
}
]
]
},
"Compute WoW Change": {
"main": [
[
{
"node": "Build HTML Report",
"type": "main",
"index": 0
}
]
]
},
"Build HTML Report": {
"main": [
[
{
"node": "Gmail \u2014 CEO + COO",
"type": "main",
"index": 0
}
]
]
}
}
}
Why Self-Hosted n8n Is the Right Architecture for ConstructionTech SaaS
| Requirement | Why cloud iPaaS fails | Why self-hosted n8n solves it |
|---|---|---|
| OSHA 300 log data residency | OSHA ยง1904.31 multi-employer worksite rule creates co-employer risk when incident data transits a vendor's cloud | Self-hosted keeps OSHA data within the contractor's network boundary โ vendor never touches the data |
| Davis-Bacon certified payroll | WH-347 payroll data contains employee SSNs and wages โ cloud routing creates unnecessary exposure | On-premise keeps payroll data off third-party servers; DOL WHD subpoena stays within your perimeter |
| EPA CGP SWPPP confidentiality | SWPPP site maps and pollution control plans contain commercially sensitive site intelligence | Self-hosted keeps stormwater data local โ no environmental liability exposure to cloud providers |
| Mechanic's lien evidence chain | Lien rights turn on provable notice and delivery dates โ cloud iPaaS logs are third-party records | Postgres on your infrastructure = court-producible notice delivery history |
| OSHA inspection preparedness | OSHA Area Office can request your workflow logs during an inspection โ cloud iPaaS logs are outside your control | Self-hosted n8n keeps workflow audit logs in your system; you control what is produced |
Get These Workflows
All five workflows are in the FlowKit n8n ConstructionTech Compliance Pack. Import JSON directly into your n8n instance โ no cloud dependency, full source access.
What's included:
- All 5 workflows above (import-ready JSON)
- Pre-built Postgres schema for
construction_compliance_deadlinesandconstruction_customers - 12-type deadline matrix with regulatory citations and clock tables
- OSHA 300 log recordkeeping field mapping guide
- Davis-Bacon WH-347 assembly automation checklist
โ https://stripeai.gumroad.com
Questions? Drop them in the comments โ I read every one.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.