• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
project logo

valdottown

Enrich-New-User

Get enriched new user data notifications
Public
Like
1
Enrich-New-User
Home
Code
2
README.md
H
complete-flow.tsx
Branches
1
Pull requests
Remixes
1
History
Environment variables
2
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
/
/
x
/
valdottown
/
Enrich-New-User
/
branch
/
main
/
version
/
111
/
code
/
README.md
/
README.md
Code
/
/
x
/
valdottown
/
Enrich-New-User
/
branch
/
main
/
version
/
111
/
code
/
README.md
/
README.md
Search
7/11/2025
Viewing readonly version of main branch: v111
View latest version
README.md

User Enrichment Flow

Automatically enriches new user signups with Clay and sends notifications to Discord.

Flow

  1. User signs up Clerk webhook -> /newUserSignup
  2. Data sent to Clay Clay enriches profile data
  3. Clay sends back /clayEnrichmentWebhook -> Discord notification

Setup

1. Environment Variables

DISCORD_WEBHOOK=your_discord_webhook_url

2. Clerk Webhook

Configure Clerk to send user.created events to the URL of your HTTP file (main.tsx)

3. Clay Setup (Most Complex Part)

A. Create Clay Table

  1. Create new table called "New User Enrichment"
  2. Click "Pull in data from source" at bottom of table
  3. Select "Pull in data from a Webhook Table"
  4. Click "Edit source" on the Webhook column to get the webhook URL

B. Configure Webhook Source

Update your webhook URL in complete-flow.tsx line 19:

"https://api.clay.com/v3/sources/webhook/pull-in-data-from-a-webhook-YOUR_ID"

C. Add Enrichment Columns

Add these columns to enrich profiles:

  • Find Person � outputs: Name, Title, Org
  • Find LinkedIn Profile � outputs: LinkedIn Profile URL
  • Other enrichment tools as needed

D. Add HTTP API Column

  1. Add "HTTP API" column
  2. Set endpoint: https://your-domain.com/clayEnrichmentWebhook
  3. Set method: POST
  4. Configure request body:
{ "email": "{{email}}", "profile_image_url": "{{profile_image_url}}", "Name": "{{Name}}", "Title": "{{Title}}", "Org": "{{Org}}", "LinkedIn": "{{LinkedIn Profile}}" }
  1. Important: Turn OFF "Only run if" condition so it runs for all rows
  2. Enable "Remove empty values"

Discord Output

Enriched profiles (with P):

P New user! John Doe " Software Engineer @ Tech Corp " john@example.com " https://linkedin.com/in/johndoe " [profile_image_url]

Basic signups:

New user! user@example.org " [profile_image_url]

Troubleshooting

  • No Discord message: Check DISCORD_WEBHOOK environment variable
  • Clay not calling back: Verify HTTP API column is configured and "Only run if" is OFF
  • JSON errors: Check Clay request body syntax (no trailing commas)
  • Missing enrichment: Verify Clay enrichment columns are working first
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.