Integrations
Email

Email Integration

Send transactional emails from Flows using your own verified sending domains.

Overview

Lux uses Resend (opens in a new tab) as the email infrastructure provider. You add your own sending domains, verify DNS records, and send from your custom email addresses.

Adding a Sending Domain

  1. In Lux Desktop: SettingsIntegrationsEmail Domains
  2. Click Add Domain
  3. Enter your domain name (e.g., notifications.yourcompany.com)
  4. Copy the DNS records provided
  5. Add records to your DNS provider
  6. Click Verify once records propagate

Required DNS Records

You'll need to add these records to your domain's DNS:

TypeNamePurpose
TXTresend._domainkeyDKIM signing
TXT@ or subdomainSPF record
MX@ or subdomainInbound email (optional)

The exact values are provided when you add the domain in Lux.

Verification

  • DNS propagation typically takes 5-30 minutes
  • Click Verify to check status
  • Domain status will update to "verified" when ready

Creating Sender Addresses

Once your domain is verified, create sender configurations:

  1. Select your verified domain
  2. Click Add Sender
  3. Configure:
    • From Email: notifications@yourdomain.com
    • Display Name: Acme Notifications
    • Reply-To (optional): support@yourdomain.com

You can create multiple senders per domain for different use cases.

Sending Email from Flows

Use the Send Email node:

{
  "to": "{{customer.email}}",
  "from": "notifications@yourcompany.com",
  "subject": "Welcome to Acme!",
  "body": "<h1>Welcome, {{customer.name}}!</h1><p>Thanks for signing up...</p>"
}

Multiple Recipients

{
  "to": ["user1@example.com", "user2@example.com"],
  "from": "notifications@yourcompany.com",
  "subject": "Team Update",
  "body": "..."
}

With Reply-To

{
  "to": "{{customer.email}}",
  "from": "noreply@yourcompany.com",
  "replyTo": "support@yourcompany.com",
  "subject": "Your Support Ticket",
  "body": "..."
}

Email Templates

Store templates in Knowledge Base and reference them:

// In a Code node before Send Email
const template = await knowledge.get('templates/welcome-email.html');
const body = template
  .replace('{{name}}', inputs.customer.name)
  .replace('{{company}}', inputs.customer.company);
 
return { emailBody: body };

HTML vs Plain Text

HTML (recommended for marketing):

<h1>Welcome!</h1>
<p>Thanks for joining <strong>Acme</strong>.</p>
<a href="{{ctaUrl}}">Get Started</a>

Plain Text (for transactional):

Welcome!

Thanks for joining Acme.

Get started: {{ctaUrl}}

Best Practices

Deliverability

  • Verify your domain
  • Use consistent "from" address
  • Include unsubscribe link for marketing
  • Monitor bounce rates

Content

  • Keep subject lines clear and short
  • Test HTML in multiple email clients
  • Include plain text fallback
  • Personalize when possible

Volume

  • Respect rate limits
  • Use bulk-friendly providers for mass email
  • Implement backoff for errors

Receiving Inbound Email

You can receive emails at your verified domain and process them in Flows:

  1. Enable receiving on your domain in Email Domains settings
  2. Create a Flow with a Webhook Trigger
  3. Configure MX records to point to Resend
  4. Incoming emails trigger your Flow with the message data

Inbound Webhook Payload

{
  "from": "customer@example.com",
  "to": "support@yourdomain.com",
  "subject": "Help with my order",
  "text": "Plain text body...",
  "html": "<p>HTML body...</p>"
}

Troubleshooting

Domain Not Verifying

  • Ensure DNS records are added exactly as shown
  • Wait 5-30 minutes for propagation
  • Check for typos in record values
  • Try verifying again after propagation

Emails Not Sending

  • Verify domain status shows "verified"
  • Check sender address uses the verified domain
  • Check Flow execution logs for errors

Emails Going to Spam

  • Ensure all DNS records (DKIM, SPF) are configured
  • Use a subdomain for transactional email
  • Warm up new domains gradually with low volume

Next: SMS →