Skip to main content
Connect Supabase to Brew, and changes to your auth.users table do two things:
  • Events. A new user can start a published automation, such as a signup notification.
  • Contacts. New users and updates add or update the person in your audience, with supabase fields.
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 Connects

A database trigger on auth.users sends changes to Brew through a sender function. A new user can start a published automation that uses Supabase - User Created. An update can change an existing contact even when no automation uses that event.

Requirements

  • A Supabase project and a Brew brand.
  • A configured database sender on auth.users.
  • SQL access to the auth schema if you plan to make changes directly in SQL.

Setup

To check an existing connection, check that the trigger on auth.users is enabled and its sender function is present. In a project using the brew_notify_auth_users trigger, look for the sender function notify_auth_users_change.

Events

Brew has 12 Supabase triggers. Three are raw events, and nine classify an update by what changed:
  • A password-only change with an advanced updated_at arrives as auth.user.password_changed.
  • A metadata-only change with an advanced updated_at arrives as auth.user.updated.
All 12 declare a required email string and these optional fields:
  • Strings: phone, role, firstName, lastName, fullName, avatarUrl, displayName, and provider.
  • Integers: createdAt, lastSignInAt, and emailConfirmedAt.
Use these fields as merge tags. The trigger’s payload contract lists its exact fields. The Supabase user ID isn’t one of them: read it from the contact’s supabaseUserId.

Contacts

Brew can create a contact when a user is created in Supabase. A metadata update can change firstName on an existing contact in place. A new signup can have both name fields absent. A new contact from Supabase can be subscribed, with no consent record. Confirm the person opted in before you send marketing email.

Check It Works

  1. Check that Supabase is connected to your Brew brand. Review the published automations that use Supabase - User Created.
  2. Create a test user in the connected Supabase project.
  3. Check for a new auth.user.created receipt. Its arrival time matches delivery.lastReceivedAt in the trigger’s readiness.
  4. Look up the test user’s email in Brew to check the contact.

Common Patterns

  • Send a signup notification. Bind an automation to Supabase - User Created. To check delivery, look for Sent and Delivered in Analytics with Supabase - User Created in the Source column.
  • Sync a profile change. Give a metadata-only update a new updated_at value. Check for a fresh Supabase - User Updated receipt, and read the contact to confirm the change.

Limits

  • Receipts. A receipt shows its processing state and the runs it started, not the event’s values. Read the payload contract for declared fields and the contact for stored values.
  • Duplicate updates. Brew can skip an update whose updated_at hasn’t changed. See Troubleshooting.

Troubleshooting

Check whether the update advanced updated_at. Brew can skip an update with an unchanged timestamp as a duplicate.The sender still gets HTTP 200, with received: true and deduplicated: true and a reference to the earlier receipt.
Check the receipt’s matched automations and runs, and the published automations that use that trigger. A receipt can read fired with zero runs.

From an Agent or Code

Setting up the database sender happens in Supabase. After that, an agent connected over MCP can check deliveries and build automations. Ask in plain English:
“Has Brew received an auth.user.created event from Supabase, and did it start a run?”
“Build an automation on Supabase User Created and test it as a draft without sending email.”
From code:
  • GET /v1/integrations shows whether Supabase is connected.
  • GET /v1/automations/triggers/{triggerEventId}/readiness returns delivery. It reads received once Brew has seen the event, with the latest arrival in delivery.lastReceivedAt. An event Brew hasn’t seen reads never_received.
  • GET /v1/automations/trigger-instances lists each receipt with its state and the runs it started.
  • GET /v1/automations/triggers/{triggerEventId}/contract returns the trigger’s declared fields.

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.