LeadRails
Docs navigation

Email via Resend

Send each lead as transactional email through your own Resend account. Developer-first email API with a generous free tier. You bring the API key + sending domain; LeadRails dispatches.

Why you provide your own Resend account

  • You own your sending reputation. We'd rather not be the bottleneck on someone else's deliverability — and we'd rather your bounce / complaint history not affect any other LeadRails customer.
  • Resend has a developer-friendly free tier (3000 emails/month, 100/day) — perfect for testing before committing to a paid plan.
  • Resend has a partner program — [our affiliate link goes here — placeholder for the user to add later].

Sign up for Resend

  1. Visit https://resend.com → sign up (no credit card required for free tier).
  2. Resend lands you on a dashboard with one default domain (onresend.com) you can use for testing without verifying.

Verify a real sending domain

The onresend.com test domain works for development but has limits — for production, verify your own domain:

  1. Domains → "Add Domain" → enter your sending domain (e.g. yourdomain.com).
  2. Add the DNS records Resend prompts for: SPF (v=spf1 include:_spf.resend.com ~all), DKIM (DKIM1 selector), optional DMARC.
  3. Wait for DNS propagation (typically 5-30 min) then click "Verify".
  4. Verified domains let you send from <anyone>@yourdomain.com.

Get your API key

  1. API Keys → "Create API Key".
  2. Pick scope: "Full access" for LeadRails (or "Sending access" if you want to lock it down).
  3. Optionally restrict to a specific domain — gives you defense in depth if the key leaks.
  4. Copy the key immediately — starts with re_ followed by an alphanumeric string.
  5. Keys can't be re-shown after creation; if you lose it, create a new one.

Set up your destination in LeadRails

  1. Sign in → Destinations → New.
  2. Adapter type: Email — Resend.
  3. API key: paste your Resend key (starts with re_).
  4. From address: a verified address (e.g. leads@yourdomain.com).
  5. From name (optional): displayed in inbox.
  6. Recipient template: {{email}}.
  7. Subject template: e.g. New lead: {{name}}.
  8. HTML body template: Mustache-style variables substituted at delivery time. Single-line for now (multi-line input not yet supported).
  9. Plain-text body (optional).
  10. Reply-to (optional): a different address for replies (e.g. support@yourdomain.com while sending from leads@yourdomain.com).
  11. Click Create.

Available variables

Top-level lead fields ({{name}}, {{email}}, {{phone}}, {{utm_source}}, etc.) plus nested access ({{lead.email}}, {{event.event_id}}). Missing vars resolve to empty string.

Verify connection

  1. Open the destination → Advanced → Verify connection.
  2. LeadRails hits Resend's /domains endpoint with your key.
  3. 200 = key works; 401 = invalid key.

Send a test email

  1. Sources → your source → Settings → ensure a route exists to your Resend destination.
  2. Click "Send test event".
  3. Email lands in the recipient inbox within seconds.
  4. Resend's Logs tab shows the message + delivery status.

Troubleshooting

401
API key wrong or revoked.
422 + "validation_error"
Most often: the from_address is on an unverified domain. Go to Resend → Domains and verify. LeadRails surfaces this as a destination_config_failed alert.
422 + "email_invalid"
Recipient email format is malformed (e.g. missing @).
403
API key scope is too narrow for the operation. Re-create with broader scope.
Domain verification stuck on "Pending"
DNS hasn't propagated. Use dig TXT yourdomain.com to check; allow up to a few hours for stubborn DNS.

Your responsibilities

  • You are the sender. Anti-spam laws (CAN-SPAM US, CASL Canada, GDPR EU) are yours.
  • Lead-routing emails are typically transactional (specific to a person who just gave you their info) — generally lower compliance bar than marketing.
  • Wire Resend's Bounce + Complaint webhooks to your own backend to handle suppressions cleanly.
← All destination guides