Node.js integration

Transactional email for Node.js — fire an event, skip the boilerplate

POST a domain event from your Node.js app. else.events matches rules, renders the right template and sends through your email provider. No email SDK to maintain.

Managing transactional emails in Node.js gets messy fast

Email logic scattered across your services

sendgrid.send() calls end up in your auth controller, your billing service, your background jobs — with no central view.

Template strings inside JavaScript

Inlining HTML or Handlebars templates into your Node.js code means every copy change needs a deploy.

Locale and plan branching

Supporting multiple locales or plan-specific emails turns a simple send() into nested conditionals.

Provider SDK churn

Migrating from Nodemailer to Postmark to Resend means rewriting every email send call.

One fetch call per event type — else.events handles the rest

Plain HTTP from any Node.js runtime

No SDK. A fetch call with a Bearer token. Works in Express, Fastify, NestJS, Next.js, serverless functions — anywhere.

Templates stay out of your codebase

Edit subject lines, CTAs and copy in the else.events dashboard without touching your Node.js app.

Routing by payload fields

else.events reads event.data.plan or event.user.locale and picks the right template. Your app does not need to know the template name.

Swap providers without rewriting send code

Switch from Nodemailer/SMTP to Postmark or back — update else.events config, not your application.

// Node.js — no email SDK required

Send transactional email from Node.js in 5 lines.

// Works in Express, Fastify, NestJS, Next.js, serverless — any Node.js runtime
async function sendEvent(type: string, user: { email: string; name: string }, data: Record<string, unknown>) {
  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, data }),
  });
}

// Usage
await sendEvent('invoice.payment_failed', { email: 'customer@example.com', name: 'Alex' }, {
  plan: 'Pro', amount: '29.00', currency: 'EUR',
  update_payment_url: 'https://app.example.com/billing',
});

One helper function. Every product email in your Node.js app fires through the same endpoint. else.events routes, renders and delivers.

Frequently asked questions

Do I need to install a package?
No. The API is plain HTTP. Use the built-in fetch (Node 18+) or any HTTP client like axios or got.
Does this work with CommonJS or ESM?
Yes. fetch and HTTP clients work in both module formats. else.events has no Node.js module constraints.
How do I handle errors?
Check the HTTP response status. A 2xx means else.events accepted the event. 4xx usually indicates a bad payload or invalid API key. Log and retry on 5xx.
Can I use this in serverless functions?
Yes. AWS Lambda, Vercel Functions, Cloudflare Workers, Supabase Edge Functions — any environment that can make HTTP requests works.

No email SDK. Just events.

Fire domain events from your Node.js app. else.events handles routing, templates and delivery.

  • Plain HTTP — no SDK to install or maintain
  • Works in any Node.js runtime
  • Templates editable without deployments