Clerk integration

Clerk + else.events — auth emails and product emails, clearly separated

Clerk handles email verification, magic links and password resets. else.events handles your onboarding, billing, feature and lifecycle emails for the same users.

Clerk covers auth — your product emails still need a home

Clerk handles auth emails — not product emails

Clerk sends email verification and magic links. It does not send your welcome sequence, feature announcement or billing notification.

Clerk webhook events need product email dispatch

user.created, organizationMembership.created, user.updated — these Clerk events often need a corresponding product email.

No template management for Clerk user emails

Welcome emails and onboarding sequences for your Clerk users are still hardcoded in your app or in a third-party tool with no developer-first API.

Mismatched tooling: Clerk for auth, something else for email

Many teams bolt on Mailchimp or ConvertKit for lifecycle emails — but that is marketing automation, not product email workflows.

Use Clerk webhooks to trigger else.events product emails

Clerk webhook → else.events event

Receive Clerk webhooks (via Svix), extract user data and POST a domain event to else.events.

Rules route by Clerk user attributes

Route by plan metadata, organization role or user creation source — without adding branching logic to your webhook handler.

Templates outside your Clerk app

Edit onboarding and lifecycle email copy in else.events without touching your Clerk configuration or app code.

Clear separation of concerns

Clerk owns auth emails. else.events owns product emails. Both handle the Clerk user — cleanly separated.

// Node.js Clerk webhook → else.events

Forward Clerk user events to else.events.

// app/api/webhooks/clerk/route.ts (Next.js App Router)
import { Webhook } from 'svix';

export async function POST(req: Request) {
  const payload = await req.text();
  const headers = Object.fromEntries(req.headers);

  const wh = new Webhook(process.env.CLERK_WEBHOOK_SECRET!);
  const event = wh.verify(payload, headers) as { type: string; data: { email_addresses: { email_address: string }[]; first_name?: string; public_metadata?: { plan?: string } } };

  if (event.type === 'user.created') {
    const user = event.data;
    const email = user.email_addresses[0]?.email_address;
    const name = user.first_name ?? 'User';
    const plan = user.public_metadata?.plan ?? 'free';

    await fetch('https://app.else.events/api/events', {
      method: 'POST',
      headers: { Authorization: `Bearer ${process.env.ELSE_EVENTS_API_KEY}`, 'Content-Type': 'application/json' },
      body: JSON.stringify({ type: 'user.signed_up', user: { email, name }, data: { plan } }),
    });
  }
  return new Response('ok');
}

Verify the Clerk webhook with Svix, extract user email and metadata, forward as an else.events event. Rules and templates handle what gets sent.

Frequently asked questions

Does this conflict with Clerk email customization?
No. Clerk email customization (templates for verification, magic links) is independent. else.events handles product emails — different emails, different system.
How do I validate Clerk webhooks?
Clerk uses Svix for webhook delivery. Use the svix npm package to verify the webhook signature with your CLERK_WEBHOOK_SECRET.
What Clerk events should I forward?
user.created (welcome/onboarding), organizationMembership.created (team invitation follow-up), user.updated (profile/plan changes). Only forward events that need a product email response.
Can I use else.events for multi-tenant Clerk apps?
Yes. Extract the organization ID from the Clerk event and include it in the event data. Use it as a routing field in else.events rules.

Clerk auth. else.events product emails. Clean separation.

Forward Clerk user events and manage your product email workflows separately from auth.

  • Works with Clerk webhooks via Svix
  • No conflict with Clerk auth emails
  • Templates editable without touching your Clerk app