Nantel Flux / Workflow Repair Desk / Sample packet
EXAMPLE REPAIR PACKET

Example repair packet · DEMO-001

Example: repairing a broken n8n lead-routing path

The CAD 99 pilot includes diagnosis, a controlled patch when appropriate, validation evidence, rollback notes, and a staging checklist.

Workflow filesOriginal + patch / 3 nodes each
IssueHTTP 200 + needs_input
Validation6 fictional payloads
Evidence6 / 6 isolated logic cases pass

01 / Issue

An HTTP 200 response sent the workflow down the wrong path.

Observed

Every upstream HTTP 200 response was routed as accepted, even when the JSON response body returned needs_input or failed.

What the repair must do

The patched logic must follow the result inside the response body, catch missing lead identifiers, stop safely on unknown statuses, and preserve the incoming event ID for the client’s staging replay checks.

02 / Diagnosis

The workflow checked delivery, not the result inside the response.

The workflow treated the HTTP-level success response as an accepted lead without reading the business result in body.status. A second mapping expected only lead_id, so payloads using leadId lost the identifier before the response step.

before: accepted = response.statusCode === 200
after:  outcome = normalizeStatus(response.body?.status)
        leadId = input.leadId ?? input.lead_id ?? null

03 / Safe patch

Read the response result first, normalize the lead ID, and fail safely.

  1. Normalize leadId and lead_id into one internal field before any branch.
  2. Read the JSON response body first; map only accepted, needs_input, and failed.
  3. Route missing identifiers to a validation response and unknown statuses to a closed failure branch.
  4. Preserve the incoming event ID for client-side replay comparison. Duplicate suppression is not implemented or claimed in this sample.

04 / Validation

Six fictional cases check the repaired decision logic.

Synthetic cases executed in an isolated Node.js harness, not in n8n.
FixtureInput variationExpected routeObserved
F-01lead_id + acceptedacceptedPASS · ISOLATED LOGIC
F-02leadId + acceptedacceptedPASS · ISOLATED LOGIC
F-03HTTP 200 + needs_inputneeds_inputPASS · ISOLATED LOGIC
F-04HTTP 200 + failedfailedPASS · ISOLATED LOGIC
F-05missing lead IDvalidation_errorPASS · ISOLATED LOGIC
F-06unknown body statusfailed_closedPASS · ISOLATED LOGIC

05 / Rollback plan

Test in staging, with the untouched original ready.

Staging checklist

Import the patched JSON into a staging project, reconnect client-owned credentials, replay F-01 through F-06, and confirm downstream writes use the normalized lead ID. Offline passes are not a substitute for this n8n execution check.

Rollback steps

Deactivate the patched workflow, reactivate the untouched original export, and replay only after the client verifies the event ID is absent from the destination log. No automatic deduplication is included.