Send email from Supabase with Loops

Use Supabase’s Send Email Hook for every Auth email, or choose SMTP for the quickest setup. Sync auth.users to Loops contacts with database webhooks, trigger lifecycle email from product events, and add people to your Audience only when you want to send marketing email.

Send Supabase Auth email with the Send Email Hook

Supabase’s Send Email Hook calls an Edge Function you control, which verifies each request and sends the matching published Loops transactional email. The Supabase Send Email Hook guide has the full walkthrough. The short version:

  1. Create one published Loops transactional email for each Supabase Auth action type you use, including signup, magic links, invites, password resets, email changes, reauthentication, and security notifications.

  2. Deploy the Supabase Edge Function from the guide, add your Loops API key and Supabase hook secret, and map each email_action_type to the matching Loops transactional email.

  3. In Supabase, configure the Send Email Hook to call the Edge Function. Test each auth action before relying on it in production.

SMTP is the quicker alternative if you only need the common auth messages. The Supabase SMTP guide covers confirm signup, magic link, invite, email change, and password reset. You can move to the Send Email Hook later without rebuilding the Loops templates.

Trigger lifecycle email from product events

For everything past authentication (trial started, plan upgraded, invite accepted) send a Loops event from a Supabase edge function or your server, and let a Loops workflow decide what goes out. Install the loops package and call sendEvent:

import { LoopsClient } from "loops";

const loops = new LoopsClient(process.env.LOOPS_API_KEY);

await loops.sendEvent({
  email: user.email,
  eventName: "trial_started",
  eventProperties: {
    plan: "pro",
  },
});

That posts to https://app.loops.so/api/v1/events/send. Keep the API key server-side. The eventName matches a workflow trigger in Loops, and eventProperties flow into the email as personalization. To sync users without writing code, the Supabase integration uses database webhooks on the auth.users table, so INSERT, UPDATE, and DELETE events create, update, and remove Loops contacts automatically.

What you get

Loops matches contacts by their Supabase user ID, so auth events and product events land on the same person instead of two disconnected lists. The subject, body, and design live in published Loops templates, so copy and layout changes ship from the editor instead of a code push. Every auth and lifecycle email goes out from your verified sending domain, and Loops records what was sent, when, and to whom.

Set it up

The fastest path is to let a coding agent wire it up. Run the Loops installer, then point Claude Code, Codex, or Cursor at your Supabase project:

curl -fsSL https://install.loops.so/wizard | sh

The agent installs the CLI and the Loops skills. See Loops for agents and the agent quickstart for what it can do.

To do it manually, follow the Supabase Send Email Hook guide for the recommended auth path, the Supabase contact sync guide for user sync, and the send event reference for product events. For inbox placement, read transactional email best practices.

FAQ

Does this replace Supabase's built-in email?

Which Supabase features does it touch?

Is there a free tier?