# How To: Email Editor In Flow

{% hint style="info" %}
Before you start:

* Use with a **Screen Flow**
* If you lock any of the property values, make sure it is already populated
  {% endhint %}

### Add the email editor to the Flow

{% stepper %}
{% step %}

#### Step 1 — Create or Open Screen Flow

Create or Open an existing **Screen Flow**.
{% endstep %}

{% step %}

#### Step 2 — Add Screen Element

Add a **Screen** element where users should review, edit, and send the email
{% endstep %}

{% step %}

#### Step 3 — Add S-Docs Email Screen

1. From the Components list, search **S-Docs Email Screen**
2. Drag the component onto the screen
   {% endstep %}

{% step %}

#### Step 4 — Configure Properties (Required)

* **API Name:** Fill the unique API name for the component
  {% endstep %}

{% step %}

#### Step 5 — Configure Properties (Optional)

Prefill values for the user.&#x20;

* Content Version Ids to Attach: **\[Salesforce File Version ID]**
  * Add a **ContentVersion ID (LatestPublishedVersionId)** to add a static attachment to the email
* S-Doc Ids to Attach: **\[Comma-delimited S-Doc ID]**
  * If document was generated previously in the flow, use the **Generated SDoc ID** here
* Email Body: Use **SDOC\_\_Template\_XML\_\_c** from S-Docs HTML template or pre-created Text Template resource in the flow&#x20;
* Email CC Address: Add an email address to CC
  * If the template already contains value, the value added here will override it
* Email From Org Wide Id: Add to send the email from the one of the organization-wide email addresses
* Email Subject: Subject for the email
  * If the template already contains value, the value added here will override it
* Email Template: **\[HTML Template ID]**&#x20;
* Modal Title: Title to display on the screen
* Record Id: **\[Base Record ID]**
  {% endstep %}

{% step %}

#### Step 6 — Lock Fields When Needed

Use the global constants (boolean: True/False) to lock properties when users should not edit specific values:

* Lock Email Body
* Lock CC Address
* Lock From Address
* Lock Email Subject
* Lock Email To Address
  {% endstep %}

{% step %}

#### Step 7 — Send Email

When the flow is debugged or activated, clicking Next or Finish on the screen component sends the email automatically; no additional flow element is required.
{% endstep %}

{% step %}

#### Step 8 — Save, Activate, and Test

Run the flow and confirm the email editor opens with the expected values, attachments, and field restrictions.
{% endstep %}
{% endstepper %}

### Related setup

Use these pages if you need the surrounding setup:

* [Using Salesforce Flows with S-Docs in Experience Cloud](/sdocs/automation-and-document-lifecycle/experience-cloud-site-setup-for-community-users-with-s-docs/using-salesforce-flows-with-s-docs-in-experience-cloud.md)
* [How To: Sending Generated Documents via Email](/sdocs/automation-and-document-lifecycle/workflows/sending-generated-documents-via-email-s-docs-lwc.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sdocs.com/sdocs/automation-and-document-lifecycle/automate-with-flow/how-to-email-editor-in-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
