BlackloreBlacklore
← All work
Demo build

AI-drafted support replies, with safety rules in charge

An n8n workflow where fixed rules decide what the AI may handle.

A working sample we built to show how we would solve a problem like this. It is not a delivered project.

In plain terms

A support-ticket assistant built in n8n. When a customer message arrives, fixed safety rules run first, so refunds, cancellations, legal threats, angry customers and safety issues go straight to a person. Otherwise the AI sorts the message. A draft reply is written only from facts looked up in the store and the help articles, and a final check verifies every number and link in the draft. If anything fails, the ticket is flagged for a person instead of being answered.

  • Rules decide what the AI may handle, and the AI never decides alone.
  • A final check blocks invented tracking numbers and links.
  • Any failure hands the ticket to a person, never to the customer.

What this does not claim: Ran on invented stores, customers and help articles, because no real accounts exist yet. 31 tests passed, which demonstrates the design but is not a measured accuracy rate.

What it looks like

The n8n editor showing the support-triage workflow as a chain of connected steps running left to right.

The full map of the support assistant. A customer message comes in on the left and flows through the safety rules, the AI's sorting step, a drafted reply and a final safety check. It ends either in an automatic reply or in a draft left for a person to review.

Technical caption

n8n editor view of the 27-node workflow: webhook trigger, config, ticket fetch, safety rules, classification and validation, read-only order lookup and knowledge-base search, draft reply, guard check, then send or draft-note branches with tagging and responses.

n8n run history screen with the executed path of a test message highlighted in green.

A recorded test run where the assistant was allowed to reply by itself. The green route shows every step the test message passed through.

Technical caption

n8n Executions view of a run in auto mode that completed through the guard and the send-reply branch.

n8n run history screen for a test where the reply was saved as a draft for a person.

A test run in the cautious setting. The assistant wrote a draft but did not send it, leaving it as a note for a person to approve.

Technical caption

n8n Executions view of a review-mode run ending in the post-draft-note branch (internal note only).

n8n run history screen for a test where the safety check stopped a reply containing an invented tracking number.

A test where the AI made up a tracking number. The final safety check caught it, so the reply was stopped and the ticket went to a person.

Technical caption

n8n Executions view of a run where the guard node rejected a draft whose tracking number was not present in the fetched order data, escalating the ticket.

n8n run history screen for a test where the store lookup was unavailable and the ticket was passed to a person.

A test where the shop's system was unavailable. Instead of guessing, the assistant passed the ticket to a person.

Technical caption

n8n Executions view of a run where the order lookup failed and the workflow escalated the ticket rather than drafting.

Technical details

Rules in code run before any LLM (refund, cancellation, replacement or defect, safety, hatch failure, angry or legal, human requested). The LLM classifies into six low-risk categories, then drafts only from data fetched by code (Shopify GET lookup, knowledge base). A guard checks every number, link and order or tracking number in the draft against that data. Review mode writes internal notes only; auto mode sends only for categories listed in one config node. An error workflow alerts a human. 31 of 31 tests pass against the live workflow.

  • n8n (27 nodes)
  • OpenAI (via OpenRouter)
  • Shopify (read-only, mocked)
  • LiveAgent (mocked)
  • Node mock services
  • Python test runner

Need something like this?

Tell us the problem in your own words. We reply with a plain, practical plan.

Discuss a project like this