New User Enrichment

Enrich new user data with a webhook and post results to Slack

How it works

  • Your application sends a request to this webhook with a user's email address.
  • This webhook uses the Val Town Clay Proxy to enrich the user data with information like their LinkedIn profile, company name, company size, funding state, total funding, and more.
  • The results are sent to your own Slack webhook

Getting started

  1. Remix this val
  2. Create a custom Slack app with an incoming webhook and add its URL as SLACK_WEBHOOK_URL. See the docs for Sending Slack messages for more info.
  3. Use main.test.ts to test that your enrichment works. You should see a message in your Slack channel.
  4. In your own application, add logic to send a request to this webhook when new users sign up.

Pricing

This val uses Clay under the hood to provide user enrichments. The Val Town Clay Proxy is only available to paying Val Town Team accounts. To sign up to use this val, please send an email to enrichment@val.town.

Authentication your webhook

To make this more secure, you can optionally set a WEBHOOK_SECRET environment variable and only accept requests that use the secret when posting.

// Add this to `main.ts` to only accept requests that include the secret const secret = req.headers.get("Authorization"); if (secret !== `Bearer ${Deno.env.get("WEBHOOK_SECRET")}`) { return new Response("Unauthorized", { status: 401, }); }