AI Automation
Add AI: sort customer enquiries automatically
Let AI read each enquiry, route it to the right person and prepare a draft reply for a human to approve.
- EnquiryWebhook receives it
- ClassifyAI picks a category
- DraftAI writes a reply
- ApproveA person decides
What you need
- The workflow from the previous tutorial
- An API key from an AI provider, or a local model as in the Ollama tutorial
- A few real, anonymised enquiries to test with
Decide the categories first
AI works best with clear choices. Write down what you want to happen to each type of message, for example: Sales goes to the sales team, Support goes to technical staff, and anything else goes to a person to review.
Add a Text Classifier node
After the Webhook, add the Text Classifier node from the AI section of n8n, and connect a chat model such as OpenAI, Anthropic or Ollama to it. Set the text to classify, then add your categories with a short description of each. A good description improves accuracy more than a clever prompt.
Text to classify: {{ $json.body.message }} Sales: Asking about prices, quotes or buying a product or service Support: Reporting a problem with something already installedTurn on the option to send unmatched items to an Other branch, so an unclear message reaches a person rather than being forced into the wrong category.
Let AI draft a reply
On the Sales branch, add a Basic LLM Chain node with a chat model, and give it clear instructions. Tell it what it must not do, as well as what it should do.
Write a short, polite reply to this customer enquiry. Do not promise prices, dates or anything not stated in the message. If information is missing, ask for it. Enquiry: {{ $('Webhook').item.json.body.message }}Keep a human in the loop
Do not send AI replies straight to customers at the start. Send the draft to your team by email or chat, with an approval step using the Send and Wait for Response option available in n8n's messaging nodes. Only send it after someone approves.
Test it, then measure it
Run 20 or more real, anonymised enquiries through the workflow and note how many were sorted correctly. Improve your category descriptions wherever it goes wrong. Only remove the human step for a category once its results have stayed reliable.
Customer messages go to the AI provider you connect. Check their data policy, or use a local model for sensitive information.
Want this set up for your business?
We can plan, build and hand it over to your team.