← Practical labsPlatform-neutral systems lab

Build a reliable workflow

Turn an incoming event into a safe, retryable integration with a visible human fallback.

Form event
Validate
Transform
API call
Result
Human fallback

Scenario

A new form submission must be validated, transformed, sent to another system, and recovered safely when delivery fails.

Concepts used

  1. webhook
  2. JSON
  3. validation
  4. API
  5. idempotency
  6. retries
  7. exceptions

Step-by-step build

  1. Define a form payload and unique event ID.
  2. Reject missing or malformed required fields.
  3. Transform accepted data into the target schema.
  4. Call a simulated target API with the event ID as an idempotency key.
  5. Retry temporary failures with a limit and delay.
  6. Create a human notification with evidence after the final failure.
  7. Record the final status without duplicating successful submissions.

Expected result

Every valid event is delivered once or ends in a clear, actionable exception state.

Failure cases

  1. Duplicate webhook delivery
  2. Invalid JSON
  3. Timeout after the target accepted the request
  4. Permanent permission error

Improvements

  1. Add a dead-letter queue
  2. Measure retry rate and age
  3. Separate transient and permanent errors

Platform variants

  1. n8n
  2. Power Automate
  3. UiPath