Skip to main content
Connect Supabase so events on the auth.users table fire Brew automations. Send a real welcome email after the email is verified, or alert the user the moment their password changes. Account-suspension notices work the same way.
  • Trigger automations from Supabase auth events. Real signups, email and phone confirmations, password changes, bans, invites.
  • Auto-sync contacts into your audience. Every Supabase event upserts the user into Brew with supabase-prefixed custom fields (supabaseUserId, supabaseAccountStatus, supabaseEmailVerifiedAt, supabasePhoneVerifiedAt, supabaseLastSignInAt, etc.) you can filter and segment on.
  • Get more than INSERT/UPDATE/DELETE. Brew classifies column-level changes into 9 specific events on top of the 3 raw ones (for example, auth.user.email_confirmed fires the moment email_confirmed_at flips from null to set).
  • Stay safe at scale. Postgres signs every webhook with a shared secret you control (pgcrypto and Vault handle the HMAC), and Brew verifies the signature on receipt.
Every marketing recipient must have opted in to hear from you. Importing or syncing contact data into Brew is not permission to email it. See What You Can Send.

How It Works

Supabase works like every other event source, except that a database trigger sends the events. Brew gives you a webhook URL and setup SQL to paste into your project. The SQL installs pgcrypto and stores your shared secret in Supabase Vault. It adds a trigger on auth.users that signs each change, and pg_net posts it to Brew. Brew checks the signature, then classifies each UPDATE. A column change can match one of the 9 specific events, such as email_confirmed_at going from null to set. Brew then fires that event instead of auth.user.updated. Each verified event starts the matching Live automations and upserts the user into your audience with supabase-prefixed fields. Connected-Source Events has the full model.

Setup

1

Generate your Brew webhook URL

In Brew, open Integrations, click the Supabase card, and click Generate webhook URL. The SQL block in step 3 pre-fills the URL for you.
2

Generate a shared secret

Run openssl rand -hex 32 in your terminal to print a 64-character hex string. You’ll paste this same value into the SQL block (step 3) and the Brew connect form (step 4). You own this secret; Brew and Supabase don’t issue it.
3

Run the setup SQL in Supabase

In your Supabase project, open SQL Editor → New query. Paste the SQL block that Brew shows in the connect dialog. Replace <PASTE_YOUR_SECRET_HERE> with the secret from step 2, then click Run.The block installs the pgcrypto extension and stores your shared secret in Supabase Vault. It also creates a trigger on auth.users that signs every change with HMAC-SHA-256 before pg_net POSTs it to Brew.
4

Paste the same secret into Brew

Paste the secret from step 2 into the Brew connect form and click Connect. Brew uses it to verify every webhook the new trigger sends.
5

Create a test user to verify

After you click Connect, create a test user in Supabase under Authentication → Users. The trigger the setup SQL installed signs and sends the event automatically; there’s no separate “send test” button.Within a few seconds the Supabase integration page in Brew changes from Waiting for test event to Connected. Manage → Recent events shows the delivery with signature ok.If it stays on Waiting for test event, check the setup SQL ran cleanly. Then check that the secret in the SQL block matches the one you pasted into Brew.Create the test user after clicking Connect. Before that, Brew has no connection to route the event to.
Re-running the SQL block after rotating the secret is safe. The block drops and re-creates the trigger idempotently.

Supported Events

Connecting created a trigger for every Supabase auth event below, with no extra setup. Each is on the Triggers page and in the automation builder. Until a Live automation uses one, its events show 0 matched / 0 started in Recent events, which is expected. The Manage tab shows:
  • Webhook URL: the URL your Supabase webhooks point at
  • Supabase 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
Once Brew has received an event, it reads Last event and how long ago. It reads No events yet if it hasn’t fired. No events in 90 days means none arrived in the last 90 days, which is how long Brew keeps each delivery. If an event reads No trigger, click Re-provision. There’s no per-event enable step. An event fires only when its bound automation is Live. Brew supports 12 Supabase auth events, 3 raw envelope types and 9 synthetic UPDATE classifications: Raw envelope events
  • auth.user.created: INSERT into auth.users
  • auth.user.updated: UPDATE that didn’t match a synthetic classification
  • auth.user.deleted: DELETE from auth.users
