- Trigger automations from Clerk events. Kick off email flows when users sign up, orgs are created, subscriptions go past due, or waitlist entries arrive.
- Auto-sync contacts into your audience. Every Clerk event upserts the user into Brew with
clerk-prefixed custom fields (clerkUserId,clerkSubscriptionStatus,clerkPlanName, …) you can filter and segment on. - Personalize with auth context. Reference
firstName,lastName,planName,organizationName, and other Clerk fields inside emails. - Cover lifecycle and billing in one place. Onboarding, dunning, win-back, and waitlist nurture all use the same Clerk connection.
How It Works
Clerk works like every other event source. Brew gives you a webhook URL and verifies each delivery. Each verified event starts the matching Live automations and upserts the Clerk user into your audience withclerk-prefixed fields.
Connected-Source Events has the full model.
What’s Clerk-specific: Clerk signs each webhook with your endpoint’s signing secret. Brew checks it with the Standard Webhooks (Svix) spec and rejects tampered or replayed events.
Setup
1
Generate your Brew webhook URL
In Brew, open Integrations, click the Clerk card, open the Setup tab, and click Generate webhook URL. Copy the URL Brew generates for the next step.
2
Add an endpoint in Clerk
Open dashboard.clerk.com and go to the Webhooks page. Click Add Endpoint and paste the Brew URL into the Endpoint URL field.
3
Subscribe to the events Brew supports
Under Subscribe to events, select the user, organization, organizationInvitation, organizationMembership, paymentAttempt, subscription, subscriptionItem, and waitlistEntry events (full list below). Then click Create. Clerk lists every event name in the Event Catalog tab on the Webhooks page.
4
Reveal the Signing Secret
On the endpoint detail page Clerk shows next, copy the Signing Secret. If it’s hidden, click the eye icon to reveal it. The value starts with
whsec_.5
Paste the Signing Secret into Brew
Paste the
whsec_… secret into the Brew connect form and click Connect. Brew verifies every webhook using the Standard Webhooks (Svix) spec.6
Verify it's working
Trigger an event in Clerk (for example, sign up a test user or send a test invite). Within a few seconds it should appear in Manage → Recent events on the Clerk integration page in Brew. If it doesn’t, recheck the signing secret in step 5.
Brew only listens for Clerk events. It can’t modify users, create organizations, or charge subscriptions.
Supported Events
Once connected, every Clerk event below is provisioned automatically and available as a trigger in the automation builder. The Manage tab shows:- Webhook URL: the URL your Clerk webhooks point at
- Clerk events: how many events Brew has received, and each event’s status
- Recent events: up to 25 of the newest deliveries that passed the signature check
user.createduser.updateduser.deleted
organization.createdorganizationInvitation.createdorganizationInvitation.acceptedorganizationInvitation.revokedorganizationMembership.createdorganizationMembership.deleted
paymentAttempt.createdsubscription.createdsubscriptionItem.freeTrialEndingsubscriptionItem.pastDuesubscriptionItem.canceledsubscriptionItem.abandoned
waitlistEntry.created
Common Patterns
Kind follows What You Can Send. Send transactional email (a direct response to something the person did) from a transactional-purpose domain. Marketing email needs the contact’s opt-in. Both means the confirmation is transactional and the follow-up is marketing.
For the full waitlist flow, from signup to launch day, see Launch from a Waitlist.
Personalization
These resolve as merge tags in the email body, subject line, and preview text. Use a fallback wherever an empty value would read badly, like{{ firstName | there }}. The trigger. prefix reads the same field, so {{ trigger.firstName }} and {{ firstName }} resolve alike; see Namespaces.
Use Clerk payload fields anywhere in your emails. Common variables:
Only
firstName, lastName, and createdAt are available on every Clerk event; the rest are event-specific. A tag the trigger’s event doesn’t declare blocks publishing, even with a fallback. Use only the tags your event lists.Names arrive only when Clerk collects them. If your Clerk sign-up doesn’t ask for one,
firstName and lastName arrive empty. Turn on First and last name in your Clerk user settings, or keep a fallback on every name tag.A waitlist sign-up fires
waitlistEntry.created, not user.created. Brew creates a subscribed contact with no name and a clerkWaitlistStatus of pending. The person fires user.created later, when they sign up for real.Joining a waitlist isn’t marketing consent, so send these contacts marketing only if they opted in.Clerk organization events (like
organization.created) don’t carry a customer email. Brew emits a synthetic placeholder so you can still route the event internally. The event also carries name, slug, membersCount, and maxAllowedMemberships for the org itself.To email a real person about a new workspace, trigger on organizationMembership.created instead. It carries the member’s own email, organizationName, and roleName.Troubleshooting
An event arrived but no automation fired
An event arrived but no automation fired
Open the canvas and confirm at least one automation bound to this event is set to Live (not Draft). The Brew integration’s Manage → Recent events panel shows every webhook Clerk has delivered. If the event isn’t there, the webhook isn’t arriving (check Clerk’s endpoint settings and re-paste the signing secret).If the event is there but no email sent, the automation may be unpublished, or the contact unsubscribed or suppressed. From an agent,
check_trigger lists what blocks the trigger, and list_trigger_events shows each event’s match state and its runs.Clerk shows 401 on every delivery
Clerk shows 401 on every delivery
The signing secret in Brew doesn’t match the one in Clerk’s Dashboard. Usually it was rotated in one place but not the other. Reveal the current secret on the Clerk endpoint detail page and re-run setup step 5 in Brew.
I want to test before going live
I want to test before going live
Create a Draft automation, run a test send from the email editor, and publish to Live once you’re happy. The Manage → Recent events panel shows every webhook Clerk delivered in the last 24 hours. Use it to verify the trigger fires the way you expect.
From an Agent or Code
Connecting Clerk, adding the endpoint, and pasting the Signing Secret are app-only. From an agent or code, the rest is readable and buildable:list_integrationsorGET /v1/integrationsconfirms Clerk is connected to the brand.check_triggerorGET /v1/automations/triggers/{triggerEventId}/readinessshows whether Brew has received an event and which Live automations consume it.list_trigger_eventslists recent deliveries, their match state, and the runs they started.save_automationorPOST /v1/automationsbuilds an automation on any event above, andtest_automationruns it to one address.
fire_trigger_event isn’t used here.
Requirements
- A Clerk account on any plan. Webhooks are included on the free Hobby plan.
- Admin access to your Clerk Dashboard so you can add a Webhook endpoint and copy the Signing Secret.
Need Help?
Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:- Self-Service Tools
- Talk to Our Team
Search Documentation
Type in the “Ask any question” search bar at the top left to instantly find relevant documentation pages.
Ask ChatGPT or Claude
Click here to open the Copy page menu at the top of this page, then send the page to ChatGPT, Claude, or your editor.