AI spam filter for contact forms
AI checks every form message and only real inquiries reach your team.
How it works
Trigger: Webhook — contact form submitted
- Receive the form message.
- Ask an AI model: is this spam, a sales pitch, or a real inquiry?
- Post real inquiries to #leads; ignore the rest.
Diagram
Trigger App Logic AI
Build it
Pick your tool — same automation, step by step.
Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder. AI steps use a Claude model node — swap it for OpenAI, Gemini or Ollama if you prefer.
Show code (174 lines)
{
"name": "AI spam filter for contact forms (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## AI spam filter for contact forms\nAI checks every form message and only real inquiries reach your team.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
"height": 260,
"width": 340
},
"id": "292cf932-28a7-4c4a-adbb-f824f0f5ffd3",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"httpMethod": "POST",
"path": "contact-filtered",
"options": {}
},
"id": "292cf932-28a7-4c4a-adbb-f824f0f5ffd3",
"name": "Form message",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
0,
0
],
"webhookId": "292cf932-28a7-4c4a-adbb-f824f0f5ffd3"
},
{
"parameters": {
"promptType": "define",
"text": "=Classify this website contact form message. Answer with one word: REAL (a genuine inquiry from a potential customer or partner), PITCH (someone selling SEO, marketing, dev services, etc.) or SPAM.\n\n{{ JSON.stringify($json.body) }}"
},
"id": "292cf932-28a7-4c4a-adbb-f824f0f5ffd3",
"name": "Check for spam",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.5,
"position": [
300,
0
]
},
{
"parameters": {
"model": {
"__rl": true,
"value": "claude-sonnet-5",
"mode": "list"
},
"options": {}
},
"id": "292cf932-28a7-4c4a-adbb-f824f0f5ffd3",
"name": "Claude model",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"typeVersion": 1.3,
"position": [
300,
220
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "loose"
},
"conditions": [
{
"id": "c1",
"leftValue": "={{ $json.text.toUpperCase() }}",
"rightValue": "REAL",
"operator": {
"type": "string",
"operation": "contains"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "292cf932-28a7-4c4a-adbb-f824f0f5ffd3",
"name": "Real inquiry?",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
600,
0
]
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "#leads",
"mode": "name"
},
"text": "=📬 {{ $('Form message').item.json.body.name }} ({{ $('Form message').item.json.body.email }})\n{{ $('Form message').item.json.body.message }}",
"otherOptions": {}
},
"id": "292cf932-28a7-4c4a-adbb-f824f0f5ffd3",
"name": "Post to #leads",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.2,
"position": [
900,
0
]
}
],
"connections": {
"Form message": {
"main": [
[
{
"node": "Check for spam",
"type": "main",
"index": 0
}
]
]
},
"Check for spam": {
"main": [
[
{
"node": "Real inquiry?",
"type": "main",
"index": 0
}
]
]
},
"Real inquiry?": {
"main": [
[
{
"node": "Post to #leads",
"type": "main",
"index": 0
}
]
]
},
"Claude model": {
"ai_languageModel": [
[
{
"node": "Check for spam",
"type": "ai_languageModel",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}In Make, create a new scenario and add these modules in order:
- Webhooks › Custom webhook
- Anthropic Claude › Create a Prompt (or OpenAI › Create a Completion)
- Filter on the next route: “Real inquiry?”
- If yesSlack › Create a Message
- Every module run uses Make operations — the free plan includes a monthly quota.
- Module and step names can differ slightly as Make and Zapier update their apps.
In Zapier, create a new Zap and add these steps in order:
- Webhooks by Zapier — Catch Hook
- Anthropic (Claude) — Send Message (or ChatGPT — Conversation)
- Filter by Zapier: “Real inquiry?”
- If yesSlack — Send Channel Message
- Zaps with more than two steps need a paid Zapier plan.
- Webhooks, Filters/Paths and Code by Zapier are premium features on some Zapier plans.
- Module and step names can differ slightly as Make and Zapier update their apps.
Tips
- Log spam to a sheet for a week to check nothing real is filtered out.
Related flows
Sales & CRMAdvanced
AI lead qualifier
AI scores each new lead and fast-tracks the hot ones to your sales team.
Webhook → AI model → Slack → Gmail8h/mo
Sales & CRMAdvanced
Enrich new leads with company info → HubSpot
AI reads the lead's company website and saves what they do, industry and size to HubSpot.
Webhook → HTTP Request → AI model → HubSpot8h/mo
Sales & CRMEasy
New form lead → CRM contact + team ping
Leads from your website form go straight into HubSpot and your team is notified.
Typeform → HubSpot → Slack5h/mo