Flow Email Composer

Official user guide for administrators and end users.

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

SectionAudience
Section 3Salesforce Administrators setting up the component in a Flow
Section 4–7End Users composing and sending email through the component
Section 8Anyone 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 SetAssign To
FEC_Composer_UserAny user who needs to compose and send email
FEC_AdminAdministrators managing the package and reviewing logs
FEC_SupportSupport staff who need to view send history only

Steps:

  1. Go to Setup → Users → Permission Sets.
  2. Click the permission set name.
  3. Click Manage Assignments → Add Assignments.
  4. Select the users and click Assign.

3.2 Add the Component to a Flow

  1. Open Setup → Flows and open (or create) a Screen Flow.
  2. Add a Screen element.
  3. In the Screen editor, search for Flow Email Composer in the components panel.
  4. Drag it onto the screen canvas.
  5. Configure the properties (see Section 3.3).
  6. 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

PropertyDescriptionExample
Relate To Record IDThe 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

PropertyDescriptionExample
Default To EmailsPre-populate the To field. Accepts a text collection variable.{!contactEmailCollection}
Default Cc EmailsPre-populate the Cc field. Accepts a text collection variable.{!contactEmailCollection}
Default Bcc EmailsPre-populate the Bcc field. Accepts a text collection variable.{!contactEmailCollection}

Subject and Body

PropertyDescription
Subject DefaultInitial text for the subject line. Once the user edits the field, this value is no longer applied.
Body DefaultInitial HTML content for the body. Once the user edits the body, this value is no longer applied.
Default Email Template IDId, 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

PropertyOptionsDefault
Send Button LabelAny textSend
Send Button Alignmentleft / center / rightleft

If Send Button Label is left blank (or kept as Send), the component uses the translated Custom Label value from FEC_Composer_Send.

Validation

PropertyDescriptionDefault
Require SubjectBlock send if subject is emptyfalse
Require BodyBlock send if body is emptyfalse

File Attachments

PropertyDescriptionDefault
Enable File AttachmentsShow the file attachment sectionfalse
Attachment LabelSection heading labelAttachments
Accepted File TypesComma-separated extensions or MIME types.png,.jpg,.pdf,.doc,...
Max Attachment CountMaximum number of files (1–25)5
Default Content Document IDsPre-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

PropertyDescriptionDefault
Allow Current User SenderInclude the current user's email in the FROM dropdowntrue
Allow Org-Wide SenderInclude Org-Wide Email Addresses in the FROM dropdowntrue
Allow Email-to-Case SenderInclude Email-to-Case addresses in the FROM dropdowntrue
Default From EmailPre-select a FROM address by email address
Default From Read OnlyLock the FROM field so users cannot change itfalse

Email-to-Case Threading

PropertyDescriptionDefault
Add Email to Case ThreadEnable 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 ID must be a Case record Id.
  • The Add Email to Case Thread property must be set to true.
  • The EnableThreading feature flag in Custom Metadata → Feature Flags must be enabled (it is true by 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:

  1. Go to Setup → Custom Metadata Types → Feature Flag → Manage Records.
  2. Find Enable Threading and 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 VariableTypeDescription
Is SuccessBooleantrue if the email was sent successfully
Error MessageTextError description if the send failed
Email Message IDRecord IDSalesforce EmailMessage record created for the send
Message IdentifierTextRFC 5322 Message-ID header value
To Recipients Metadata JSONTextJSON array of To recipient details (recordId, email, displayLabel, recipientType)
Cc Recipients Metadata JSONTextJSON array of Cc recipient details
Bcc Recipients Metadata JSONTextJSON array of Bcc recipient details
Deliverability WarningTextWarning 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:

  1. Go to Setup -> Translation Workbench -> Translate.
  2. Select your target Language.
  3. Set Setup Component to Custom Labels.
  4. Enter FEC_Composer_ in the label filter/search.
  5. Provide translated values and save.

Labels used by the component:

  • FEC_Composer_CardTitle
  • FEC_Composer_From
  • FEC_Composer_SelectSender
  • FEC_Composer_To
  • FEC_Composer_Cc
  • FEC_Composer_Bcc
  • FEC_Composer_RecipientInputPlaceholder
  • FEC_Composer_Add
  • FEC_Composer_AddRecipient
  • FEC_Composer_AddCcRecipient
  • FEC_Composer_AddBccRecipient
  • FEC_Composer_Subject
  • FEC_Composer_Body
  • FEC_Composer_UploadFiles
  • FEC_Composer_Send
  • FEC_Composer_Attachments
  • FEC_Composer_Success

How Flow overrides interact with translations:

  • If sendButtonLabel is blank or Send, the translated FEC_Composer_Send value is shown.
  • If sendButtonLabel is set to another value, that Flow value is shown.
  • If attachmentLabel is blank or Attachments, the translated FEC_Composer_Attachments value is shown.
  • If attachmentLabel is 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

  1. Click the TO, CC, or BCC field.
  2. Start typing a name or email address — a dropdown of matching Contacts, Leads, and Users appears after a short delay.
  3. Click a result to add it as a recipient pill.

Typing an email address directly

  1. Type a valid email address in the recipient field.
  2. Press Enter, comma (,), or semicolon (;) to confirm it as a pill.
  3. 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:

OptionWhen 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:

  1. Copy an image to your clipboard (e.g. a screenshot, or copy from another document).
  2. Click inside the body editor.
  3. 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:

  1. Click Upload Files or drag files onto the upload area.
  2. Uploaded files appear as a list with file names.
  3. To remove a file, click the × next to it.
  4. 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

  1. Review the recipient list, subject, and body.
  2. 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 Thread is 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):

  1. Go to the App Launcher and open your app.
  2. 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:

