All demonstrations

Book 4 · Guided example

Design an enquiry workflow that handles failure

Run valid, invalid, repeated and unavailable-service scenarios in a safe practice simulator.

About one minute · English captions · Original illustrated example with synthetic narration. Northlight Studio is fictional.

Read the video transcript

Vibe-Code Bible · Book 4 · An automation that handles failure Original narrated teaching demonstration. Northlight Studio is fictional.

Northlight Studio receives an enquiry. Our fictional workflow should validate it, save one record, and prepare a response for human review. The practice simulator contacts no external service.

Start with an incomplete event. Check the event identifier, email, and project brief. If a required field is invalid, stop before creating a customer record.

Now send the same valid event twice. A stable event identifier lets the workflow recognise the retry and reuse the earlier result, instead of creating a duplicate.

What if storage is unavailable? Stop downstream actions, retain the event for a controlled retry, and show the failure. Do not claim the enquiry was saved.

Keep a small operator trail: event identifier, failed step, status, time, and retry count. Leave unnecessary private customer text out of broad logs.

Test valid, invalid, repeated, and unavailable-service scenarios. This proves the intended rules. Before launch, separately verify the actual services, permissions, and delivery behaviour.

Download transcript
Book 4Step 1 of 6

Define the trigger and boundary

The fictional studio receives a submitted enquiry. The workflow should validate it, save one record and prepare a response for review. The practice simulator below runs in the browser and contacts no external service.

Submitted enquiry → validation → deduplicated record → response draft → human review
Try this

Name the event that begins the workflow and the actions it is allowed to take.

What to check

The scope includes a clear human review point.

Exercise the workflow rules

Local simulation. No email, CRM or other service is contacted.

Validate
Save once
Draft
Human review

Choose a scenario to inspect the outcome.

0 practice records in this session

When it goes wrong

An automation succeeds once and later creates duplicates or stops unexpectedly.

  1. Find the event ID and the exact failing step.
  2. Check whether the external service retried the event.
  3. Confirm required fields and service permissions.
  4. Retry only after deciding whether the previous action already completed.
  5. Add a test for the observed failure before enabling the revised workflow.

Stop automatic retries when they could repeat a payment, message or other consequential action whose result is unknown.

Take it into your project

Keep the worked example.

Download the example and its blank fields. Adapt the assumptions and record the results you actually observe.

Open this book’s first workbook