For the complete documentation index, see llms.txt. This page is also available as Markdown.

Open the Email Editor in Screen Flow

Open the S-Docs Email Screen component in a Screen Flow and prefill recipients, content, attachments, and locked fields.

Use this guide when you want a Screen Flow to open the S-Docs Email Screen component.

Use this pattern when users should review the email before sending it.

Use How To: Email Generation (Updated) when the Flow should send the email without a review screen.

Start here if you are newer to Flow

New to Flow? Start with Getting Started: Automate Document Generation.

Prerequisites

  • A Screen Flow

  • At least one Screen element

  • Access to S-Docs Email Screen in Flow Builder

  • A base record ID for merge context

  • Any HTML email template IDs, file version IDs, SDoc IDs, or default values you plan to preload

Step-by-step tutorial

Step 1: Create or open the Screen Flow

Open Flow Builder.

Create a Screen Flow, or open an existing one.

Use a Screen Flow because the email editor runs on a Flow screen.

Admin Tip: If this Flow runs from a record page, create a Text variable named recordId. This name is case-sensitive. Then enable Available for input.

Step 2: Add the screen where users will review the email

Add a Screen element.

Place it where users should review and send the email.

Step 3: Add the S-Docs Email Screen component

Open the screen component list.

Search for S-Docs Email Screen.

Drag the component onto the screen.

Step 4: Set the required component property

Enter a unique value in API Name.

This is the required component field.

Step 5: Map the email context and default values

Map Record Id to the base record.

Set Email Template when you want reusable HTML email content.

Set direct values such as Email Subject, Email Body, Email CC Address, or Modal Title when the Flow should control those fields.

If both Email Template and a direct value are set, the direct value overrides the template for supported fields.

Step 6: Add attachments

Use Content Version Ids to Attach for existing Salesforce Files.

Pass the file LatestPublishedVersionId value.

Use S-Doc Ids to Attach for S-Docs generated earlier in the Flow.

Pass the SDoc IDs as a comma-delimited value.

Step 7: Lock fields when users should not edit them

Set the lock properties with Flow boolean values.

Common lock fields include:

  • Lock Email Body

  • Lock CC Address

  • Lock From Address

  • Lock Email Subject

  • Lock Email To Address

Only lock a field after you confirm the value is already set.

Step 8: Save, activate, and test

Save the Flow.

Activate it.

Then test the screen and confirm it:

  • opens the email editor

  • shows the expected recipients, subject, and body

  • includes the expected attachments

  • enforces the expected field locks

When the user clicks Next or Finish, the email sends automatically.

No extra action element is required.

Troubleshooting and common errors

The expected attachment is missing
  • Symptom: The email editor opens, but the expected attachment is not listed.

  • Cause: The mapped value is not a valid ContentVersion ID or SDoc ID.

  • Fix: Use LatestPublishedVersionId for Salesforce Files. Pass valid comma-delimited SDoc IDs for generated S-Docs.

The subject or CC value is not what you expected
  • Symptom: The loaded email shows a different subject or CC value than the template.

  • Cause: A direct component property value overrides the email template value.

  • Fix: Review both the Email Template mapping and any direct values mapped into Email Subject or Email CC Address.

A locked field is blank or unusable
  • Symptom: A locked field is hidden, blank, or cannot be used.

  • Cause: The field was locked before a value was populated.

  • Fix: Populate the field first. Then enable the lock property.

The email uses the wrong record context
  • Symptom: Merge fields or recipients resolve from the wrong record.

  • Cause: The wrong value was mapped into Record Id.

  • Fix: Map the base record ID that should drive the email content and merge context.

Advanced configurations and reference

  • Component reference: Email Screen component reference

  • Use Email Template for reusable HTML email content

  • Use Content Version Ids to Attach with LatestPublishedVersionId

  • Use S-Doc Ids to Attach with comma-delimited SDoc IDs

  • Direct values can override template values for supported fields such as subject and CC