FieldDescription
StatusSuccess, Failed, or ValidationFailed
Sent AtDate and time of the send attempt
SubjectEmail subject
From AddressAddress used as the sender
Sender TypeUser, OrgWide, or EmailToCase
To / Cc / Bcc CountNumber of recipients in each field
Relate To IDThe Salesforce record the email was linked to
Email Message IDLink to the EmailMessage record
Message IdentifierRFC 5322 Message-ID header
Attachment CountNumber of files attached
Total Attachment SizeTotal size of attachments in bytes
Error MessageFailure or warning message
Error CodeSalesforce error code (for technical investigation)
Add Email to Case ThreadWhether 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:

  1. Setup → Deliverability — ensure the org's email deliverability is set to All Email.
  2. The Email_Send_Log__c record for the failed send — the Error Message and Error Code fields contain technical details.
  3. 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.

PropertyTypeDefaultDescription
recordIdRecord IDFlow record context (auto-set by Flow)
relateToRecordIdRecord IDExplicit relate-to override
addEmailToCaseThreadBooleanfalseEnable Email-to-Case threading
defaultToEmailsText Collection[]Pre-populated To addresses
defaultCcEmailsText Collection[]Pre-populated Cc addresses
defaultBccEmailsText Collection[]Pre-populated Bcc addresses
subjectDefaultText''Default subject text
bodyDefaultText''Default body HTML
defaultEmailTemplateIdText''Template Id, DeveloperName, or Name
sendButtonLabelText'Send'Send button label override; blank/'Send' uses translated FEC_Composer_Send
sendButtonAlignmentText'left'left / center / right
requireSubjectBooleanfalseRequire non-empty subject
requireBodyBooleanfalseRequire non-empty body
enableFileAttachmentsBooleanfalseShow file attachment uploader
attachmentLabelText'Attachments'Attachment heading override; blank/'Attachments' uses translated FEC_Composer_Attachments
acceptedFileTypesText(extension list)Accepted file formats
maxAttachmentCountNumber5Max files (1–25)
defaultContentDocumentIdCollectionID Collection[]Pre-attached file record Ids
allowCurrentUserSenderBooleantrueShow current user in FROM
allowOrgWideSenderBooleantrueShow Org-Wide addresses in FROM
allowEmailToCaseSenderBooleantrueShow Email-to-Case addresses in FROM
defaultFromEmailText''Pre-select FROM by email address
defaultFromReadOnlyBooleanfalseLock the FROM field
Output
isSuccessBooleantrue after successful send
errorMessageTextError text if send fails
emailMessageIdRecord IDCreated EmailMessage record Id
messageIdentifierTextRFC 5322 Message-ID
toRecipientsMetadataJsonTextJSON of To recipients
ccRecipientsMetadataJsonTextJSON of Cc recipients
bccRecipientsMetadataJsonTextJSON of Bcc recipients
deliverabilityWarningTextWarning about sender configuration