Supabase integration

Supabase + else.events — product emails beyond auth

Supabase handles auth emails (verification, password reset). else.events handles your product emails — triggered from database webhooks, Edge Functions or your backend.

Supabase auth emails are not your product emails

Supabase handles auth — not lifecycle emails

Supabase sends email verification and magic links. It does not send welcome emails, onboarding sequences or billing notifications.

Database webhooks need email dispatch logic

When a new row is inserted into users or a project status changes, triggering the right email requires custom logic.

Edge Functions accumulate email code

Using Supabase Edge Functions to send email means maintaining Deno-compatible email library code in your Edge Function.

No central email audit for Supabase events

Which product emails fired when a user signed up via Supabase auth? Without a log, this is hard to answer.

Trigger else.events from Supabase Edge Functions or database webhooks

Edge Function as event forwarder

Create a Supabase Edge Function that calls the else.events API. Trigger it from database webhooks or from your client.

Database webhooks to else.events

Use Supabase database webhooks (pg_net or HTTP extension) to POST events to else.events when rows are inserted or updated.

Templates outside your Edge Functions

Edit product email copy in the else.events dashboard — no Edge Function redeployment required.

Works alongside Supabase auth emails

else.events handles product emails. Supabase handles auth emails. No conflict, no duplication.

// Supabase Edge Function → else.events

Trigger else.events from a Supabase Edge Function.

// supabase/functions/send-welcome/index.ts (Deno)
import { serve } from "https://deno.land/std@0.168.0/http/server.ts";

serve(async (req) => {
  const { record } = await req.json(); // from database webhook

  await fetch("https://app.else.events/api/events", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${Deno.env.get("ELSE_EVENTS_API_KEY")}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      type: "user.signed_up",
      user: { email: record.email, name: record.full_name ?? "User" },
      data: { plan: record.plan ?? "free", source: "supabase" },
    }),
  });

  return new Response("ok");
});

An Edge Function receives the Supabase database webhook payload and forwards a clean event to else.events. Templates are managed outside Deno — no function redeployment for copy changes.

Frequently asked questions

Does else.events replace Supabase auth emails?
No. Supabase handles auth emails (email verification, magic links, password reset). else.events handles your product emails on top.
Can I use Supabase database webhooks directly to call else.events?
Yes, with the pg_net Postgres extension or via a Supabase Edge Function triggered by the database webhook. The Edge Function approach gives you more control over payload mapping.
Does this work with Deno (Edge Function runtime)?
Yes. The else.events API is a plain fetch call — Deno supports fetch natively.
How do I set the API key in an Edge Function?
Use Deno.env.get("ELSE_EVENTS_API_KEY"). Set the secret in the Supabase Edge Function secrets dashboard.

Supabase product emails — beyond auth, without Edge Function complexity.

Trigger else.events from Edge Functions or database webhooks. Manage templates outside your Supabase project.

  • Works with Supabase Edge Functions
  • No Deno email library required
  • Templates editable without redeploys