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

Lead Inbox

POST any lead data to this webhook for AI-powered qualification.

Getting started

  1. Remix this val
  2. Set OPENAI_API_KEY in this val's environment variables
  3. Copy the HTTP endpoint from main.ts into your webhook source
  4. Customize PROMPT.txt
  5. Specify which email(s) in RECIPIENTS in digest.ts

You will receive a daily email of only your most qualified leads.

How it works

  • POST any JSON to this val's HTTP endpoint. The data is forwarded along with the instructions in PROMPT.txt to an OpenAI agent. The agent uses its reasoning and web search tool to determine if the lead is an idealCustomer and explains its reasoning.
  • The input data and agent results are saved in the leads sqlite table, and the agent's entire run history is saved in blob storage.
  • The main.ts dashboard shows a history of all leads, ideal customers first. Clicking any lead shows the agent's reasoning and all data from the process.
  • digest.ts runs daily by default. Feel free to change the timing and frequency.

Optional: source tracking

Add ?source=rb2b (or any label) to the webhook URL to track where leads came from.

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.