Public
Like
1
Enrich-New-User
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: v113View latest version
Automatically enriches new user signups with Clay and sends notifications to Discord.
- User signs up Clerk webhook ->
/newUserSignup - Data sent to Clay Clay enriches profile data
- Clay sends back
/clayEnrichmentWebhook-> Discord notification
DISCORD_WEBHOOK=your_discord_webhook_url
Configure Clerk to send user.created events to the URL of your HTTP file (main.tsx)
- Create new table called "New User Enrichment"
- Click "Pull in data from source" at bottom of table
- Select "Pull in data from a Webhook Table"
- Click "Edit source" on the Webhook column to get the webhook URL
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"
Add these columns to enrich profiles:
- Find Person � outputs: Name, Title, Org
- Find LinkedIn Profile � outputs: LinkedIn Profile URL
- Other enrichment tools as needed
- Add "HTTP API" column
- Set endpoint:
https://your-domain.com/clayEnrichmentWebhook - Set method:
POST - Configure request body:
{ "email": "{{email}}", "profile_image_url": "{{profile_image_url}}", "Name": "{{Name}}", "Title": "{{Title}}", "Org": "{{Org}}", "LinkedIn": "{{LinkedIn Profile}}" }
- Important: Turn OFF "Only run if" condition so it runs for all rows
- Enable "Remove empty values"
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]
- No Discord message: Check
DISCORD_WEBHOOKenvironment 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