Unlisted
Like
leads
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of simplified branch: v8View latest version
A source-agnostic lead qualification system. POST data from any source, AI qualifies and stores results.

- Remix this val
- Add your
OPENAI_API_KEYin the val's environment variables - Edit
PROMPT.txtto define your ideal customer profile - Edit
digest.tsto add email recipients - POST leads from any source with
?source=your-source
- POST any JSON to this val's endpoint with
?source=source-name - AI researches the lead using web search
- Classifies as
yes,no, orinsufficient_data - Stores result with reasoning in SQLite
- Dashboard shows qualified leads, hides the rest
- Daily email digest of ideal leads (plaintext)
The AI returns three fields:
{ "name": "Sarah Chen, Engineering Lead @ Acme", "idealCustomer": "yes", "reasoning": "Sarah has a technical background as an engineering lead..." }
id, timestamp, source, name, ideal_customer, reasoning, raw_data
All original input data is preserved in raw_data as JSON.
POST from anywhere - webhooks, scripts, other vals:
curl -X POST "https://your-val.web.val.run?source=rb2b" \ -H "Content-Type: application/json" \ -d '{"email": "test@example.com", "name": "Test User"}'
The AI will research and qualify whatever you send.