• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
project logo

valdottown

leads

AI-powered lead qualifying from any data source
Unlisted
Like
leads
Home
Code
8
PROMPT.txt
README.md
agent.ts
dashboard.tsx
db.ts
C
digest.ts
H
main.ts
testing.ts
Branches
3
Pull requests
Remixes
1
History
Environment variables
1
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
…
Viewing readonly version of simplified branch: v8
View latest version
README.md

Lead Inbox

A source-agnostic lead qualification system. POST data from any source, AI qualifies and stores results.

Lead Inbox Screenshot

Getting started

  1. Remix this val
  2. Add your OPENAI_API_KEY in the val's environment variables
  3. Edit PROMPT.txt to define your ideal customer profile
  4. Edit digest.ts to add email recipients
  5. POST leads from any source with ?source=your-source

How it works

  • POST any JSON to this val's endpoint with ?source=source-name
  • AI researches the lead using web search
  • Classifies as yes, no, or insufficient_data
  • Stores result with reasoning in SQLite
  • Dashboard shows qualified leads, hides the rest
  • Daily email digest of ideal leads (plaintext)

AI output

The AI returns three fields:

{ "name": "Sarah Chen, Engineering Lead @ Acme", "idealCustomer": "yes", "reasoning": "Sarah has a technical background as an engineering lead..." }

Database schema

id, timestamp, source, name, ideal_customer, reasoning, raw_data

All original input data is preserved in raw_data as JSON.

Connecting sources

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.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.