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: v36View latest version
AI-powered lead qualification for any data source. Point your webhooks here for an automatic digest of your most qualified leads.
- Click Remix
- Set
OPENAI_API_KEYin this val's environment variables - Customize
PROMPT.txtwith your ideal customer profile and instructions for how to research and qualify leads. (Don't change how it structures its final response). - Point your webhook source to this val's HTTP endpoint with a
?source=query param, e.g.https://your-val.web.val.run?source=rb2b - Add email recipients to the
RECIPIENTSarray indigest.ts - That's it! You'll now receive a daily email digest of only your most qualified leads at 8am PST.
- When a new lead comes in via POST, it is forwarded along with the instructions
in
PROMPT.txtto Claude. The agent uses web search to research the person and determine if they represent anidealCustomer, then explains itsreasoning. - The input data and agent results are saved in the
leads_v3sqlite table. - The
main.tsdashboard 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.tsruns every day at 8am PST by default.- Feel free to change the timing and frequency of the
digest.tscron. It always checks when it was last run and sends every newidealCustomerto the recipients in the array.
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.