Flow Email Composer — User Guide
Version: 1.0
Last updated: March 2026
Applies to: Salesforce Lightning Experience
1. What Is Flow Email Composer?
Organizations often require a standardized and guided email communication process within Salesforce.
Typical Salesforce email actions provide limited customization capabilities and do not allow administrators to easily preconfigure recipients, templates, attachments, and activity tracking inside a Flow-driven process.
Flow Email Composer enables administrators to build a guided email sending experience within a Screen Flow, where key email fields are automatically pre-populated from Salesforce data, ensuring consistency, reducing manual effort, and improving data traceability.
Flow Email Composer is a Salesforce component that lets you compose and send emails directly inside a Salesforce Flow. It provides:
-
A rich-text email editor with formatting tools
-
Recipient search across Contacts, Leads, and Users
-
Sender selection (your own address, an Org-Wide address, or an Email-to-Case address)
-
File attachments and inline image paste
-
Email template support
-
Automatic Email-to-Case thread linking so customer replies land on the correct Case
-
A full send history log for every email sent
2. Who This Guide Is For
| Section | Audience |
|---|---|
| Section 3 | Salesforce Administrators setting up the component in a Flow |
| Section 4–7 | End Users composing and sending email through the component |
| Section 8 | Anyone troubleshooting errors |
3. For Administrators: Setting Up the Component
3.1 Assign Permission Sets
Before users can send email, assign the correct permission set to each user profile.
| Permission Set | Assign To |
|---|---|
| FEC_Composer_User | Any user who needs to compose and send email |
| FEC_Admin | Administrators managing the package and reviewing logs |
| FEC_Support | Support staff who need to view send history only |
Steps:
- Go to Setup → Users → Permission Sets.
- Click the permission set name.
- Click Manage Assignments → Add Assignments.
- Select the users and click Assign.
3.2 Add the Component to a Flow
- Open Setup → Flows and open (or create) a Screen Flow.
- Add a Screen element.
- In the Screen editor, search for Flow Email Composer in the components panel.
- Drag it onto the screen canvas.
- Configure the properties (see Section 3.3).
- Save and activate the flow.
Important: The component must be placed on a Screen element. It cannot be placed on a record page directly — embed the Flow in a record page instead using a Flow component.
3.3 Configure the Component Properties
All properties are set in the Flow Builder property panel when the component is selected. Properties marked Required must have a value for the component to work correctly.
Record Context
| Property | Description | Example |
|---|---|---|
| Relate To Record ID | The Salesforce record this email will be linked to (e.g. Case Id). If blank, falls back to the Flow's built-in {!$Record.Id}. | {!caseId} |
Recipients
| Property | Description | Example |
|---|---|---|
| Default To Emails | Pre-populate the To field. Accepts a text collection variable. | {!contactEmailCollection} |
| Default Cc Emails | Pre-populate the Cc field. Accepts a text collection variable. | {!contactEmailCollection} |
| Default Bcc Emails | Pre-populate the Bcc field. Accepts a text collection variable. | {!contactEmailCollection} |
Subject and Body
| Property | Description |
|---|---|
| Subject Default | Initial text for the subject line. Once the user edits the field, this value is no longer applied. |
| Body Default | Initial HTML content for the body. Once the user edits the body, this value is no longer applied. |
| Default Email Template ID | Id, DeveloperName, or Name of an active Email Template. The template is rendered against the relate-to record and pre-fills subject and body with merged values. If set, Subject Default and Body Default are ignored. |
Send Button
| Property | Options | Default |
|---|---|---|
| Send Button Label | Any text | Send |
| Send Button Alignment | left / center / right | left |
If Send Button Label is left blank (or kept as Send), the component uses the translated Custom Label value from FEC_Composer_Send.
Validation
| Property | Description | Default |
|---|---|---|
| Require Subject | Block send if subject is empty | false |
| Require Body | Block send if body is empty | false |
File Attachments
| Property | Description | Default |
|---|---|---|
| Enable File Attachments | Show the file attachment section | false |
| Attachment Label | Section heading label | Attachments |
| Accepted File Types | Comma-separated extensions or MIME types | .png,.jpg,.pdf,.doc,... |
| Max Attachment Count | Maximum number of files (1–25) | 5 |
| Default Content Document IDs | Pre-attach files by Salesforce Content Document Id collection |
If Attachment Label is left blank (or kept as Attachments), the component uses the translated Custom Label value from FEC_Composer_Attachments.
Sender Options
| Property | Description | Default |
|---|---|---|
| Allow Current User Sender | Include the current user's email in the FROM dropdown | true |
| Allow Org-Wide Sender | Include Org-Wide Email Addresses in the FROM dropdown | true |
| Allow Email-to-Case Sender | Include Email-to-Case addresses in the FROM dropdown | true |
| Default From Email | Pre-select a FROM address by email address | |
| Default From Read Only | Lock the FROM field so users cannot change it | false |
Email-to-Case Threading
| Property | Description | Default |
|---|---|---|
| Add Email to Case Thread | Enable threading. Requires Relate To Record ID to be a Case. | false |
3.4 Enable Email-to-Case Threading
Threading allows customer replies to an outbound email to be routed back to the same Case automatically, instead of creating a new Case.
Requirements:
Relate To Record IDmust be a Case record Id.- The Add Email to Case Thread property must be set to
true. - The
EnableThreadingfeature flag in Custom Metadata → Feature Flags must be enabled (it istrueby default).
How it works behind the scenes: The component embeds a hidden Salesforce thread token inside the email HTML body. When the customer replies, Salesforce Email-to-Case detects this token and routes the reply to the original Case. The token is invisible to email recipients.
Verify the flag is on:
- Go to Setup → Custom Metadata Types → Feature Flag → Manage Records.
- Find
Enable Threadingand confirm Enabled is checked.
3.5 Configure Sender Options
The FROM dropdown is populated automatically based on what is allowed and accessible:
- Current User — the logged-in user's email address. Always available when
Allow Current User Sender = true. - Org-Wide Email Addresses — configured in Setup → Org-Wide Email Addresses. Only verified, accessible addresses appear.
- Email-to-Case Addresses — addresses configured under Setup → Email-to-Case routing rules. If the address is also an Org-Wide Email Address, FROM override works at delivery time (the email is sent from that address, not the current user).
Note: For an Email-to-Case sender address to correctly appear as the FROM address in delivered email, the routing address must also be registered as a verified Org-Wide Email Address in Salesforce. If it is not, the email will still send but will be delivered from the current user's address.
3.6 Connect Flow Output Variables
After a successful send, the component writes the following values to Flow variables. Create matching Flow variables and connect them in the component property panel to use these downstream in your flow.
| Output Variable | Type | Description |
|---|---|---|
| Is Success | Boolean | true if the email was sent successfully |
| Error Message | Text | Error description if the send failed |
| Email Message ID | Record ID | Salesforce EmailMessage record created for the send |
| Message Identifier | Text | RFC 5322 Message-ID header value |
| To Recipients Metadata JSON | Text | JSON array of To recipient details (recordId, email, displayLabel, recipientType) |
| Cc Recipients Metadata JSON | Text | JSON array of Cc recipient details |
| Bcc Recipients Metadata JSON | Text | JSON array of Bcc recipient details |
| Deliverability Warning | Text | Warning about sender configuration (e.g. no Org-Wide address found) |
Example: Branch on send result
Add a Decision element after the Screen, with conditions:
- Branch
Sent Successfully:{!isSuccess} Equals true - Branch
Send Failed:{!isSuccess} Equals false
Use {!errorMessage} in a Screen element on the failure branch to display the error to the user.
3.8 Translate UI Labels (Translation Workbench)
Flow Email Composer supports localization of runtime UI labels through Salesforce Custom Labels.
Where to translate:
- Go to Setup -> Translation Workbench -> Translate.
- Select your target Language.
- Set Setup Component to Custom Labels.
- Enter
FEC_Composer_in the label filter/search. - Provide translated values and save.
Labels used by the component:
FEC_Composer_CardTitleFEC_Composer_FromFEC_Composer_SelectSenderFEC_Composer_ToFEC_Composer_CcFEC_Composer_BccFEC_Composer_RecipientInputPlaceholderFEC_Composer_AddFEC_Composer_AddRecipientFEC_Composer_AddCcRecipientFEC_Composer_AddBccRecipientFEC_Composer_SubjectFEC_Composer_BodyFEC_Composer_UploadFilesFEC_Composer_SendFEC_Composer_AttachmentsFEC_Composer_Success
How Flow overrides interact with translations:
- If
sendButtonLabelis blank orSend, the translatedFEC_Composer_Sendvalue is shown. - If
sendButtonLabelis set to another value, that Flow value is shown. - If
attachmentLabelis blank orAttachments, the translatedFEC_Composer_Attachmentsvalue is shown. - If
attachmentLabelis set to another value, that Flow value is shown.
4. For End Users: Composing and Sending Email
4.1 The Email Composer Screen
When you open a Flow that uses the Email Composer, you will see a form with these sections:
Depending on how the administrator configured the component, some sections may not appear (for example, the Cc/Bcc fields or the attachment uploader may be hidden or pre-filled).
4.2 Adding Recipients
Searching for a contact
- Click the TO, CC, or BCC field.
- Start typing a name or email address — a dropdown of matching Contacts, Leads, and Users appears after a short delay.
- Click a result to add it as a recipient pill.
Typing an email address directly
- Type a valid email address in the recipient field.
- Press Enter, comma (,), or semicolon (;) to confirm it as a pill.
- You can also paste several addresses separated by commas or semicolons.
Removing a recipient
Click the × on any recipient pill to remove it.
Duplicate prevention
If you add the same email address twice (or the same person from different searches), it will only appear once.
4.3 Choosing a Sender (FROM)
The FROM dropdown shows the sender addresses available to you:
| Option | When it appears |
|---|---|
| Current User (your@email.com) | Always (unless disabled by admin) |
| Org-Wide: Name (address@company.com) | When your org has verified Org-Wide Email Addresses |
| Email-to-Case (support@company.com) | When the flow is linked to a Case with Email-to-Case configured |
Select the address you want the email to appear to come from. If the administrator has locked the FROM field, you will not be able to change it.
Tip: If you are replying to a customer case and want the reply to come from your support address (not your personal email), select the Email-to-Case option.
4.4 Writing the Subject and Body
- Click the Subject field and type your subject line.
- Click in the Body editor to write your message. The toolbar provides standard formatting: bold, italic, lists, links, and more.
If the administrator pre-loaded a template, the subject and body will already be filled in. You can freely edit them — your changes will not be overwritten.
4.5 Pasting Images into the Body
You can paste images directly into the body editor:
- Copy an image to your clipboard (e.g. a screenshot, or copy from another document).
- Click inside the body editor.
- Press Ctrl+V (Windows) or Cmd+V (Mac).
The image is automatically uploaded to Salesforce and embedded in the email. It is also saved as a file linked to the record the email is being sent from.
Note: Pasting images requires that a relate-to record (such as a Case) has been configured for the component. If no record is linked, image paste will show an error.
4.6 Attaching Files
If the attachment section is visible:
- Click Upload Files or drag files onto the upload area.
- Uploaded files appear as a list with file names.
- To remove a file, click the × next to it.
- The component shows how many files are attached vs. the maximum allowed (e.g.
2/5 files selected).
Files are sent as standard email attachments and are also saved as Salesforce Files linked to the related record.
4.7 Sending the Email
- Review the recipient list, subject, and body.
- Click the Send button (or whatever label the admin configured).
If the send succeeds:
- The button briefly shows a loading indicator.
- The flow advances to the next screen (or closes if it is the last step).
If the send fails:
- An error message appears on screen explaining what went wrong.
- No email is delivered. You can correct the issue and try again.
Common reasons a send can fail:
- No To recipient added
- Subject is empty (if required by admin)
- Body is empty (if required by admin)
- Invalid email address format
- Attachment exceeds size limits
- Selected Org-Wide sender address is no longer available
5. Email Templates
If the administrator set a default template, the subject and body are pre-filled when the screen opens. Template merge fields (such as {!Case.CaseNumber}) are resolved against the linked record automatically.
What you can do with a pre-filled template:
- Edit the subject or body freely — your changes are preserved.
- Delete pre-filled content and write something entirely different.
- Send without editing if the template content is suitable as-is.
What you cannot do:
- Change which template was loaded (this is controlled by the administrator in Flow Builder).
- Re-apply the template after you have edited the body — the original template content is not re-loaded after you type in the field.
6. Email-to-Case Replies
When a flow is configured for Email-to-Case threading (typically on Case records):
What this means for you:
- You do not need to do anything differently — just compose and send as normal.
- Your outbound email contains a hidden reference code that is invisible to the recipient.
- When the customer replies to your email, their reply automatically appears under the same Case in Salesforce, rather than creating a new Case.
Requirements for threading to work:
- The email must be sent from the component when
Add Email to Case Threadis enabled on that flow. - The relate-to record must be a Case.
- The customer must reply to the original email (not send a new email).
If a reply still creates a new Case:
- The customer may have composed a brand-new email instead of hitting Reply.
- The outbound email may have been sent from a component that did not have threading enabled.
- Contact your administrator to verify the threading feature flag is active.
7. Viewing Send History
Every email sent through Flow Email Composer is recorded in the Email Send Log (Email_Send_Log__c) object.
To view send logs (Admin):
- Go to the App Launcher and open your app.
- Navigate to the Email Send Log tab (if added to the app), or use the Object Manager to view records directly.
Fields in the log:
| Field | Description |
|---|---|
| Status | Success, Failed, or ValidationFailed |
| Sent At | Date and time of the send attempt |
| Subject | Email subject |
| From Address | Address used as the sender |
| Sender Type | User, OrgWide, or EmailToCase |
| To / Cc / Bcc Count | Number of recipients in each field |
| Relate To ID | The Salesforce record the email was linked to |
| Email Message ID | Link to the EmailMessage record |
| Message Identifier | RFC 5322 Message-ID header |
| Attachment Count | Number of files attached |
| Total Attachment Size | Total size of attachments in bytes |
| Error Message | Failure or warning message |
| Error Code | Salesforce error code (for technical investigation) |
| Add Email to Case Thread | Whether threading was enabled for this send |
Note: Users with the FEC_Composer_User permission set can only read log records. Users with FEC_Admin can read and edit. Users with FEC_Support can read logs but have no Apex access.
8. Troubleshooting
"At least one To recipient is required"
You tried to send without adding anyone to the To field. Add at least one email address or select a contact.
"Invalid email address: …"
One of the entered addresses is not in a valid email format. Check for:
- Missing
@symbol - Spaces within the address
- Incomplete domain (e.g.
user@with no domain)
"Subject is required" / "Body is required"
The administrator has made subject or body mandatory for this flow. Fill in the field before sending.
"Selected sender type is not allowed by component configuration"
The FROM address you selected is of a type that has been disabled by the administrator. Choose a different FROM address, or contact your administrator.
"OrgWide sender type requires an OrgWideEmailAddressId" / "Selected Org-Wide Email Address was not found"
The Org-Wide Email Address selected as FROM is no longer available or has been deleted. Select a different sender, or contact your administrator to restore the address in Setup → Org-Wide Email Addresses.
"Email-to-Case threading is disabled by feature flag"
The threading feature is turned off at the system level. Contact your Salesforce administrator to enable it: Setup → Custom Metadata Types → Feature Flag → Enable Threading → enable the Enabled checkbox.
"Email-to-Case threading can only be used when RelateToRecordId is a Case"
Threading is enabled on this flow, but the flow was launched from a record that is not a Case (e.g. an Account or Opportunity). Either disable threading for this flow or only launch the flow from Case records.
"There was a problem uploading the file" (image paste)
Image paste requires a relate-to record to be set. If the flow was launched without a record context, pasted images cannot be saved. Contact your administrator to ensure the flow passes a valid record Id to the Relate To Record ID property.
"Unable to send email. Contact your administrator if the issue persists."
This is a generic error for unexpected platform-level failures. Salesforce may be experiencing deliverability issues, or there may be a Send Email governor limit reached. Check:
- Setup → Deliverability — ensure the org's email deliverability is set to All Email.
- The
Email_Send_Log__crecord for the failed send — theError MessageandError Codefields contain technical details. - Salesforce's daily single email send limits (per-user and org-wide limits apply).
Warning: "No Org-Wide sender is configured…"
This is an informational warning, not an error. It appears when Org-Wide senders are included in the allowed types but no Org-Wide Email Addresses exist in your org (or are accessible to the running user). You can still send using your Current User address.
Deliverability: Email arrives from wrong address
If the email arrives in the recipient's inbox from your personal address instead of the support address you selected:
- The selected Email-to-Case address is not registered as a verified Org-Wide Email Address in Salesforce.
- Ask your administrator to add the Email-to-Case routing address to Setup → Org-Wide Email Addresses and verify it.
9. Reference: Component Properties
Quick reference of all available properties for Flow Builder configuration.
| Property | Type | Default | Description |
|---|---|---|---|
recordId | Record ID | — | Flow record context (auto-set by Flow) |
relateToRecordId | Record ID | — | Explicit relate-to override |
addEmailToCaseThread | Boolean | false | Enable Email-to-Case threading |
defaultToEmails | Text Collection | [] | Pre-populated To addresses |
defaultCcEmails | Text Collection | [] | Pre-populated Cc addresses |
defaultBccEmails | Text Collection | [] | Pre-populated Bcc addresses |
subjectDefault | Text | '' | Default subject text |
bodyDefault | Text | '' | Default body HTML |
defaultEmailTemplateId | Text | '' | Template Id, DeveloperName, or Name |
sendButtonLabel | Text | 'Send' | Send button label override; blank/'Send' uses translated FEC_Composer_Send |
sendButtonAlignment | Text | 'left' | left / center / right |
requireSubject | Boolean | false | Require non-empty subject |
requireBody | Boolean | false | Require non-empty body |
enableFileAttachments | Boolean | false | Show file attachment uploader |
attachmentLabel | Text | 'Attachments' | Attachment heading override; blank/'Attachments' uses translated FEC_Composer_Attachments |
acceptedFileTypes | Text | (extension list) | Accepted file formats |
maxAttachmentCount | Number | 5 | Max files (1–25) |
defaultContentDocumentIdCollection | ID Collection | [] | Pre-attached file record Ids |
allowCurrentUserSender | Boolean | true | Show current user in FROM |
allowOrgWideSender | Boolean | true | Show Org-Wide addresses in FROM |
allowEmailToCaseSender | Boolean | true | Show Email-to-Case addresses in FROM |
defaultFromEmail | Text | '' | Pre-select FROM by email address |
defaultFromReadOnly | Boolean | false | Lock the FROM field |
| Output | |||
isSuccess | Boolean | — | true after successful send |
errorMessage | Text | — | Error text if send fails |
emailMessageId | Record ID | — | Created EmailMessage record Id |
messageIdentifier | Text | — | RFC 5322 Message-ID |
toRecipientsMetadataJson | Text | — | JSON of To recipients |
ccRecipientsMetadataJson | Text | — | JSON of Cc recipients |
bccRecipientsMetadataJson | Text | — | JSON of Bcc recipients |
deliverabilityWarning | Text | — | Warning about sender configuration |
