A walkthrough for the Workflow Automation Repair & Build Package. It explains what was broken, what changed in the repair, why it matters, and how each change maps to a real Zapier / Make / n8n / webhook / API repair.
| File | Role |
|---|---|
before/index.html, before/script.js | The broken workflow (intentional failures, marked BUG:) |
after/index.html, after/script.js | The repaired workflow (fixes marked FIX:) |
build-demo/index.html, build-demo/script.js | New one-process automation built from scratch |
index.html | Comparison / landing page linking all three |
*/styles.css | Shared dashboard styling |
proof/diff.patch | Code diff of the before → after repair |
The most meaningful repair is in before/script.js → after/script.js. Details below.
before/script.js accepted any input. Invalid emails and empty names entered the pipeline.after/script.js adds isValidEmail() and a required-name check that runs before anything else.after/script.js looks up the email in the mock CRM before inserting and skips duplicates.fakeWebhookCall() returned 422/502 errors that the caller ignored, saving the lead regardless.callWebhookWithRetry() retries on transient failure and only proceeds on success; hard failures are surfaced and logged.catch (logged only to console).renderSlack() actually writes the mock notification and logs the step.renderEmail() adds a mock confirmation email and logs it.after/script.js adds a timestamped log() for every step (validated, dedupe, CRM write, notification, email) plus clear failure messages.build-demo/script.js implements the same reliable pattern as a clean build (not a repair):
lead form → validation → CRM/table → internal notification → email confirmation → workflow log
It includes a "Run sample lead" button that performs a guaranteed successful end-to-end run for demonstration and screenshots.
See the code diff for the line-level before → after repair, and the workflow map for the visual flow and real-tool mapping.