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
- In Lux Desktop: Settings → Integrations → Email Domains
- Click Add Domain
- Enter your domain name (e.g.,
notifications.yourcompany.com) - Copy the DNS records provided
- Add records to your DNS provider
- Click Verify once records propagate
Required DNS Records
You'll need to add these records to your domain's DNS:
| Type | Name | Purpose |
|---|---|---|
| TXT | resend._domainkey | DKIM signing |
| TXT | @ or subdomain | SPF record |
| MX | @ or subdomain | Inbound 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:
- Select your verified domain
- Click Add Sender
- Configure:
- From Email:
notifications@yourdomain.com - Display Name:
Acme Notifications - Reply-To (optional):
support@yourdomain.com
- From Email:
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:
- Enable receiving on your domain in Email Domains settings
- Create a Flow with a Webhook Trigger
- Configure MX records to point to Resend
- 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 →