A salon, a clinic or a renovation company gets an enquiry through its website form at 9 pm on a Friday. The owner reads it on Monday, and since Saturday the client has been talking to someone else. Hence the idea of letting automation handle enquiries: a reply within a minute, routing to the right person, nothing lost in the inbox.
Most guides start with a language model that replies to the client. We start from the other end, because on our own form at wppoland.com the layers before and after the model do most of the work. Below are five layers in the order an enquiry passes through them, with what works for us and where AI actually helps.
How do you filter WordPress form spam before AI sees it
Automation that answers spam does two kinds of damage at once: you pay for every model call, and you send replies to addresses that are waiting for exactly that. So the filter has to sit in front of the model. Ours has three layers.
The first is an invisible honeypot field. A person never sees it, while a simple bot fills in every field. A filled-in field means a bot.
The second is Cloudflare Turnstile verified server-side. The token from the browser goes to our function, and only the function asks Cloudflare whether it is valid. Never from the browser: the secret would be public and the result easy to fake. We reject enquiries with no token or an invalid one. When Cloudflare’s verification itself does not respond, the enquiry goes through, because an outage of someone else’s service must not swallow real clients.
The third is content signatures that never appear in a real enquiry: an HTML link typed by hand into the project description, BBCode tags, a Telegram link in the website field. We also added the name of a form-spamming tool to the list, because on 29 July 2026 a run of casino enquiries came from an address that contained that tool’s name.
Turnstile alone is not always enough. In August 2026 the author of the elszczepano blog described how Cloudflare flagged roughly half of the traffic on his WordPress site as a likely bot, and hundreds of spam comments still landed anyway (When SIMPLER means BETTER?). What finally helped was a custom honeypot field hooked in through functions.php: a submission goes through only when that field is present and empty. According to the author, no comment has landed in spam since November 2025. His conclusion fits forms too: spam bots are generic, so even a simple mechanism they do not expect filters out most of them.
We answer spam exactly as we answer a real enquiry: a confirmation message and a number. A sender who learns they were rejected changes the address and keeps trying.
Which form fields save an AI model work
Some enquiries can be routed without any model. Our form has three fixed-choice fields: project type (new site, repair, maintenance, migration, other), timeline and budget band. Each of them can be routed with a plain condition in code, for example a shop repair to the urgent queue and a migration to the person who handles migrations.
One detail cost us some time. The form sends the budget band as a code, for example band-3, and the bands are not in the same currency across all languages (the Polish version in zloty, the others in euro). An email carrying only the code was unreadable, so the function adds a label with the amount in the form’s language. The same label list exists in two places, so a test checks on every build that both are identical.
Only the free-text project description needs more than a condition.
How do you route a form enquiry with a decision model
Routing does not need a model that writes essays. A decision model is enough: it gets a text and a list of options and returns one of them. For example: “which team should get this enquiry: shop, company site, integration, other” or “is this enquiry urgent: yes, no”.
There are at least two such models on the market. Jev, which we use in the text quality gate in this repository, and Clef, which Cloudflare published in early October 2026 on Workers AI and Hugging Face, under the Apache 2.0 licence and compatible with the Jev API. According to Cloudflare’s own measurements, median latency is 209.3 ms for Clef, 38.8 ms for the smaller Clef-flash and 524.1 ms for Jev (Cloudflare). These are vendor benchmarks, so independent comparisons may come out differently.
The cost on our numbers: scoring 300 paragraphs with Jev cost one cent, and running the whole corpus through it, about 134,000 paragraphs, would cost 3.32 USD and take 100 minutes. At a few dozen enquiries a month, the cost of a decision model is negligible. What costs more is the time to set it up and to check whether the routing is right.
Can AI reply to clients from a contact form on its own
Technically, yes. In practice the first reply to an enquiry usually names a timeline, a scope or a price, which is a promise on behalf of the business. A model that writes “we will do it in a week” to a client on a two-month project costs more than it saves.
Anthropic describes the same principle in its guide to commerce agents: “No model tool call moves money or changes the business.” The worst a model can do there is propose a change that a person or a policy approves (A guide to the anatomy of effective commerce agents). Orders, payments, refunds and price changes go through the same approval the business already uses for such changes without AI. A reply to a client with a quote is the same kind of change.
A safer setup: the model prepares a draft and a person sends it. The draft gets context from the form fields and the description of the service the enquiry is about. Approval takes a minute, and the client gets an answer the same day instead of on Monday. The only thing that should go out without a person is the confirmation of receipt with a reference number. On our form the client sees that number, in a format with the date and a random suffix, right after submitting.
How do you connect a WordPress form to n8n and Claude
There are two routes. The first is n8n: the form sends data to a Webhook node, which starts the workflow. The node has separate test and production URLs, so you can test the workflow without touching the live form (n8n documentation). Further along the same workflow, n8n has a ready-made Anthropic node for drafting the reply in Claude, plus nodes for email, Slack or a CRM.
The second route is custom code. Our form is handled by a function on Cloudflare Pages: field validation, spam filter, Turnstile, sending and telemetry in one file. Fewer parts to maintain and full control over what ends up in the logs, but every change needs a developer.
The choice depends on who will change the rules. If the owner wants to add a new enquiry category alone, n8n wins. If the rules change once a quarter, custom code is simpler to maintain.
What to do when the form email fails to send
Automation that accepted an enquiry and never delivered it is worse than no automation, because the client thinks the message arrived. Our enquiries go through Resend first, and when that fails, through Web3Forms. The second provider revealed a detail that is easy to miss: Web3Forms returns status 200 even when it rejects a message, and the rejection sits in the response body. Checking only the HTTP status would count such a send as a success.
The second lesson is about errors. Every failure path returns its own code, not only a message. Two of them share the same HTTP status 422 and mean completely different things: an incorrectly filled form and an expired anti-spam token. As long as the browser collected all errors under one name, the expired-token error was invisible in telemetry.
How much does automated enquiry handling cost and when does it pay off
At small scale the model cost is negligible; what counts is the time to set it up and maintain it. It pays off when enquiries arrive outside working hours, when they go to several people, or when some of them get lost in the inbox today. At a few enquiries a month, a phone notification will be quicker to set up.
You can work out your own numbers in the automation ROI calculator. We build this kind of workflow on WordPress sites as part of business process automation and AI integration with WordPress: first the filter and the fields, then routing, and the reply draft last, each step checked on real enquiries before moving to the next.







