Dynamic Email Dispatch

Published on February 10, 2026 DRTE


Feature Overview: Send Dynamic Email

The Send Dynamic Email feature is a Flow-based extension of the DRTE (Dynamic Rich Text Editor) that bridges static email templates and live Salesforce data. It enables users to:

  1. Select a pre-configured DRTE Rich Text/HTML template.
  2. Generate real-time data tables or lists via SOQL queries.
  3. Personalize the content in a WYSIWYG editor before sending.
  4. Auto-Log the communication to the Salesforce Activity Timeline.
Who is this for? Salesforce admins configuring the feature (Configuration Guide) and end users sending dynamic emails from a record (User Workflow).

Configuration Guide (Admin)

1. The Object Action

To make the feature accessible, create a record-level action:

  1. Location: Object Manager > [Your Object] > Buttons, Links, and Actions.
  2. Action Type: Flow.
  3. Flow Name: Send_Dynamic_Email (provided by the extension).
  4. Label: Custom (e.g., Send Report, Email Briefing, Client Update).

Object action configuration

Figure 1: Creating the Flow action on the object.

2. Template Definition (Rich Text Button / Doc Template)

The core of the logic lives in the Template record.

  1. Category: Map this to the Object API Name (e.g., Account, Lead, Custom_Object__c).
  2. Is Email Template: Must be checked to appear in the email flow.
  3. Test SFDC Record Id: Use a valid ID to preview data during configuration.

Template definition

Figure 2: Template record settings.

3. Data Integration (Dynamic Tables)

Create a document section of Table type with a SOQL Query. Instead of manual entry, use the Dynamic Table Configuration Builder:

  1. SOQL Query: Define which child records or related data to pull.
  2. Example: SELECT Name, Amount, StageName FROM Opportunity WHERE AccountId = :recordId
  3. Column Builder: Assign labels and formatting (Currency, Date, etc.) to the query results.
  4. JSON Integration: The builder generates the logic required to render this table inside the email body automatically.

Dynamic table builder

Figure 3: Dynamic Table Configuration Builder.

Use Case Gallery

The flexibility of the DRTE extension allows for various applications beyond simple briefings:

Use CaseData Source (SOQL)Target Audience
Project StatusMilestones__c & Tasks__cStakeholders / Clients
Collections/InvoicingInvoices__c where Status = 'Overdue'Finance Contacts
Onboarding ChecklistRequirements__c where Completed = FalseNew Customers
Case SummaryCases related to an AccountSuccess Managers

User Workflow

Step 1: Initialize

The user clicks the custom button (e.g., Send Dynamic Briefing) on any record. This passes the recordId into the engine.

Initialize

Figure 4: Launching the action from a record.

Step 2: Template Selection

The user chooses from a list of templates filtered by the current object. This ensures the user only sees relevant email formats.

Template selection

Figure 5: Template list filtered by object.

Step 3: Real-Time Preview & Edit

The engine executes the SOQL queries and renders the document sections dynamically. The user can:

  1. Search and select a contact from the system to send the email to.
  2. Add a personalized introduction.
  3. Format text using the rich text toolbar (Bold, Colors, Links).

Preview and edit

Figure 6: Recipient selection and personalization.

Real-time preview

Figure 7: Real-time rendered preview with dynamic data.

Step 4: Dispatch & Log

Upon clicking Send Email Now, the extension:

  1. Sends the email via the Salesforce platform.
  2. Creates an Email Message and Task record.
  3. Attaches the final HTML content to the record's Activity History for future reference and compliance.

Send email

Figure 8: Sending the email.

Activity history log

Figure 9: Email logged to Activity History.

Success: The email is delivered and a complete copy is stored on the record's Activity Timeline.

💡 Best Practices

Dynamic Filters: Always use :recordId in your SOQL queries within the Template Builder to ensure data is context-specific.
Branding: Use the HTML section of the template to include company logos and standard signatures.
Testing: Use the Test SFDC Record Id field on the Template record to verify that your SOQL query returns the expected data before deploying to users.

Knowledge Article Number: KA-00116

View more articles in the knowledge base