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 main branch: v23View latest version
AI-powered lead filter. Accepts data from any source, uses AI to research and qualify leads, then displays them in a dashboard and sends digest emails.
-
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" } -
View dashboard - Visit the endpoint URL in your browser
-
Configure digest - Edit
digest.tsto add email recipients
- Data arrives via POST with
?source=your-source - AI researches the person and extracts: name, company, role, email, LinkedIn
- AI qualifies them against your ICP:
yes,no, orinsufficient_data - Lead is stored and visible in dashboard
- Daily digest emails ideal leads
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
Create a new interval file that calls processLead:
import { processLead } from "./main.ts";
export default async function cron() {
const newData = await fetchFromSomewhere();
for (const item of newData) {
await processLead(item, "my-source");
}
}
Edit PROMPT.txt to describe your ideal customer profile.
Edit digest.ts and add emails to the RECIPIENTS array.
main.ts- HTTP endpoint + routingdb.ts- Database schema + queriesdashboard.tsx- Web UIdigest.ts- Email digest cronagent.ts- AI qualification logicPROMPT.txt- ICP prompt for AItesting.ts- Test utilities