Don't Put Email Logic in Your App
The instinct is to add a "send email" function to your app. Problem: now email logic is scattered across your codebase, you need to redeploy to change an email, and you're managing a mail server from within application code.
Emit Events. Let Workflows Handle the Email.
Your app does one thing: tell Wraps what happened. A Wraps workflow handles everything else — what email to send, when to send it, what to do if the user doesn't engage.
The core pattern (same across all platforms)
// From your server function — that's it
await wraps.track("user.signed_up", {
contactEmail: user.email,
contactName: user.name,
createIfMissing: true,
properties: { plan: "free", source: "lovable" },
});That's the entire integration. Your app has no email templates, no send logic, no SMTP configuration. Change the welcome email subject line? Do it in the Wraps dashboard. Add a 3-day follow-up? Add a step in the workflow. No redeploy.
How It Works
Four steps — your event in, an email out, without touching your app code again.
Your app emits an event
POST to api.wraps.dev/v1/events/ with an event name, contact email, and optional properties.
Wraps stores it
The event is recorded on the contact's timeline. Every event, every contact, all in one place.
Workflows trigger
Any workflow with a matching event trigger starts an execution — delays, branches, conditions, sequences.
Email sends via your SES
The email goes through SES in your AWS account — your domain, your sending reputation, $0.10 per 1,000 emails paid directly to AWS.
One-time setup: run npx @wraps.dev/cli email init to set up SES, then wraps platform connect to give Wraps permission to send through your SES in workflows. After that, your app calls api.wraps.dev directly — no Lambda, no infrastructure to manage. API keys live in app.wraps.dev.
Pick Your Platform
Each platform has its own mechanism for running server-side code and storing secrets. Pick the guide for your platform.
FAQ
Your app says "this happened" (user.signed_up, order.placed). Wraps decides what to do — send a welcome email, wait 3 days, send a follow-up, branch based on whether the user clicked. Email logic lives in the workflow, not your code. You can change the email content without touching your app.
Start Emitting Events
One event call. Your AWS account for sending. Works with any platform.

