• Townie
    AI
  • Blog
  • Docs
  • Pricing
Log inSign up
valdottown

valdottown

blog

Val Town's Blog
Public
Like
8
blog
Home
Code
9
components
12
posts
9
routes
6
styles
1
utils
8
IMAGES.md
README.md
TODOs.md
H
index.ts
Branches
5
Pull requests
1
Remixes
16
History
Environment variables
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
/
posts
/
2025-08-12-clay.md
Code
/
posts
/
2025-08-12-clay.md
Search
8/12/2025
Viewing readonly version of clay branch: v7
View latest version
2025-08-12-clay.md
title:
How we built an API for Clay
description:
How to enrich your users to find your ideal customers
pubDate:
2025-08-12T00:00:00.000Z
author:
Charmaine Lee

This post is for our fellow engineers & founders doing GTM / sales.

I used to think doing enrichment was for big companies with massive outbound sales functions.

Before launching Val Town for Teams (coming this week!), we set a goal: find 10 pre‑sales customers. All the sudden, I was spending all my time looking for teams who could be the right fit.

Our best channel was obviously new users signing up for Val Town. However, scrolling through emails and hoping we recognize someone quickly became unsustainable. (And really it only works for celebrities anyways.)

Clearbit vs Clay vs Val Town

Clearbit used to be the obvious answer, but post‑HubSpot acquisition, it's no longer an option for small new customers.

Clay is great, but we wanted to use it like an API so anyone on our team could use it programatically, without Clay knowledge or set-up.

We asked on X, the CEO replied, and that nudged us to build an API proxy ourselves.

You can pass in data via a webhook and pass it to any system after that

— Kareem Amin (@kareemamin) May 1, 2025

Introducing: Clay API Proxy

We turned Clay into an API / SDK on Val Town via our Clay API Proxy.

The problem we had to solve is you can add rows to a Clay table, but then you have to wait for a webhook to another endpoint. We wanted to be able to make a single request and get back the enriched data as the response.

Here's how it works:

  1. Your val imports and calls clay() with an email or GitHub username.
  2. Our proxy authenticates you as a Val Town user
  3. We generate a request id, and forward the payload to Clay with that id
  4. Clay enriches, and POSTs the result back using the same id. We save the result to sqlite.
  5. While your original request is still open, we poll sqlite for it.
  6. When it returns, we give you the JSON back in the normal request/response pattern.

Enriching emails with Clay is now as simple as:

Create val
import { clay } from "https://esm.town/v/charmaine/clay-proxy/sdk.ts"; const result = await clay({ email: "charmaine@val.town", source: "user_signup" });

Everything changed when we started funneling this new enriched data directly into our Discord. Our users were no longer a long list of anonymous emails.

We were able to more efficiently spend our time interacting with our ICP (Ideal Customer Profile) as soon as they sign up, instead of combing through endless dashboards in search of a unicorn.

How this helps

User enrichment is a big part of how we successfully found our first 10 pre-sales customers.

  • We see new users joining in real-time, with their enriched profiles
  • Anyone can start a thread, tag the right person, or notify everyone else that they've already reached out. For example: image.png
  • Warm intros were easy to track
  • The team then starts building intuition about: how many new users joined, are we attracting ICP, who owns follow‑ups etc.

Then what?

Once you have this data on Val Town, there's lots you can do.

Here are some examples:

  • Enrich yours' or your competitors' GitHub repo stargazers
  • For fellow devtool companies, we reach out with an auto‑generated Val that runs their SDK so the first touch includes a working demo. This got some great responses! Screenshot 2025-08-07 at 4.36.15 PM.png
  • Get Townie to build custom outbound demos etc. based on their profile - Patrick Spychalski has a great example post with a similar workflow.

We've been loving these experiments and would love to help more engineers scale the traditional GTM function. More to come!

👉 Enrich users with a single line of code through our Clay API Proxy

FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.