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

Lead Inbox

AI-powered lead filtering from any data source. Includes a dashboard and a daily email digest of only the leads that fit your ICP.

Getting started

  1. Click Remix
  2. Save your OPENAI_API_KEY as an environment variable.
  3. Customize PROMPT.txt with your ideal customer profile and instructions for how to research and qualify leads. (Don't change how it structures its final response).
  4. Point your webhook source to this val's HTTP endpoint with a ?source= query param
    • example: https://your-val.web.val.run?source=signup-page
  5. Add email recipients to the RECIPIENTS array in digest.ts
  6. That's it! You'll now receive a daily email digest of only your most qualified leads at 8am PST:

How it works

  • When a new lead comes in via POST, it is forwarded along with the instructions in PROMPT.txt to Claude. The agent uses web search to research the person and determine if they represent an idealCustomer, then explains its reasoning.
  • The input data and agent results are saved in the leads_v3 sqlite table.
  • The main.ts dashboard shows a history of all leads, ideal customers first. Clicking any lead shows the agent's reasoning and all raw data from the process
  • digest.ts runs every day at 8am PST by default.
  • Feel free to change the timing and frequency of the digest.ts cron. It always checks when it was last run and sends every new idealCustomer to the recipients in the array.

Supported sources

Any webhook that sends JSON can be a source. Just POST to the endpoint with ?source=your-source-name:

  • RB2B: ?source=rb2b
  • Tally forms: ?source=tally
  • Zapier: ?source=zapier
  • Custom: ?source=anything

The AI normalizes data from any source into a consistent schema, so you don't need to worry about field mapping.

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.