Form Pipeline — AI-Powered Spam Detection & Routing
A multi-layered form submission processing system that screens incoming submissions for spam and routes valid ones to configured destinations. Running in production across multiple sites.
The engineering insight: Most AI spam filters send every submission to an LLM. That’s expensive and slow. The architecture here uses AI as the last resort, not the first — and that design decision is the entire reason it works economically.
The filtering pipeline:
- ASN/IP-level blocking with decay — tracks spam sources by IP, escalates to ASN-level blocking for persistent sources. Blocks decay over time so legitimate senders aren’t permanently banned. Whitelisting available per IP or ASN.
- Pre-AI heuristics — gibberish detection, format validation, and behavioral signals catch obvious spam before it reaches the expensive layer.
- AI content analysis — submissions that pass the earlier layers get reviewed by an LLM (Anthropic or OpenAI) for final determination.
- Every layer is independently configurable — customers can disable AI and run IP-only, disable IP blocking and run AI-only, or turn everything off and use it as a pass-through router.
The result: 1,074 spam submissions rejected, 50 valid submissions routed, total AI API cost of $5.27 over 3.5 months. The cost is low because most spam never reaches the AI layer.
Routing engine: Once a submission passes filtering, configurable connectors route it to Slack, email, webhooks, ConvertKit, Zoho, or other integrations. Each form can have its own connector configuration.
Cross-product integration: Exposes an API that other applications call to check IPs and emails against the flagged database. TC Track uses this at signup for fraud prevention — flagged users get shadowbanned (registration flow looks identical but no account is created).