Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.brew.new/llms.txt

Use this file to discover all available pages before exploring further.

Connect Stytch to Brew so user and team events fire automations. Send a welcome email when a Consumer user signs up, welcome the workspace owner when a new B2B org is created, or notify owners when a teammate is added or removed.

What you can do

  • Trigger automations from Stytch events. Kick off email flows from Consumer (B2C) or B2B auth events
  • Auto-sync contacts into your audience. Every Stytch event upserts the user / member into Brew with stytch_* custom fields you can filter and segment on
  • Pick Consumer or B2B at connect time. Brew filters events to the vertical you select, so Consumer connections won’t fire B2B events and vice versa
  • Cover lifecycle + team workflows in one place. Onboarding, invites, role changes, offboarding, SCIM provisioning
Stytch webhooks require the B2B Pro tier for B2B projects. Consumer webhooks ship on all paid Stytch plans.

How it works

  1. Brew mints a unique webhook URL for your brand and you paste it into your Stytch Dashboard.
  2. Stytch signs every webhook with your endpoint’s signing secret. Brew verifies via the Standard Webhooks (Svix) spec on receipt.
  3. Brew filters events to the project type you selected (Consumer or B2B) and to direct.* events only — dashboard.* and scim.* source events are dropped so manual operator clicks don’t accidentally email customers.
  4. For each verified event Brew (a) starts every matching automation and (b) upserts the Stytch user / member into your audience with stytch_* custom fields.
See How event triggers work for the conceptual flow shared by every event-source integration.

Setup

1

Generate your Brew webhook URL

In Brew, open Integrations, click the Stytch card, and click Generate URL. Copy the URL Brew generates.
2

Pick your Stytch project type

Choose Consumer (B2C) or B2B in the Brew connect form. Brew uses your selection to filter which events fire automations for this brand.
3

Add an endpoint in Stytch

Open stytch.com/dashboard, go to Webhooks → + Add Endpoint, and paste the Brew URL into the Endpoint URL field.
4

Subscribe to the events Brew supports

For Consumer projects: enable direct.user.create, direct.user.update, and direct.user.delete.For B2B projects: enable direct.organization.create, direct.member.create, direct.member.update, direct.member.delete, and direct.scim_connection.create.Click Create.
5

Reveal the Signing Secret

On the endpoint settings page Stytch shows next, reveal the Signing Secret. The value starts with whsec_.
6

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.
7

Verify it's working

Trigger an event in Stytch (e.g. sign up a test Consumer user, or add a member to a B2B org). Within a few seconds it should appear in the Manage → Recent events panel of the Stytch integration page in Brew. If it doesn’t, recheck the signing secret in step 6.
Brew only processes direct.* events (real API / SDK calls). Dashboard- and SCIM-source events are dropped so manual operator clicks don’t accidentally email your customers.

Triggering automations

Once connected, Stytch events show up as available triggers in the automation builder. Open the Manage tab in the Stytch integration to enable the specific events you want to fire automations.

Supported events

Brew supports the following 8 Stytch events: Consumer (B2C)
  • direct.user.create
  • direct.user.update
  • direct.user.delete
B2B
  • direct.organization.create
  • direct.member.create
  • direct.member.update
  • direct.member.delete
  • direct.scim_connection.create
In chat, say “Welcome new B2B members” and Brew will scaffold the automation with direct.member.create pre-selected.

Common patterns

GoalStytch event
Welcome a new Consumer userdirect.user.create
Sync profile changes into Brew contactsdirect.user.update
Send a farewell email on account deletiondirect.user.delete
Welcome the workspace ownerdirect.organization.create
Welcome the new teammatedirect.member.create
Confirm a role changedirect.member.update
Offboarding emaildirect.member.delete
Ops alert when SCIM is wireddirect.scim_connection.create

Personalization

VariableExample
{{@trigger:output.payload.firstName}}Alex
{{@trigger:output.payload.lastName}}Morgan
{{@trigger:output.payload.organizationName}}Acme Inc.
{{@trigger:output.payload.role}}admin

Troubleshooting

Brew provisions every Stytch event disabled-by-default. Open the Stytch integration in Brew, go to the Manage tab, and toggle the event ON. Then make sure at least one of your automations uses it as a trigger and is set to Published.
Each Stytch connection is scoped to one project type — Consumer or B2B. If you need both, connect Stytch twice (one connection per project type). Check which project type you picked during setup on the Stytch integration page.
The signing secret in Brew doesn’t match the one in Stytch’s Dashboard — usually because it was rotated in one place but not the other. Reveal the current secret on the Stytch endpoint settings page and re-run setup step 6 in Brew.
Working as intended. Brew only processes direct.* events so manual operator actions in the Stytch Dashboard, or SCIM-driven provisioning changes, don’t accidentally fire customer-facing emails.

Requirements

  • A Stytch account on any paid plan (B2B webhooks require B2B Pro or higher)
  • Admin access to your Stytch Dashboard so you can add a webhook endpoint and reveal 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:

Search Documentation

Type in the “Ask any question” search bar at the top left to instantly find relevant documentation pages.

ChatGPT/Claude Integration

Click “Open in ChatGPT” at the top right of any page to analyze documentation with ChatGPT or Claude for deeper insights.