Protocol 13 of 18Track, BuildingWhat we ship

Communications, email, nurture, Resend

How to send messages programmatically. Resend for transactional email, the shape of an automated nurture sequence, and the deliverability and opt-out rules that are not optional.

← All 18 protocols
Protocol 12Design systems and Claude designAll 18Protocol 14Admin interfaces and dashboards
Why this matters

The pain it
solves

Communications are the seam between your product and the rest of the world. Leads come in. Confirmations go out. Customers get nurtured. Without this seam, everything you build is invisible to anyone outside your machine.

Most participants overestimate how hard this is. The honest truth: send-an-email-from-code is now a fifteen-minute task. Send-a-text-message is similar.

The teaching

What this
actually is

Two channels carry 95% of business comms

You can spend years on the long tail of channels (WhatsApp Business, Telegram, push, in-app, RCS). Or you can start with the two that cover almost every real use case.

  • Email, the primary channel
    Resend is the IL default. Sign up, verify your domain, send by calling one API. Built by ex-GitHub, modern API, generous free tier.
  • SMS, the secondary channel
    Twilio is still the default for reliable delivery. Same shape: sign up, verify a number, send via API. Use sparingly; SMS costs money per send and goodwill per send.

Two kinds of email, different tools

Mixing these up is the most common deliverability mistake.

  • Transactional
    Triggered by an action: signup confirmation, password reset, order receipt, lead-form notification. One-to-one tone. Resend is purpose-built for this.
  • Newsletter / bulk
    Many recipients, scheduled, one-to-many tone. Use MailChimp, ConvertKit, or Resend's bulk plan. Keep the sending domain separate from transactional so a bad campaign cannot tank your password-reset deliverability.

Deliverability: three letters that decide inbox vs spam

Email arrives in the inbox or the spam folder based on three DNS records. Resend walks you through all three; you copy/paste them into your DNS settings once and never think about them again.

  • SPF
    Says: these IP addresses are allowed to send mail as my domain.
  • DKIM
    Signs every email with a cryptographic key. Receiving servers verify the signature.
  • DMARC
    Tells receiving servers what to do if SPF or DKIM fails. Start with p=none (monitor), tighten over time.

The non-optional pieces

Every nurture email needs an unsubscribe link in the footer. An unsubscribe is honored instantly and forever. Every SMS needs reply STOP. Consent is recorded with a date. CAN-SPAM (US), GDPR (EU) and the Australian Spam Act all require these. Resend and Twilio handle the mechanics; you have to remember to include them.

The nurture shape

A lead that lands and hears nothing for a week is the most common failure in a small business. The fix is a small machine, and every nurture campaign you will ever build has the same five parts.

  • Enrol on a trigger
    The contact form handler adds a row to nurture_enrollments: who, which sequence, step 1, next send now. Anyone already enrolled or unsubscribed never enrols twice.
  • Store the step and the next send time
    One row per person per sequence. The row knows where they are and when they are due. The whole state of the campaign is a table you can read.
  • A scheduled job sends what is due
    A Vercel cron route wakes every 15 minutes, protected by a secret. It sends every enrollment whose next_send_at has passed, records the send with the Resend id, and advances the step. Idempotent: it never sends the same step twice.
  • Unsubscribe flips one row
    Every email carries a signed unsubscribe link. Click it, the row is marked, a plain confirmation page shows, and nothing more sends. Ever.
  • Test mode first
    A TEST_MODE flag compresses the delays to minutes and rewrites every recipient to your own inbox, so you watch the whole sequence land before a real person ever gets one. Never send to a synthetic person.
Try it yourself25 minutes

Wire Resend to your contact form in 25 minutes

You need: a Supabase contact form from Protocol 07, a domain (from Protocol 06), and a Resend account (free tier).

  1. Step 01
    Sign up at resend.com

    Email signup. Free tier: 100 emails/day, 3,000/month. Enough for any small business.

  2. Step 02
    Add and verify your domain

    Resend Dashboard → Domains → Add. Resend gives you three DNS records (SPF, DKIM, DMARC). Add them at your registrar. Wait 5 minutes for verification.

  3. Step 03
    Get your API key

    Resend Dashboard → API Keys → Create. Copy it. Add to Vercel as RESEND_API_KEY and to .env.local.

  4. Step 04
    Send a thank-you email on form submit

    In Claude Code: "On contact form submit, also send a thank-you email via Resend to the submitted email. From: hello@yourdomain.com. Subject: Thanks for reaching out. Body: short, personal, signed."

  5. Step 05
    Notify yourself on every lead

    Tell Claude: "Also send a notification email to my address (hard-code it for now) with the lead's name and email." Commit and push.

  6. Step 06
    Submit a real test lead

    Fill the form on your live site with a real address. Within seconds: the thank-you email arrives in the submitter's inbox, the notification arrives in yours. Both look on-brand.

Outcome

Your contact form sends a real email to the lead and a notification to you. Resend is wired with verified DNS. You have crossed from has-a-form to has-a-funnel, and the nurture machine is the next block.

Official resources

Straight from
the source

Resenddoc
Resend with Next.js
Twiliodoc
Twilio SMS quickstart
Resenddoc
Domain verification (SPF, DKIM, DMARC)
Verceldoc
Vercel cron jobs
FTCdoc
CAN-SPAM compliance guide
What you walk out with

By the end of this
protocol

At the retreat

You learn it by
doing it

You hook Resend to your contact form, send a real test lead, and confirm the email lands in your real inbox looking like it came from your brand.

Saigon, Jun 20See all 18 protocols
Connects to

Other protocols this
compounds with

Protocol 07
Supabase basics
Protocol 14
Admin interfaces and dashboards
Protocol 15
Agents in the cloud
← Previous, Protocol 12
Design systems and Claude design
Next, Protocol 14 →
Admin interfaces and dashboards