Workflow Email Actions
Automate email notifications triggered by record events using NetSuite workflows.
Workflow Email Overview
WORKFLOW EMAIL TRIGGER FLOW
─────────────────────────────────────────────────────────
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Record │────▶│ Workflow │────▶│ Condition │
│ Event │ │ Triggers │ │ Check │
└──────────────┘ └──────────────┘ └──────┬───────┘
│
┌────────────────────────────┤
│ │
▼ ▼
┌──────────────┐ ┌──────────────┐
│ Condition │ │ Condition │
│ TRUE │ │ FALSE │
└──────┬───────┘ └──────────────┘
│
▼
┌──────────────┐
│ Send Email │
│ Action │
└──────────────┘
Common Email Triggers
| Trigger Event | Use Case |
|---|---|
| Record Created | New order notification to sales team |
| Field Changed | Status update to customer |
| Approval Requested | Manager approval notification |
| Record Approved | Confirmation to requester |
| Record Rejected | Rejection reason to requester |
| Due Date Approaching | Payment reminder |
| Scheduled | Weekly report distribution |
Creating a Workflow Email
Step 1: Create Workflow
Customization → Workflow → Workflows → New
Step 2: Add Send Email Action
Workflow Designer:
1. Click on State (e.g., "Pending Approval")
2. Add Action → Send Email
3. Configure email settings
Send Email Configuration
| Field | Description |
|---|---|
| Recipient | Field, specific user, or role |
| Sender | Current user, specific user, or employee field |
| Subject | Static text or template with fields |
| Body | HTML template with merge fields |
| CC/BCC | Additional recipients |
| Include Record Link | Add link to transaction |
| Attach Record PDF | Include PDF attachment |
Email Templates in Workflows
Basic Template
<p>Dear ${workflow.recipientfirstname},</p>
<p>A new ${record.type} requires your attention:</p>
<table border="1" cellpadding="5" style="border-collapse: collapse;">
<tr>
<td><strong>Record:</strong></td>
<td>${record.tranid}</td>
</tr>
<tr>
<td><strong>Date:</strong></td>
<td>${record.trandate}</td>
</tr>
<tr>
<td><strong>Amount:</strong></td>
<td>${record.total}</td>
</tr>
<tr>
<td><strong>Created By:</strong></td>
<td>${record.createdby}</td>
</tr>
</table>
<p>
<a href="${record.recordurl}">Click here to view the record</a>
</p>
<p>Best regards,<br/>${currentuser.firstname}</p>
Workflow Email Examples
Approval Request
<html>
<body style="font-family: Arial, sans-serif;">
<div style="background: #f0f0f0; padding: 20px;">
<h2 style="color: #2c3e50; margin: 0;">Approval Required</h2>
</div>
<div style="padding: 20px;">
<p>Hi ${approver.firstname},</p>
<p>A <strong>${record.type}</strong> is waiting for your approval:</p>
<div style="background: #fff3cd; border: 1px solid #ffc107; padding: 15px; margin: 15px 0; border-radius: 5px;">
<table>
<tr>
<td style="width: 150px;"><strong>Transaction:</strong></td>
<td>${record.tranid}</td>
</tr>
<tr>
<td><strong>Requested By:</strong></td>
<td>${record.createdby}</td>
</tr>
<tr>
<td><strong>Amount:</strong></td>
<td style="font-size: 18px; color: #d63031;">${record.total}</td>
</tr>
<tr>
<td><strong>Reason:</strong></td>
<td>${record.memo}</td>
</tr>
</table>
</div>
<p style="text-align: center;">
<a href="${record.approveurl}" style="background: #27ae60; color: white; padding: 10px 25px; text-decoration: none; border-radius: 5px; margin-right: 10px;">Approve</a>
<a href="${record.rejecturl}" style="background: #e74c3c; color: white; padding: 10px 25px; text-decoration: none; border-radius: 5px;">Reject</a>
</p>
<p style="color: #666; font-size: 12px; margin-top: 20px;">
Or <a href="${record.recordurl}">click here</a> to view full details in NetSuite.
</p>
</div>
</body>
</html>
Status Change Notification
<html>
<body>
<h2>Order Status Update</h2>
<p>Dear ${record.entity},</p>
<p>Your order <strong>#${record.tranid}</strong> status has been updated:</p>
<div style="background: #d4edda; border: 1px solid #28a745; padding: 15px; margin: 15px 0;">
<p style="margin: 0; font-size: 18px;">
<strong>New Status:</strong> ${record.status}
</p>
</div>
<#if record.status == "Shipped">
<p>Your order has shipped! Tracking information:</p>
<ul>
<li>Carrier: ${record.shipmethod}</li>
<li>Tracking #: ${record.trackingnumbers}</li>
</ul>
</#if>
<#if record.status == "Pending Fulfillment">
<p>Your order is being prepared for shipment. We'll notify you when it ships.</p>
</#if>
<p>Thank you for your business!</p>
</body>
</html>
Overdue Invoice Reminder
<html>
<body>
<div style="background: #dc3545; color: white; padding: 15px; text-align: center;">
<h2 style="margin: 0;">Payment Overdue</h2>
</div>
<div style="padding: 20px;">
<p>Dear ${record.entity},</p>
<p>This is a reminder that payment for the following invoice is overdue:</p>
<table border="1" cellpadding="10" style="border-collapse: collapse; width: 100%;">
<tr style="background: #f8f9fa;">
<td><strong>Invoice #</strong></td>
<td>${record.tranid}</td>
</tr>
<tr>
<td><strong>Invoice Date</strong></td>
<td>${record.trandate}</td>
</tr>
<tr>
<td><strong>Due Date</strong></td>
<td style="color: #dc3545;">${record.duedate}</td>
</tr>
<tr>
<td><strong>Days Overdue</strong></td>
<td style="color: #dc3545;">${record.daysoverdue} days</td>
</tr>
<tr style="background: #fff3cd;">
<td><strong>Amount Due</strong></td>
<td style="font-size: 18px; font-weight: bold;">${record.amountremaining}</td>
</tr>
</table>
<p>Please remit payment at your earliest convenience to avoid any service interruptions.</p>
<p>If you have already sent payment, please disregard this notice.</p>
<p>Questions? Contact our AR department at ${companyinformation.phone}.</p>
</div>
</body>
</html>
Recipient Options
Dynamic Recipients
| Option | Description |
|---|---|
| Field on Record | ${record.salesrep}, ${record.supervisor} |
| Related Record | Customer's email, Vendor contact |
| Role | All users with specific role |
| Specific User | Hard-coded recipient |
| Current User | User who triggered the workflow |
Multiple Recipients
To: ${record.salesrep}
CC: ${record.supervisor}, sales-team@company.com
BCC: notifications@company.com
Conditional Emails
Using Workflow Conditions
Workflow State: Pending Approval
├── Condition: Amount > 10000
│ └── Action: Send Email to CFO
└── Condition: Amount <= 10000
└── Action: Send Email to Manager
In-Template Conditionals
<#if record.total gt 10000>
<p style="color: red; font-weight: bold;">
HIGH VALUE TRANSACTION - Requires additional review
</p>
</#if>
<#if record.custbody_rush_order == true>
<p style="background: #ff9800; padding: 10px;">
RUSH ORDER - Please prioritize!
</p>
</#if>
Scheduled Workflow Emails
Scheduled Trigger Configuration
Workflow Setup:
- Trigger Type: Scheduled
- Run: Daily at 8:00 AM
- Saved Search: Invoices overdue > 30 days
- Action: Send reminder email
Use Cases
| Schedule | Purpose |
|---|---|
| Daily | Overdue payment reminders |
| Weekly | Sales pipeline summary |
| Monthly | Account statement distribution |
| On Date Field | Birthday/anniversary emails |
Attachments
Attaching Transaction PDF
Send Email Action Settings:
☑ Include Transaction
☑ Attach as PDF
PDF Template: [Select template]
Attaching Files from Record
Send Email Action Settings:
☑ Include Files
File Field: custbody_attachment
Best Practices
Design
- Use consistent branding across all workflow emails
- Include clear action buttons when response needed
- Keep emails concise and scannable
Performance
- Avoid sending emails on every field change
- Use scheduled workflows for bulk notifications
- Limit attachment sizes
Troubleshooting
| Issue | Solution |
|---|---|
| Email not sending | Check workflow state and conditions |
| Wrong recipient | Verify field mapping |
| Missing content | Check merge field syntax |
| No attachment | Verify PDF template exists |
Debug Workflow Emails
Customization → Workflow → Workflow History
Review:
- Trigger event
- Conditions evaluated
- Actions executed
- Email delivery status
See Also
- Workflows Overview - Complete workflow guide
- Transaction Emails - Manual transaction emails
- Workflow Actions - All workflow action types