Skip to main content
Send auth notifications from Supabase by listening to Supabase Auth events in your backend or Edge Function and triggering Novu workflows for signup confirmations, password resets, and security alerts.

How does the Supabase and Novu integration work?

  1. Supabase Auth emits an event (for example, SIGNED_UP or password recovery initiated).
  2. Your application or Edge Function handles the event.
  3. Your handler calls Novu’s Trigger event API with the user’s subscriberId and event payload.
  4. Novu delivers the notification through your configured workflow.

How do I send a signup notification?

1

Create a welcome workflow in Novu

Add email and optional in-app steps to a welcome workflow in the Novu Dashboard.
2

Listen for Supabase auth events

Use a Supabase Edge Function or your application backend to handle auth events:
import { createClient } from '@supabase/supabase-js';
import { Novu } from '@novu/api';

const novu = new Novu({ secretKey: Deno.env.get('NOVU_SECRET_KEY')! });

Deno.serve(async (req) => {
  const { type, record } = await req.json();

  if (type === 'INSERT' && record.email) {
    await novu.trigger({
      workflowId: 'welcome',
      to: { subscriberId: record.id, email: record.email },
      payload: { email: record.email },
    });
  }

  return new Response('ok');
});
3

Handle password reset emails

When using Supabase’s built-in password reset, customize the email template in Supabase or disable it and trigger a Novu password-reset workflow instead. See password reset notifications.

Frequently asked questions

Yes. Disable Supabase email templates for the events you want Novu to handle, then trigger Novu workflows from your auth hooks or Edge Functions.
Use the Supabase user UUID as the subscriberId to keep identifiers consistent across your application and Novu.