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: v23View latest version
This guide explains how to set up Clay to enrich new user data and integrate with your Val.town webhook.
- Log into Clay and create a new table
- Name it something like "New User Enrichments"
Add these columns to receive data from your Val:
email(Text)profile_image_url(Text)signup_timestamp(Text)source(Text)
Add enrichment providers to gather data:
- Add "Find Person & Company from Email" enrichment
- Map the
emailcolumn as input - This will provide:
- Full name
- Company name
- Job title
- LinkedIn URL
- Location
- Add "Enrich Company" column
- Use the company name from email enrichment
- This provides:
- Industry
- Company size
- Website
- Description
- In Clay, add an "HTTP API" column at the beginning
- Configure it as a webhook receiver:
- Method: POST
- This will generate a unique webhook URL
- Copy this URL - you'll need it for your Val
- Add another "HTTP API" column at the end
- Configure it to send enriched data back:
- Method: POST
- URL: Your Val's Clay webhook endpoint (e.g.,
https://yourval.val.run/clayEnrichmentWebhook) - Body: Include all enriched fields you want to send back
Example body:
{ "email": "{{email}}", "company": "{{company_name}}", "title": "{{job_title}}", "linkedin": "{{linkedin_url}}", "location": "{{location}}", "industry": "{{industry}}", "company_size": "{{company_size}}" }
Add these to your Val environment:
CLAY_WEBHOOK_URL: The webhook URL from Clay's inbound HTTP API columnCLAY_WEBHOOK_SECRET: (Optional) A secret key for authenticating Clay callbacksCLERK_SECRET_KEY: Your Clerk authentication tokenDISCORD_WEBHOOK: Your Discord webhook URL
1. New User Signs Up (Clerk)
β
2. Clerk Webhook β Val.town
β
3. Val sends data to Clay webhook
β
4. Clay enriches the data
β
5. Clay sends enriched data back to Val
β
6. Val formats and sends to Discord
- Deploy the updated Val code
- Test with a signup to ensure:
- Data flows to Clay
- Enrichments run properly
- Discord receives formatted messages
- Rate Limiting: Configure Clay's rate limits if needed
- Conditional Logic: Add Clay formulas to handle missing data
- Additional Enrichments: Add more data providers as needed
- Filtering: Use Clay's filters to skip certain domains