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: v121View latest version
Use Clay like an API to automatically enrich new user signups and send notifications to Discord.
Clay doesn't offer an API, but this val creates one by listening to webhooks, enriching data in Clay, and sending HTTP requests back when enrichment is complete.
- Create a new Clay workbook called "New User Enrichment"
- Click Add → Pull in data from source at the bottom
- Select Pull in data from a Webhook Table
- Click Edit source on the Webhook column to copy the webhook URL
- Update the webhook URL in your
main.tsxfile:
"https://api.clay.com/v3/sources/webhook/pull-in-data-from-a-webhook-YOUR_ID"
Add whichever enrichment columns you want. This example uses:
- Enrich Person → Name, Title, Org
- LinkedIn Profile → LinkedIn URL
- Add HTTP API column to your Clay table
- Set endpoint:
https://your-val-url.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}}" }
- Enable Remove empty values
- Click Environment Variables in your val's sidebar
- Add: DISCORD_WEBHOOK_URL with your Discord webhook URL
Configure your source system (Clerk, Stripe, etc.) to send webhooks to:
https://your-val-url.com/newUserSignup
Enriched profiles (with ⭐):
⭐ New user! John Doe • Software Engineer @ Tech Corp • john@example.com • https://linkedin.com/in/johndoe
Basic signups:
New user! user@example.org • [profile_image_url]
This pattern works for any webhook source. Try it with Stripe customers, form submissions, or any other user data you want to enrich automatically.