Skip to content

Our own site · AI services

A website chat that turns an email address into a real enquiry

Website chats collect a visitor's details and then nobody sees them, or the bot promises a callback it cannot make.

The chat on this site. An email address typed into it becomes a real enquiry, and it says so plainly when sending fails.

Our own system, used on our own site.

The everyday problem

Website chats collect a visitor's details and then nobody sees them, or the bot promises a callback it cannot make.

An email address in the chat becomes an enquiry in our inbox, and the chat tells the truth about it.

The hard part

  1. A lead that nobody sees

    An email address in the chat is sent as an enquiry by the same code as the contact form.

  2. A promise it cannot keep

    If sending fails, the chat says so and gives our email address.

  3. A flood using up the mail key

    Five enquiry sends per IP address per 10 minutes, and 50 a day across the site, counted in memory.

  4. Header injection

    The enquiry is plain text, and every header field is kept to one line.

  5. A webhook that goes quiet

    After 12 seconds, the scripted answer replies.

How it runs

Workflow

How a chat message becomes an enquiry a person answers.

Sample run
  1. Step 5: Enquiry sent. Plain text, Reply-To set to the visitor.
    If this fails: Sending fails: the chat says so.

Tap “On fail” to see what happens when a step breaks.

Edge cases we handled

What the system does in the unusual cases.
WhenWhat the system doesTry it
A visitor types an email address.It is sent as an enquiry, and the chat says a person will reply.No phrase to try
Sending fails, or no destination is set.The chat says it could not pass it on and gives our email.No phrase to try
One IP address leaves five enquiries in 10 minutes.The sixth is not sent. The chat says so and gives our email.No phrase to try
A request comes from another website.Refused: same-origin only.No phrase to try

Guardrails and hand-off

Guardrails

  • Same-origin, JSON-only requests.
  • Send limits per IP address and per day, counted in memory.
  • Plain-text enquiries, with one-line header fields.
  • On the scripted path, it promises a reply only once the enquiry was sent.

When a person takes over

An email address in the chat becomes an enquiry to our inbox, with Reply-To set to the visitor. A person replies from there.

Not in this build yet

We would rather you hear it from us.

  • Replies are scripted unless the AI webhook is configured, and the deploy does not configure one.
  • When the webhook answers, the enquiry step is skipped: it runs only on the scripted path, and with a webhook set every message goes to that workflow.
  • The send limits are counted in memory, so they start again when the server restarts.

Built with

  • Next.js
  • TypeScript
  • No. It sends plain-text email enquiries to our inbox, with Reply-To set to you: one when you leave your address, and one more for each message you add after it. If an AI webhook were configured, your messages would also go to that workflow. Nothing else goes out.

  • Yes. In your build, the scripted answers and the webhook read your own information. This one answers from what our site already says.

More work

How Copperline triage chat runs. Steps: Message in chat, then Safety check on every turn, then Read the problem, then Check the area, then Pull out contact details, then Offer a time, then Office board.

  • Concept build
  • Plumbing
  • AI services

Plumbing chat that puts safety before sales

Everyday: Panicked messages arrive at night. The chat either says nothing useful or pushes a booking form.

The hard part: A gas smell mid-conversation

How CrestBay answer desk runs. Steps: Question, then Hand-off words, then n8n workflow, then Server knowledge base, then In-browser retriever, then Logged with its source.

  • Concept build
  • Roofing
  • AI services

A roofing assistant that keeps answering when the AI goes quiet

Everyday: The same few dozen questions about pricing, repairs and insurance arrive every day, and the answers change with who picks up.

The hard part: The AI service going quiet

How FlowRight assistant runs. Steps: Message, then Server proxy to n8n, then Read the reply, then Local rules, gas first, then Price guard, then Check the lead, then Forwarded in the background.

  • Concept build
  • Plumbing
  • AI services

A plumbing assistant built so a dead AI never means a dead chat

Everyday: An AI chat bolted onto a site breaks quietly. When the AI provider is slow or down, customers stare at a spinner, and the leads they typed are lost.

The hard part: The AI service going quiet

Start a project

Want something like this for your business?

A 30-minute call, then a written plan and a fixed quote. No obligation.

  • A reply from a person within one business day.
  • Fixed price in writing
  • You own everything