• 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 main branch: v11
View latest version
README.md

Lead Inbox

Source-agnostic lead qualification with AI. Accepts data from any source, uses AI to research and qualify leads, then displays them in a dashboard and sends digest emails.

Quick Start

  1. Ingest leads - POST to the endpoint with any data:

    POST https://valdottown-leads.web.val.run?source=rb2b
    Body: { "email": "lead@example.com", "company": "Acme" }
    
  2. View dashboard - Visit the endpoint URL in your browser

  3. Configure digest - Edit digest.ts to add email recipients

How It Works

  1. Data arrives via POST with ?source=your-source
  2. AI researches the person and extracts: name, company, role, email, LinkedIn
  3. AI qualifies them against your ICP: yes, no, or insufficient_data
  4. Lead is stored and visible in dashboard
  5. Daily digest emails ideal leads

Adding Sources

Push sources (webhooks)

Just point your webhook to: https://your-val.web.val.run?source=source-name

Examples:

  • RB2B: ?source=rb2b
  • Tally form: ?source=tally-form
  • Zapier: ?source=zapier

Pull sources (crons)

Create a new interval file that calls processLead:

Create val
import { processLead } from "./main.ts"; export default async function cron() { const newData = await fetchFromSomewhere(); for (const item of newData) { await processLead(item, "my-source"); } }

Customizing

Change the ICP

Edit PROMPT.txt to describe your ideal customer profile.

Add email recipients

Edit digest.ts and add emails to the RECIPIENTS array.

Files

  • main.ts - HTTP endpoint + routing
  • db.ts - Database schema + queries
  • dashboard.tsx - Web UI
  • digest.ts - Email digest cron
  • agent.ts - AI qualification logic
  • PROMPT.txt - ICP prompt for AI
  • testing.ts - Test utilities
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.