Skip to main content

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 EventUse Case
Record CreatedNew order notification to sales team
Field ChangedStatus update to customer
Approval RequestedManager approval notification
Record ApprovedConfirmation to requester
Record RejectedRejection reason to requester
Due Date ApproachingPayment reminder
ScheduledWeekly 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

FieldDescription
RecipientField, specific user, or role
SenderCurrent user, specific user, or employee field
SubjectStatic text or template with fields
BodyHTML template with merge fields
CC/BCCAdditional recipients
Include Record LinkAdd link to transaction
Attach Record PDFInclude 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

OptionDescription
Field on Record${record.salesrep}, ${record.supervisor}
Related RecordCustomer's email, Vendor contact
RoleAll users with specific role
Specific UserHard-coded recipient
Current UserUser 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

SchedulePurpose
DailyOverdue payment reminders
WeeklySales pipeline summary
MonthlyAccount statement distribution
On Date FieldBirthday/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

IssueSolution
Email not sendingCheck workflow state and conditions
Wrong recipientVerify field mapping
Missing contentCheck merge field syntax
No attachmentVerify PDF template exists

Debug Workflow Emails

Customization → Workflow → Workflow History

Review:
- Trigger event
- Conditions evaluated
- Actions executed
- Email delivery status

See Also