See llms.txt for all machine-readable content.

Back to Templates

Triage home-cleaning enquiries and draft review replies with webhook rules

Quick overview

This workflow receives home-cleaning enquiries via a webhook, validates and classifies them using deterministic rules, flags security- or language-related messages for review, and returns a review-only draft reply (when applicable) as JSON without sending any messages.

How it works

  1. Receives a POST request on an n8n webhook containing an enquiry payload (for example name, email, and message).
  2. Validates and normalizes the input (including email format and maximum message length) and returns HTTP 400 with error details if the request is invalid.
  3. Classifies the enquiry with rule-based checks to detect sensitive/injected content, non-English messages, complaints, booking changes, out-of-scope commercial premises, quote requests, or unrelated messages.
  4. Extracts key quote details (such as service type, bedrooms/bathrooms or square footage, ZIP, and preferred date) and lists any required fields that are missing.
  5. Builds a fixed-template, review-only draft reply for quotes, booking changes, and complaints that asks only for missing details and avoids confirming bookings or stating prices.
  6. Returns a JSON response with the route, extracted fields, missing fields, flags, and any draft reply, always setting needs_human_review to true.

Setup

  1. Configure the webhook URL in your website form or backend to send a POST request to the workflow’s Production webhook endpoint.
  2. Update the business-specific settings (reply sign-off, out-of-scope property terms, and validation limits) in the Triage settings step.
  3. Ensure your form sends at least email and message fields in JSON, and optionally include structured fields like service_type, bedrooms, bathrooms, home_size_sqft, zip, preferred_date, and booking_reference.
  4. Enable webhook authentication (for example header authentication) before going live to prevent unauthorized submissions.

Additional info

Keyword rules are English-only and are not a security control. Indirect or reworded instructions can slip past the keyword checks (one test did). Messages with door/gate codes, key hiding places, card-like numbers or "ignore your rules"-style instructions go to a security route with no customer draft. The workflow never sends anything and uses no AI model, API cost or credentials. Tested on n8n 2.47.5 with 22 synthetic enquiries.