Where AI helps in an automation workflow
Make and n8n work well when rules are explicit: if the "type" field equals "return", create a ticket for the logistics team. They struggle when the useful information is buried in free text: an email that asks for a quote, reports a late order and attaches an invoice, all in one message. This is where a large language model (LLM) is useful as a classifier: it reads the text and returns a few structured fields that the rest of the scenario handles with ordinary rules.
In this article AI doesn't write content or reply to customers. It decides where a request goes. That use is easier to control, because the output is a choice between options you define and can be spot-checked. Generating text, such as product descriptions, has its own article; here we deal only with routing.
Typical small-business cases:
- emails to an info@ inbox that need splitting between sales, support, accounts and suppliers;
- website form submissions with a "message" field customers use for everything;
- support tickets that need an urgency label before an agent sees them;
- messages in several languages that must reach the right person.
What to ask the model for: category, priority, language
The narrower the output, the more reliable it is. Before writing the prompt, define:
- Closed categories: a fixed list such as
quote,existing_order,return,invoice,supplier,spam,other. Always include "other": without a safe exit the model forces doubtful cases into the nearest category. - Priority: two or three levels with written criteria ("high if it mentions a paid order not yet received").
- Language: an ISO code such as
it,en,de. - Extracted fields: order number or VAT number if present, otherwise empty.
In n8n the Text Classifier node follows exactly this logic: each category gets a name and a description, you can allow several classes per text, and under "When No Clear Match" you choose whether to discard the item or send it to an "Other" branch. In Make you get the same result with the OpenAI module (or another provider's) followed by a Router that reads the category.
Prompts and structured output
A classification prompt
A good classification prompt is short and declarative. It states the role ("you classify incoming emails for a company that sells spare parts"), lists the categories with one line of description each, gives the priority criteria and two or three real, anonymised examples, especially of ambiguous cases. Say what to do when a message contains several requests, for example "choose the main request and list the others in the notes field".
The JSON schema
Free-text output is where scenarios break. Ask instead for a JSON object with fixed fields: category, priority, language, order_number, reason. With OpenAI's Structured Outputs you supply a JSON schema and the model is constrained to follow it, with categories defined as an enum. The documentation notes two exceptions: a model refusal, returned in a separate field, and a response cut off by the token limit. If the module you use in Make doesn't expose the schema option, you can call the API with the HTTP module.
After the call, always validate: is the category in the list? Does the order number have the expected format? If validation fails, the item goes to review, not to the wrong team.
Confidence thresholds and human review
Asking the model for a 0-100 confidence score is common, but that number is not a calibrated probability. Treat it as a weak signal alongside rules you can check. An item goes to manual review if:
- the category is
other, or the schema wasn't respected; - the model flags several requests in one message;
- priority is high and the category involves money, such as refunds or disputes;
- a simple rule contradicts the model, for example an order number is present but the category is
quote.
Review must not become a bottleneck: an Airtable view, a Slack channel or a Gmail label where someone confirms or corrects with one click is enough. Save the corrections: after a few weeks they become the best examples to add to the prompt. In the first two weeks, also spot-check items that were classified with high confidence.
Personal data: what to send to the model
An email almost always contains personal data: name, address, phone number, sometimes payment details. The GDPR data minimisation principle (Article 5) requires processing only the data needed for the purpose. Classification needs the subject and body of the message, not a signature with a mobile number or the attachments.
- Strip signatures, quoted previous messages and attachments before the call.
- Mask IBANs, card numbers and tax codes with regular expressions.
- Check your provider's terms: according to OpenAI's documentation, API data is not used for training unless you opt in, and abuse monitoring logs are kept for up to 30 days; a European data residency option is also available for eligible projects.
- Update your record of processing and your list of processors.
If you want data to stay inside your own infrastructure, n8n self-hosted with a local model is an alternative, with different running costs; the basic setup is in our guide to installing n8n on a VPS. This is not legal advice: for sensitive processing, check with your DPO or privacy adviser.
Costs and rate limits
There are two costs. The model provider bills input and output tokens: a long prompt with many examples costs money on every call, so keep it lean and cut very long emails down to the first useful characters. The automation platform counts every module run: in Make each step uses credits, so filter out anything a simple rule can already handle (newsletters, automatic notifications, known senders) before the AI call. More techniques are in our article on how to reduce Make operations usage.
Also consider API rate limits. If hundreds of emails arrive at once, for instance after a mass mailing, the scenario may receive 429 errors: set retries with a delay and process emails in batches rather than all in parallel.
A complete example: routing incoming requests
A typical scenario for a shared info@ inbox:
- Trigger: new email in the inbox (Gmail, Outlook or IMAP).
- Rule filter: drop blocked senders, newsletters and auto-replies.
- Clean-up: extract the text, remove signature and quotes, mask sensitive data, cut to a maximum length.
- Classification: model call with prompt and JSON schema.
- Validation: check schema, category and any extracted fields.
- Router: one branch per category, with a Gmail label, a helpdesk ticket or a CRM task.
- Review: uncertain cases go to a dedicated channel with a link to the original email.
- Log: store category, review outcome and timings in a sheet to measure accuracy.
After a month the log tells you how many classifications were corrected by hand and in which categories. If one mistake keeps recurring, rework that category's description or add an example. If you're still choosing a platform, our Make vs n8n comparison will help. If you'd like routing set up on your inbox with rules, schema and review ready to go, it's one of the projects we handle in our Zapier and Make automation service.
- make
- n8n
- intelligenza artificiale
- classificazione email
- llm
- smistamento richieste
- gdpr
- automazione pmi
Frequently asked questions
Do I need OpenAI or can I use other models?
Any provider with an API works, as does a local model with self-hosted n8n. What matters is that the model returns consistent JSON and that you validate it; for classification a small, inexpensive model is often enough.
How reliable is LLM classification?
It depends on how clear the categories and examples are. Measure it: log every classification and every manual correction for a month and calculate the error rate per category. Categories with the most errors usually have an ambiguous description.
Can I send customer emails to an AI service?
Yes, if you respect GDPR: send only the data needed, check the provider's retention and training terms, appoint it as a processor and update your records. This is not legal advice; for sensitive cases ask your DPO.
Make or n8n for this kind of automation?
Both work. n8n has a ready-made Text Classifier node and can run on your own server; Make needs an AI module plus a Router but is simpler to run if you don't have your own infrastructure.
Sources
Related articles
Automation · 6 min read
Make vs n8n: which one should a small business choose for automation
Make or n8n? A practical comparison of hosting, EU data, maintenance, error handling and real costs to choose the right automation platform.
Automation · 6 min read
AI Automation for E-commerce Product Descriptions: An Operational Guide for SEO & Conversions
Learn how to implement generative AI to create SEO-optimized and conversion-focused product descriptions at scale. A practical guide for e-commerce and marketers.
Automation · 6 min read
How to Install n8n on a VPS with Docker: Step-by-Step with HTTPS and Backups
Install self-hosted n8n on a VPS with Docker Compose: persistent database, domain with HTTPS, encryption key, tested backups and safe upgrades.