Synthetic UPDATE events
  • auth.user.email_confirmed: email_confirmed_at transitions from null to set
  • auth.user.phone_confirmed: phone_confirmed_at transitions from null to set
  • auth.user.email_changed: email column changes between rows
  • auth.user.password_changed: encrypted_password changes between rows
  • auth.user.signed_in: last_sign_in_at changes
  • auth.user.banned: banned_until transitions from null to set
  • auth.user.unbanned: banned_until transitions from set to null
  • auth.user.invited: invited_at transitions from null to set
  • auth.user.upgraded_from_anonymous: is_anonymous flips from true to false
A single UPDATE only fires one synthetic event: the highest-priority classification wins. Email confirmation beats phone confirmation, which beats anonymous-to-real upgrade, and so on.
In chat, say “Send the real welcome email after the user confirms their email”. Brew scaffolds the automation with auth.user.email_confirmed pre-selected.

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, and being synced from Supabase isn’t consent. Both means the confirmation is transactional and the follow-up is marketing.
auth.user.signed_in also fires on Supabase token refreshes. For a true “they came back after a long time” signal, add a per-user filter or a wait node.

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. Each event declares its own fields, and an automation won’t publish with a tag its trigger doesn’t declare. Use only the variables listed for your event. Event names below drop the auth.user. prefix.
The Supabase user UUID is not available as a merge tag: it never reaches the trigger payload. Brew writes it to the synced contact as the supabaseUserId custom field instead. Filter, segment, and join on it there.

Troubleshooting

To check delivery, use check_trigger over MCP or GET /v1/automations/triggers/{triggerEventId}/readiness. Its delivery.status is one of:
  • received: Brew has seen the event
  • never_received: Brew hasn’t seen it
  • none_recent: no event in the last 90 days
  • waiting_for_test_event: the project hasn’t sent its first signed delivery
Unless it’s received, delivery.message names the setup step to check.
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 confirms the webhook is arriving. If it isn’t there, the issue is upstream (pgcrypto trigger not installed, secret mismatch).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.
Brew de-duplicates Supabase updates by the row’s updated_at. An UPDATE on auth.users that leaves it unchanged can match an earlier event, so nothing syncs.When you edit users with SQL, set updated_at = now() in the same statement. Brew then fires a fresh auth.user.updated and syncs the contact.
Re-run the setup SQL block from the integration page. The block is idempotent: it re-creates the trigger and re-writes the Vault entry.Confirm that pgcrypto is installed (SELECT * FROM pg_extension WHERE extname = 'pgcrypto';). Then check that the secret in Vault matches the one pasted into Brew.
Supabase token refreshes also bump last_sign_in_at, which fires auth.user.signed_in alongside true sign-ins. Add a per-user wait or filter node in your automation to ignore repeats within a short window. For higher-signal events, rely on auth.user.email_confirmed / auth.user.upgraded_from_anonymous.
Insert a test row into auth.users (or sign up through your normal flow) and watch Manage → Recent events. Build your automation as a Draft and run a test send from the email editor. Publish it to Live once you’re happy.

From an Agent or Code

Connecting Supabase, running the setup SQL, and pasting the shared secret are app-only. From an agent or code, the rest is readable and buildable:
  • list_integrations or GET /v1/integrations confirms Supabase is connected to the brand.
  • check_trigger or GET /v1/automations/triggers/{triggerEventId}/readiness shows whether Brew has received an event and which Live automations consume it.
  • list_trigger_events lists recent deliveries, their match state, and the runs they started.
  • save_automation or POST /v1/automations builds an automation on any event above, and test_automation runs it to one address.
Supabase fires the events, so fire_trigger_event isn’t used here.

Requirements

  • A Supabase project where you can run SQL against the auth schema
  • Permission to install extensions (pgcrypto) and write to Supabase Vault

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.

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.