Turn new Clerk signups into HubSpot contacts and Slack alerts
Every time someone signs up, we enrich their profile, add them to HubSpot without creating duplicates, and post a friendly heads-up to your signups channel.
When a new user signs up in my Clerk application, run this automatically. Trigger on Clerk's user.created webhook event. The goal is to enrich the new signup and route them into my CRM and team chat so sales can pick them up quickly. Build this as an agent so it can decide whether to create a fresh HubSpot contact or reuse an existing one, pick the right lifecycle stage, and write a friendly summary instead of dumping raw fields.
First, look at the new user's primary email address. If its domain matches any of my internal or test domains, stop and do nothing. My skip list is: example.com, test.com, and my own company domain mycompany.com. Replace these with your real internal and test domains before running.
Enrich the signup using Clerk's Retrieve a user operation with the user ID from the webhook payload. Pull the full profile: first and last name, primary email address, the sign-up source or identifier the account was created with, and anything useful in the user's public_metadata. The webhook payload already carries most of this, so treat Retrieve a user as the source of truth for the final, up-to-date profile.
Infer the company domain from the email address, meaning the part after the @ sign. Skip this when the email is on a common consumer provider like gmail.com, outlook.com, or yahoo.com, since there is no company domain in that case. Otherwise treat that domain as the company so sales can prioritize business signups.
Add the person to HubSpot. First check whether a contact with this email already exists, using Get Contact to look them up by email or Search Contacts filtered on the email. If a contact already matches, treat them as an existing contact, do not create a duplicate, and note that they signed up again. If no contact matches, use Create Contact to add them with their email, first and last name, the inferred company domain, and a sensible lifecycle stage. Decide the lifecycle stage yourself based on the signup: a fresh product signup is usually a lead, but choose subscriber, marketingqualifiedlead, or another stage if the sign-up source or metadata suggests a better fit.
Finally, post a short summary to my signups channel using the Slack Bot Send a Message operation. Write a friendly one-line profile of who just joined instead of dumping raw fields, for example: Jane Doe (jane@acme.com) just signed up via Google, works at acme.com, and was added to HubSpot as a new lead. Mention whether they were newly created in HubSpot or matched an existing contact, and include the inferred company domain when there is one so sales can prioritize.
Use your judgement throughout: decide whether to create a fresh HubSpot contact or reuse an existing one, pick the most fitting lifecycle stage, and craft a natural, readable Slack summary rather than a data dump.
Additional information
What does this prompt do?
- Runs the moment a new user signs up in your Clerk app, so no signup slips through the cracks.
- Builds a clean profile for each new person from their name, email, sign-up source, and the company behind their email address.
- Adds them to HubSpot with a sensible lifecycle stage, reusing an existing contact when the email already matches instead of creating duplicates.
- Posts a friendly one-line summary of who just joined to your signups channel in Slack.
What do I need to use this?
- A Clerk application with new user sign-ups enabled.
- A HubSpot account where new contacts can be created and looked up.
- A Slack workspace with a channel for signup notifications.
- A list of any internal or test email domains you want to skip.
How can I customize it?
- Change which email domains get skipped, such as your own team's addresses or test accounts.
- Adjust the lifecycle stage new contacts land on in HubSpot, for example lead, subscriber, or marketing qualified lead.
- Pick which Slack channel gets the heads-up and tweak the wording of the summary.
Frequently asked questions
Does this create duplicate contacts in HubSpot?
Will it skip our own team's test sign-ups?
How does it figure out which company someone is from?
Does the Slack message just dump raw data?
Do I need a paid HubSpot plan?
Related templates
Never miss a new signup again.
Automatically enrich every new user, add them to your CRM, and let your team know the moment they join.