rb2b
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.
Connect this val to RB2B for an AI-powered digest of your most qualified leads.
- Remix this val
- Set
OPENAI_API_KEYin this val's environment variables - Copy the HTTP endpoint for
main.tsinto rb2b's webhook integration - Customize
PROMPT.txtwith instructions for how to properly research if a lead represents an ideal customer, and anything you want the agent to include in its reasoning. (Don't change how it structures its final response). - Specify which email(s) to send the daily digest in
RECIPIENTSindigest.ts
You will now receive a daily email of only your most qualified RB2B leads at 8am PST.
- Once you've added your val's HTTP endpoint rb2b's webhook integration, rb2b will begin forwarding every new lead to this val.
- When a new lead comes in from RB2B, it is forwarded along with the
instructions in
PROMPT.txtto an OpenAI agent. The agent uses its reasoning and web search tool to determine if the lead represents anidealCustomerand explains itsreasoning. - The RB2B data and agent results are saved in the
rb2b_leads_v2sqlite table, and the agent's entire run history is saved in blob storage. - The
main.tsdashboard shows a history of all runs, ideal customers first. Clicking any lead will take you to itsrunIdpage, where you can view the agent's reasoning as well as all sqlite and blob data from the entire process (this is what is included when anidealCustomeris added to the email digest):