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: v117View 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 (blank) Workbook called "New User Enrichment"
- At the bottom of the Workbook, click
Add->Pull in data from source - 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 main.tsx:
"https://api.clay.com/v3/sources/webhook/pull-in-data-from-a-webhook-YOUR_ID"
Add whichever columns you are interested in, this example uses:
- Enrich Person -> Name, Title, Org
- LinkedIn Profile
- 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}}" }
- 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]