AutomationFlowsWeb Scraping › Lab 09 - Maintenance Report → Actions - Inspectable

Lab 09 - Maintenance Report → Actions - Inspectable

LAB 09 - Maintenance Report → Actions - Inspectable. Uses httpRequest. Event-driven trigger; 46 nodes.

Event trigger★★★★★ complexity46 nodesHTTP Request
Web Scraping Trigger: Event Nodes: 46 Complexity: ★★★★★ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "LAB 09 - Maintenance Report \u2192 Actions - Inspectable",
  "nodes": [
    {
      "parameters": {
        "content": "# LAB 09: Wartungsbericht in Ma\u00dfnahmen \u00fcberf\u00fchren\n\n**Buyer:** Instandhaltungsleitung / Service Operations\n\n**Problem:** Freitextberichte enthalten Befunde, Ersatzteile und offene Arbeiten. Ohne klare Ma\u00dfnahmen, Verantwortliche und Fristen verschwinden Punkte in PDFs.\n\n**Result:** Befunde werden mit Quelle in priorisierte Ma\u00dfnahmen \u00fcberf\u00fchrt; unklare Schweregrade bleiben zur Pr\u00fcfung offen.\n\nInput \u2192 contract \u2192 idempotency \u2192 context \u2192 deterministic rules \u2192 exception \u2192 human decision \u2192 draft.",
        "width": 840,
        "height": 300,
        "color": 2
      },
      "id": "00378c71-ff37-4ade-ae37-894bfd3787b8",
      "name": "Note 01 - Business Flow",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1240,
        -720
      ]
    },
    {
      "parameters": {
        "content": "# Contract and evidence\n\n- Six synthetic cases: happy, review, stop, duplicate, dependency failure and invalid payload.\n- Source references stay attached to findings.\n- Missing critical facts are never inferred.\n- Correlation and idempotency keys are created before any adapter boundary.",
        "width": 840,
        "height": 300,
        "color": 4
      },
      "id": "000c80f8-010c-428b-a20c-841e030c85b1",
      "name": "Note 02 - Contract & Evidence",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -300,
        -720
      ]
    },
    {
      "parameters": {
        "content": "# Reliability controls\n\n- Atomic claim is represented by a deterministic test double.\n- Duplicate delivery returns the previous outcome.\n- Only transient failures enter a bounded retry envelope.\n- Retry budget: 3 attempts; no unbounded loop.\n- Invalid data enters a redacted repair queue.",
        "width": 840,
        "height": 300,
        "color": 3
      },
      "id": "ac4ee612-ad4e-47a5-aa4e-e2ecab4ee47f",
      "name": "Note 03 - Reliability Controls",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        660,
        -720
      ]
    },
    {
      "parameters": {
        "content": "# Domain guardrails\n\nContext: Installed Base + CMMS-Aufgaben (mocked adapter).\n\nThe workflow classifies each case as review-ready, review-required or stopped. Domain rules\u2014not an LLM prompt\u2014own the stop decision.",
        "width": 840,
        "height": 300,
        "color": 5
      },
      "id": "e5eec316-e6ee-44a9-a3ee-bff0e4eec183",
      "name": "Note 04 - Domain Guardrails",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1640,
        -720
      ]
    },
    {
      "parameters": {
        "content": "# Human-controlled decision\n\nOwner: Instandhaltungsleitung.\n\nApprove, reject or request information. The approval is version-bound. The external adapter is visible but disabled; every test run reports zero external writes.",
        "width": 840,
        "height": 300,
        "color": 6
      },
      "id": "fd8e1a3b-fc8e-48a8-af8e-1d61fe8e1bce",
      "name": "Note 05 - Human Boundary",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2640,
        -720
      ]
    },
    {
      "parameters": {
        "content": "# Test matrix\n\n1. Nominal input reaches review-ready.\n2. Recoverable deviation explains its evidence.\n3. Critical ambiguity stops.\n4. Replay is idempotent.\n5. Dependency outage schedules bounded retry.\n6. Invalid contract is redacted and quarantined.\n\nStatus: Synthetic Demo \u00b7 Built and testable \u00b7 not customer validated.",
        "width": 900,
        "height": 340,
        "color": 7
      },
      "id": "cfdc6f77-cedc-4de4-a1dc-729dd0dc710a",
      "name": "Note 06 - Test Matrix",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3640,
        -720
      ]
    },
    {
      "parameters": {},
      "id": "17a10d61-16a1-4bce-a5a1-0a3b14a108a8",
      "name": "Manual Test Start",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -1240,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "const fixtures = [{\"id\":\"clear-findings\",\"label\":\"Klare Ma\u00dfnahmen\",\"kind\":\"happy\",\"input\":{\"eventId\":\"MNT-DEMO-9001\",\"report\":\"Wartung_MX-24-0187.pdf\",\"machineNumber\":\"MX-24-0187\",\"findings\":[{\"text\":\"F\u00fchrungswagen Y zeigt erh\u00f6htes Spiel\",\"severity\":\"mittel\",\"part\":\"HM-LIN-25\",\"owner\":\"Mechanik\",\"deadline\":\"2026-09-05\"},{\"text\":\"Filtermatte Schaltschrank verschmutzt\",\"severity\":\"niedrig\",\"part\":\"HM-FLT-300\",\"owner\":\"Instandhaltung\",\"deadline\":\"2026-08-20\"}]}},{\"id\":\"missing-owner\",\"label\":\"Verantwortung offen\",\"kind\":\"edge\",\"input\":{\"eventId\":\"MNT-DEMO-9002\",\"report\":\"Service_PX8.pdf\",\"machineNumber\":\"PX-8-0091\",\"findings\":[{\"text\":\"Druckregler schwankt au\u00dferhalb Sollbereich\",\"severity\":\"hoch\",\"part\":\"HM-REG-08\",\"owner\":null,\"deadline\":\"2026-08-18\"}]}},{\"id\":\"unclear-severity\",\"label\":\"Schweregrad unklar\",\"kind\":\"error\",\"input\":{\"eventId\":\"MNT-DEMO-9003\",\"report\":\"Wartung_AS17.pdf\",\"machineNumber\":\"AS-17-0033\",\"findings\":[{\"text\":\"Riss an Halterung festgestellt\",\"severity\":null,\"part\":null,\"owner\":null,\"deadline\":null}]}},{\"id\":\"clear-findings-replay\",\"label\":\"Doppelte Zustellung\",\"kind\":\"duplicate\",\"input\":{\"eventId\":\"MNT-DEMO-9001\",\"report\":\"Wartung_MX-24-0187.pdf\",\"machineNumber\":\"MX-24-0187\",\"findings\":[{\"text\":\"F\u00fchrungswagen Y zeigt erh\u00f6htes Spiel\",\"severity\":\"mittel\",\"part\":\"HM-LIN-25\",\"owner\":\"Mechanik\",\"deadline\":\"2026-09-05\"},{\"text\":\"Filtermatte Schaltschrank verschmutzt\",\"severity\":\"niedrig\",\"part\":\"HM-FLT-300\",\"owner\":\"Instandhaltung\",\"deadline\":\"2026-08-20\"}]}},{\"id\":\"clear-findings-dependency\",\"label\":\"Tempor\u00e4rer Adapterfehler\",\"kind\":\"dependency\",\"input\":{\"eventId\":\"MNT-DEMO-9001-DEP\",\"report\":\"Wartung_MX-24-0187.pdf\",\"machineNumber\":\"MX-24-0187\",\"findings\":[{\"text\":\"F\u00fchrungswagen Y zeigt erh\u00f6htes Spiel\",\"severity\":\"mittel\",\"part\":\"HM-LIN-25\",\"owner\":\"Mechanik\",\"deadline\":\"2026-09-05\"},{\"text\":\"Filtermatte Schaltschrank verschmutzt\",\"severity\":\"niedrig\",\"part\":\"HM-FLT-300\",\"owner\":\"Instandhaltung\",\"deadline\":\"2026-08-20\"}],\"adapterAvailable\":false,\"retryAttempt\":1}},{\"id\":\"clear-findings-invalid\",\"label\":\"Ung\u00fcltiger Eingangsvertrag\",\"kind\":\"invalid\",\"input\":{\"eventId\":null,\"report\":\"Wartung_MX-24-0187.pdf\",\"machineNumber\":\"MX-24-0187\",\"findings\":[{\"text\":\"F\u00fchrungswagen Y zeigt erh\u00f6htes Spiel\",\"severity\":\"mittel\",\"part\":\"HM-LIN-25\",\"owner\":\"Mechanik\",\"deadline\":\"2026-09-05\"},{\"text\":\"Filtermatte Schaltschrank verschmutzt\",\"severity\":\"niedrig\",\"part\":\"HM-FLT-300\",\"owner\":\"Instandhaltung\",\"deadline\":\"2026-08-20\"}]}}];\nreturn fixtures.map((fixture) => ({ json: { workflowId: 'maintenance-actions', evidenceType: 'Synthetic Demo', ...fixture } }));"
      },
      "id": "b48dcb9c-b58d-4d2f-a68d-cec2b78dd055",
      "name": "Load 6 Synthetic Test Cases",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -1020,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item, index) => ({ json: {\n  workflowId: item.json.workflowId,\n  workflowTitle: \"Maintenance Report \u2192 Actions\",\n  implementationStatus: 'Built and testable',\n  adapterStatus: 'Mocked adapter',\n  evidenceType: item.json.evidenceType,\n  scenario: item.json.id,\n  scenarioLabel: item.json.label,\n  fixtureKind: item.json.kind,\n  sourceType: \"Techniker- oder Wartungsbericht\",\n  sourceInput: item.json.input,\n  correlationId: item.json.input?.eventId ?? `INVALID-MNT-${String(index + 1).padStart(2, '0')}`,\n  idempotencyKey: item.json.input?.eventId ?? null,\n  retry: { attempt: Number(item.json.input?.retryAttempt ?? 0), maxAttempts: 3, policy: 'transient_only' },\n  adapter: { name: \"Installed Base + CMMS-Aufgaben\", mode: 'mock', available: item.json.kind !== 'dependency', writesPerformed: 0 },\n  processing: [],\n  audit: [{ state: 'INPUT_RECEIVED', detail: item.json.id, at: '2026-08-13T12:00:00.000Z' }]\n} }));"
      },
      "id": "eb836346-ec83-44d9-a983-6020ea8361b3",
      "name": "Normalize Intake Envelope",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -800,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => {\n  const missing = [];\n  if (!item.json.sourceInput || typeof item.json.sourceInput !== 'object') missing.push('sourceInput');\n  if (!item.json.sourceInput?.eventId) missing.push('eventId');\n  return { json: { ...item.json, validation: { valid: missing.length === 0, missing, schema: 'MNT_INTAKE_V1' }, audit: [...item.json.audit, { state: 'CONTRACT_VALIDATED', detail: missing.length ? missing.join(',') : 'valid', at: '2026-08-13T12:00:10.000Z' }] } };\n});"
      },
      "id": "45aa5fb9-44aa-4e26-a3aa-5c9342aa5b00",
      "name": "Validate Required Contract",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -580,
        0
      ]
    },
    {
      "parameters": {
        "mode": "expression",
        "numberOutputs": 2,
        "output": "={{ $json.validation.valid ? 0 : 1 }}"
      },
      "id": "99f48d65-98f4-4bd2-a7f4-8a3f96f488ac",
      "name": "Route Contract Status",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4,
      "position": [
        -360,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, status: 'INVALID_INPUT', errorClass: 'business_validation', retryable: false, exceptions: [{ code: 'INVALID_CONTRACT', severity: 'stop', message: `Missing: ${item.json.validation.missing.join(', ')}` }], externalWritePerformed: false } }));"
      },
      "id": "7499f055-7399-4ec2-a299-ed2f7199eb9c",
      "name": "Classify Validation Error",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -100,
        500
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, sourceInput: { redacted: true, sourceType: item.json.sourceType }, redaction: { applied: true, retained: ['correlationId', 'scenario', 'errorClass'] } } }));"
      },
      "id": "d86f8fac-d96f-413f-aa6f-92d2db6f9465",
      "name": "Redact Invalid Payload",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        140,
        500
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, audit: [...item.json.audit, { state: 'MANUAL_DATA_REPAIR', detail: 'invalid_contract', at: '2026-08-13T12:00:20.000Z' }] } }));"
      },
      "id": "6305d0ca-6405-425d-a105-cda46205cf37",
      "name": "Audit Validation Failure",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        380,
        500
      ]
    },
    {
      "parameters": {},
      "id": "0fa71dd5-0ea7-4c42-ada7-1aaf0ca7191c",
      "name": "Terminal - Manual Data Repair",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        620,
        500
      ]
    },
    {
      "parameters": {
        "jsCode": "const claimed = new Set();\nreturn items.map((item) => {\n  const key = item.json.idempotencyKey;\n  const duplicate = item.json.fixtureKind === 'duplicate' || claimed.has(key);\n  if (!duplicate) claimed.add(key);\n  return { json: { ...item.json, idempotency: { key, claimed: !duplicate, duplicate, store: 'atomic_test_double' }, audit: [...item.json.audit, { state: duplicate ? 'DUPLICATE_DETECTED' : 'IDEMPOTENCY_CLAIMED', detail: key, at: '2026-08-13T12:00:30.000Z' }] } };\n});"
      },
      "id": "c4eb277f-c3eb-45ec-a6eb-2aa5c5eb2912",
      "name": "Claim Idempotency Key [MOCK]",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -100,
        0
      ]
    },
    {
      "parameters": {
        "mode": "expression",
        "numberOutputs": 2,
        "output": "={{ $json.idempotency.duplicate ? 1 : 0 }}"
      },
      "id": "c355900c-c455-419f-a555-9332c65594c5",
      "name": "Route Replay Status",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4,
      "position": [
        140,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, status: 'DUPLICATE_REPLAY', previousOutcome: { status: 'READY_FOR_REVIEW', reference: item.json.idempotencyKey }, externalWritePerformed: false } }));"
      },
      "id": "e91f63f7-e81f-4264-ab1f-671dea1f658a",
      "name": "Load Previous Outcome [MOCK]",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        380,
        280
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, audit: [...item.json.audit, { state: 'REPLAY_SAFE_RETURN', detail: 'no_second_processing', at: '2026-08-13T12:00:40.000Z' }] } }));"
      },
      "id": "9082798a-9182-4b1d-ae82-76648f8277f7",
      "name": "Audit Duplicate Delivery",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        620,
        280
      ]
    },
    {
      "parameters": {},
      "id": "b654d151-b554-4fbe-a454-ce2bb354cc98",
      "name": "Terminal - Replay Safe",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        860,
        280
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, contextLookup: { source: \"Installed Base + CMMS-Aufgaben\", status: item.json.adapter.available ? 'available' : 'unavailable', synthetic: true }, audit: [...item.json.audit, { state: 'CONTEXT_LOOKUP', detail: item.json.adapter.available ? 'ok' : '503_test_double', at: '2026-08-13T12:00:50.000Z' }] } }));"
      },
      "id": "3aabfb36-3bab-4cc9-a8ab-f81039abf9a3",
      "name": "Load Installed Base + CMMS-Aufgaben [MOCK]",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        380,
        0
      ]
    },
    {
      "parameters": {
        "mode": "expression",
        "numberOutputs": 2,
        "output": "={{ $json.adapter.available ? 0 : 1 }}"
      },
      "id": "51a2096a-52a2-4afd-afa2-064450a207d7",
      "name": "Route Dependency Health",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4,
      "position": [
        620,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, status: 'DEPENDENCY_UNAVAILABLE', errorClass: 'external_transient', retryable: true, retry: { ...item.json.retry, attempt: item.json.retry.attempt || 1 }, externalWritePerformed: false } }));"
      },
      "id": "5133a9b1-5033-481e-af33-a68b4e33a4f8",
      "name": "Classify Transient Dependency Failure",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        860,
        500
      ]
    },
    {
      "parameters": {
        "mode": "expression",
        "numberOutputs": 2,
        "output": "={{ $json.retry.retryable === false || $json.retry.attempt >= $json.retry.maxAttempts ? 1 : 0 }}"
      },
      "id": "d46d7a67-d36d-48d4-a66d-7d8dd56d7bfa",
      "name": "Route Retry Budget",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4,
      "position": [
        1100,
        500
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, retry: { ...item.json.retry, nextAttempt: item.json.retry.attempt + 1, backoffSeconds: Math.min(60, 2 ** item.json.retry.attempt) + 1, jitterPolicy: 'deterministic_test_value' } } }));"
      },
      "id": "dc62b26d-db62-40da-aa62-af47d962adb4",
      "name": "Plan Backoff + Jitter",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1340,
        420
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, retryEnvelope: { correlationId: item.json.correlationId, idempotencyKey: item.json.idempotencyKey, nextAttempt: item.json.retry.nextAttempt, payloadRedacted: true }, audit: [...item.json.audit, { state: 'RETRY_SCHEDULED', detail: `attempt_${item.json.retry.nextAttempt}`, at: '2026-08-13T12:01:00.000Z' }] } }));"
      },
      "id": "757f2bea-767f-4d7d-a37f-28c4747f2a57",
      "name": "Persist Retry Envelope [MOCK]",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1580,
        420
      ]
    },
    {
      "parameters": {},
      "id": "79b8f824-7ab8-49b7-abb8-fb4a7cb8fcdd",
      "name": "Terminal - Bounded Retry Queue",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1820,
        420
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, status: 'TERMINAL_DEPENDENCY_FAILURE', incident: { severity: 'high', correlationId: item.json.correlationId, errorClass: item.json.errorClass, payloadIncluded: false }, externalWritePerformed: false } }));"
      },
      "id": "da8c93a5-d98c-4212-a88c-907fd78c8eec",
      "name": "Build Redacted Technical Incident",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1340,
        620
      ]
    },
    {
      "parameters": {},
      "id": "de7bc6ee-df7b-4881-ac7b-c3c8dd7bc55b",
      "name": "Terminal - Operator Action",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1580,
        620
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, processing: [...(item.json.processing ?? []), { order: 1, step: \"Befunde mit Quellen extrahieren\", status: 'completed', sourceBound: true }], audit: [...item.json.audit, { state: 'DOMAIN_STAGE_1', detail: \"Befunde mit Quellen extrahieren\", at: '2026-08-13T12:00:00.000Z' }] } }));"
      },
      "id": "c6e44fad-c5e4-4e1a-a4e4-4c87c3e44af4",
      "name": "Befunde mit Quellen extrahieren",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        860,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, processing: [...(item.json.processing ?? []), { order: 2, step: \"Maschine im Installed Base aufl\u00f6sen [MOCK]\", status: 'completed', sourceBound: true }], audit: [...item.json.audit, { state: 'DOMAIN_STAGE_2', detail: \"Maschine im Installed Base aufl\u00f6sen [MOCK]\", at: '2026-08-13T12:01:00.000Z' }] } }));"
      },
      "id": "a690df08-a790-409b-a890-e22ea990e3c1",
      "name": "Maschine im Installed Base aufl\u00f6sen [MOCK]",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1100,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, processing: [...(item.json.processing ?? []), { order: 3, step: \"Ersatzteile und Zust\u00e4ndigkeiten erg\u00e4nzen [MOCK]\", status: 'completed', sourceBound: true }], audit: [...item.json.audit, { state: 'DOMAIN_STAGE_3', detail: \"Ersatzteile und Zust\u00e4ndigkeiten erg\u00e4nzen [MOCK]\", at: '2026-08-13T12:02:00.000Z' }] } }));"
      },
      "id": "9d31fc77-9c31-4ae4-af31-ff9d9e31fe0a",
      "name": "Ersatzteile und Zust\u00e4ndigkeiten erg\u00e4nzen [MOCK]",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1340,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, processing: [...(item.json.processing ?? []), { order: 4, step: \"Schweregrad, Frist und Vollst\u00e4ndigkeit pr\u00fcfen\", status: 'completed', sourceBound: true }], audit: [...item.json.audit, { state: 'DOMAIN_STAGE_4', detail: \"Schweregrad, Frist und Vollst\u00e4ndigkeit pr\u00fcfen\", at: '2026-08-13T12:03:00.000Z' }] } }));"
      },
      "id": "24e37a2a-25e3-4bbd-a2e3-770423e37897",
      "name": "Schweregrad, Frist und Vollst\u00e4ndigkeit pr\u00fcfen",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1580,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => {\n  const input = item.json.sourceInput ?? {};\n  const issues = [];\n  const signals = [];\n  const issue = (code, severity, message, evidence = []) => ({ code, severity, message, evidence });\n  \nconst findings = Array.isArray(input.findings) ? input.findings : [];\nif (findings.some((finding) => /riss/i.test(finding.text ?? '') && !finding.severity)) issues.push(issue('POTENTIAL_SAFETY_FINDING', 'stop', 'Ein Riss ohne Lage- und Sicherheitsbewertung muss manuell eskaliert werden.'));\nif (findings.some((finding) => !finding.owner || !finding.deadline)) issues.push(issue('ACTION_OWNER_OR_DEADLINE_MISSING', 'review', 'Mindestens eine Ma\u00dfnahme hat keinen Verantwortlichen oder keine Frist.'));\nif (findings.some((finding) => !finding.part)) signals.push('part_identification_open');\n  const status = issues.some((entry) => entry.severity === 'stop')\n    ? 'STOPPED_FOR_REVIEW'\n    : issues.some((entry) => entry.severity === 'review')\n      ? 'REVIEW_REQUIRED'\n      : 'READY_FOR_REVIEW';\n  return { json: {\n    ...item.json,\n    decision: { status, derivedBy: 'deterministic_guardrails', humanRequired: true },\n    exceptions: issues,\n    signals,\n    audit: [...item.json.audit, { state: 'GUARDRAILS_EVALUATED', detail: status, at: '2026-08-13T12:05:00.000Z' }]\n  } };\n});"
      },
      "id": "f2fa8799-f1fa-4606-a0fa-8473effa82e0",
      "name": "Evaluate Deterministic Guardrails",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1820,
        0
      ]
    },
    {
      "parameters": {
        "mode": "expression",
        "numberOutputs": 3,
        "output": "={{ ({ READY_FOR_REVIEW: 0, REVIEW_REQUIRED: 1, STOPPED_FOR_REVIEW: 2 })[$json.decision.status] ?? 2 }}"
      },
      "id": "bd63d555-bc63-43c2-ab63-d22fba63d09c",
      "name": "Route Business Outcome",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4,
      "position": [
        2060,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, route: 'ready', reviewMessage: 'Pr\u00fcfung vollst\u00e4ndig; fachliche Freigabe bleibt erforderlich.' } }));"
      },
      "id": "c7f7db46-c8f7-4cd9-a5f7-d820c6f7d9b3",
      "name": "Prepare Review-Ready Candidate",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2300,
        -180
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, route: 'review', reviewMessage: 'Abweichung mit Quelle und empfohlener R\u00fcckfrage vorbereitet.' } }));"
      },
      "id": "0d191e38-0e19-4fcb-af19-215e101922f1",
      "name": "Explain Review Exceptions",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2300,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, route: 'stopped', reviewMessage: 'Kritischer Stop: keine automatische Fortsetzung.' } }));"
      },
      "id": "7bbe0b63-7abe-49d0-adbe-0e897cbe0cf6",
      "name": "Quarantine Critical Case",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2300,
        180
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, humanDecision: { state: 'pending', owner: \"Instandhaltungsleitung\", allowed: ['approve', 'reject', 'request_information'], approvalVersion: `${item.json.correlationId}:v1` }, externalWritePerformed: false, audit: [...item.json.audit, { state: 'HUMAN_REVIEW_PENDING', detail: item.json.decision.status, at: '2026-08-13T12:06:00.000Z' }] } }));"
      },
      "id": "fd4a8920-fe4a-4ab3-af4a-8c46004a8dd9",
      "name": "Human Decision Required",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2560,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, preparedOutput: { target: \"CMMS Ma\u00dfnahmenentwurf\", mode: 'draft_only', sourceEvent: item.json.correlationId, status: item.json.decision.status, exceptionCodes: item.json.exceptions.map((entry) => entry.code), approvalVersion: item.json.humanDecision.approvalVersion }, adapter: { ...item.json.adapter, writesPerformed: 0 } } }));"
      },
      "id": "3485a2a6-3585-4439-a285-9f803385a113",
      "name": "Build CMMS Ma\u00dfnahmenentwurf Draft",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2800,
        0
      ]
    },
    {
      "parameters": {
        "mode": "expression",
        "numberOutputs": 3,
        "output": "={{ ({ pending: 0, approved: 1, rejected: 2 })[$json.humanDecision.state] ?? 0 }}"
      },
      "id": "f9a424c4-faa4-4657-aba4-27eafca4297d",
      "name": "Route Human Decision",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.4,
      "position": [
        3040,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, terminalState: 'PENDING_HUMAN_REVIEW', queue: { owner: item.json.humanDecision.owner, synthetic: true }, externalWritePerformed: false } }));"
      },
      "id": "da2d7190-db2d-4323-ac2d-74b6dd2d7649",
      "name": "Queue for Owner Review [MOCK]",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        3280,
        -160
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://example.invalid/test-adapter",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Idempotency-Key",
              "value": "={{ $json.idempotencyKey }}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "={{ JSON.stringify($json.preparedOutput) }}",
        "options": {
          "timeout": 5000
        }
      },
      "id": "b99cecfd-b89c-4b6a-a79c-e9d7b69ce844",
      "name": "[DISABLED] CMMS Ma\u00dfnahmenentwurf Test Adapter",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3280,
        0
      ],
      "disabled": true,
      "onError": "stopWorkflow",
      "notes": "Intentionally disabled. Assign a test credential and test endpoint only in a future approved integration goal."
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, terminalState: 'REJECTED_BY_HUMAN', preparedOutput: null, externalWritePerformed: false } }));"
      },
      "id": "977b1e25-967b-4c92-a57b-1aff947b196c",
      "name": "Close Rejected Draft",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        3280,
        160
      ]
    },
    {
      "parameters": {
        "jsCode": "return items.map((item) => ({ json: { ...item.json, externalWritePerformed: false, adapter: { ...item.json.adapter, writesPerformed: 0 }, audit: [...item.json.audit, { state: item.json.terminalState ?? 'ADAPTER_DRY_RUN', detail: 'zero_external_writes', at: '2026-08-13T12:07:00.000Z' }] } }));"
      },
      "id": "eaab98ab-e9ab-4718-acab-9bd1ebab9a3e",
      "name": "Append Final Audit Event [MOCK]",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        3540,
        0
      ]
    },
    {
      "parameters": {},
      "id": "12b56782-13b5-4915-a0b5-645c11b565ef",
      "name": "Terminal - Inspectable Review Package",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        3800,
        0
      ]
    }
  ],
  "connections": {
    "Manual Test Start": {
      "main": [
        [
          {
            "node": "Load 6 Synthetic Test Cases",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load 6 Synthetic Test Cases": {
      "main": [
        [
          {
            "node": "Normalize Intake Envelope",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Intake Envelope": {
      "main": [
        [
          {
            "node": "Validate Required Contract",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Required Contract": {
      "main": [
        [
          {
            "node": "Route Contract Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Contract Status": {
      "main": [
        [
          {
            "node": "Claim Idempotency Key [MOCK]",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Classify Validation Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify Validation Error": {
      "main": [
        [
          {
            "node": "Redact Invalid Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redact Invalid Payload": {
      "main": [
        [
          {
            "node": "Audit Validation Failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Audit Validation Failure": {
      "main": [
        [
          {
            "node": "Terminal - Manual Data Repair",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claim Idempotency Key [MOCK]": {
      "main": [
        [
          {
            "node": "Route Replay Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Replay Status": {
      "main": [
        [
          {
            "node": "Load Installed Base + CMMS-Aufgaben [MOCK]",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Load Previous Outcome [MOCK]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Previous Outcome [MOCK]": {
      "main": [
        [
          {
            "node": "Audit Duplicate Delivery",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Audit Duplicate Delivery": {
      "main": [
        [
          {
            "node": "Terminal - Replay Safe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Installed Base + CMMS-Aufgaben [MOCK]": {
      "main": [
        [
          {
            "node": "Route Dependency Health",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Dependency Health": {
      "main": [
        [
          {
            "node": "Befunde mit Quellen extrahieren",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Classify Transient Dependency Failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify Transient Dependency Failure": {
      "main": [
        [
          {
            "node": "Route Retry Budget",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Retry Budget": {
      "main": [
        [
          {
            "node": "Plan Backoff + Jitter",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Build Redacted Technical Incident",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Plan Backoff + Jitter": {
      "main": [
        [
          {
            "node": "Persist Retry Envelope [MOCK]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Persist Retry Envelope [MOCK]": {
      "main": [
        [
          {
            "node": "Terminal - Bounded Retry Queue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Redacted Technical Incident": {
      "main": [
        [
          {
            "node": "Terminal - Operator Action",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Befunde mit Quellen extrahieren": {
      "main": [
        [
          {
            "node": "Maschine im Installed Base aufl\u00f6sen [MOCK]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Maschine im Installed Base aufl\u00f6sen [MOCK]": {
      "main": [
        [
          {
            "node": "Ersatzteile und Zust\u00e4ndigkeiten erg\u00e4nzen [MOCK]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ersatzteile und Zust\u00e4ndigkeiten erg\u00e4nzen [MOCK]": {
      "main": [
        [
          {
            "node": "Schweregrad, Frist und Vollst\u00e4ndigkeit pr\u00fcfen",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schweregrad, Frist und Vollst\u00e4ndigkeit pr\u00fcfen": {
      "main": [
        [
          {
            "node": "Evaluate Deterministic Guardrails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evaluate Deterministic Guardrails": {
      "main": [
        [
          {
            "node": "Route Business Outcome",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Business Outcome": {
      "main": [
        [
          {
            "node": "Prepare Review-Ready Candidate",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Explain Review Exceptions",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Quarantine Critical Case",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Review-Ready Candidate": {
      "main": [
        [
          {
            "node": "Human Decision Required",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Explain Review Exceptions": {
      "main": [
        [
          {
            "node": "Human Decision Required",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Quarantine Critical Case": {
      "main": [
        [
          {
            "node": "Human Decision Required",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Human Decision Required": {
      "main": [
        [
          {
            "node": "Build CMMS Ma\u00dfnahmenentwurf Draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build CMMS Ma\u00dfnahmenentwurf Draft": {
      "main": [
        [
          {
            "node": "Route Human Decision",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Human Decision": {
      "main": [
        [
          {
            "node": "Queue for Owner Review [MOCK]",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "[DISABLED] CMMS Ma\u00dfnahmenentwurf Test Adapter",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Close Rejected Draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Queue for Owner Review [MOCK]": {
      "main": [
        [
          {
            "node": "Append Final Audit Event [MOCK]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "[DISABLED] CMMS Ma\u00dfnahmenentwurf Test Adapter": {
      "main": [
        [
          {
            "node": "Append Final Audit Event [MOCK]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Close Rejected Draft": {
      "main": [
        [
          {
            "node": "Append Final Audit Event [MOCK]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Final Audit Event [MOCK]": {
      "main": [
        [
          {
            "node": "Terminal - Inspectable Review Package",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "saveExecutionProgress": true,
    "executionTimeout": 300
  },
  "versionId": "d89ce638-d99c-47cb-aa9c-e95edb9ceaf1",
  "meta": {
    "templateCredsSetupCompleted": false,
    "syntheticOnly": true,
    "portfolioProof": "inspectable-v2"
  },
  "tags": []
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

LAB 09 - Maintenance Report → Actions - Inspectable. Uses httpRequest. Event-driven trigger; 46 nodes.

Source: https://github.com/hugomenz/automation-portfolio/blob/main/n8n/workflows/maintenance-report-actions.workflow.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This workflow listens for an “Approved” label on a Trello card, reads the AI draft bookkeeping JSON from card comments, and posts the corresponding transaction to Xero. It then adds a Xero deep link b

Trello Trigger, HTTP Request
Web Scraping

02_LLM_Pipeline v1.0. Uses executeWorkflowTrigger, httpRequest, seaTable. Event-driven trigger; 65 nodes.

Execute Workflow Trigger, HTTP Request, Sea Table
Web Scraping

This workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. A multi-form setup guides you through the entire process At the beginning you have t

Execute Command, Read Write File, HTTP Request +3
Web Scraping

[n8n] Advanced URL Parsing and Shortening Workflow - Switchy.io Integration. Uses splitInBatches, stickyNote, httpRequest, html. Event-driven trigger; 56 nodes.

HTTP Request, GitHub, Stop And Error +1
Web Scraping

[](https://youtu.be/c7yCZhmMjtI)

HTTP Request, GitHub, Stop And Error +1