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

Send Email from Flow

Use the S-Docs Send Email invocable action in Flow with a base record, email template, and SDoc attachments.

Use this guide when you want a Flow to send an email directly with the S-Docs Send Email action.

Use this pattern when the Flow should send the email without a review screen.

Use Open the Email Editor in Screen Flow when users should review the email before sending it.

Start here if you are newer to Flow

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

Prerequisites

  • A Flow that can run S-Docs actions

  • Access to the base record used for merge field context

  • An S-Docs Email Template name or ID

  • One or more valid SDoc IDs to attach

  • Recipient values in the email template, or Flow values to override them

Step-by-step tutorial

Step 1: Add the action to the Flow

Open Flow Builder.

Open an existing Flow, or create a new one.

Add an Action element where the email should send.

Search for and select the S-Docs Send Email action.

Send Email action selected in Flow

Step 2: Map the required action fields

Map these required fields first:

  • Base Record ID

  • S-Docs Email Template Name or ID

  • Attachments

Use Base Record ID for the Salesforce record that drives merge field context.

Use S-Docs Email Template Name or ID to load the email template.

Use Attachments to pass the SDoc ID for each generated document you want to send.

If the Flow generated the document earlier, map the returned SDoc ID from that step.

Required Send Email field mappings

Step 3: Set any optional email overrides

Map optional fields only when the Flow should override the template or add values dynamically.

Common optional fields include:

  • Recipient Email Address

  • CC Recipient Email Address

  • BCC Recipient Email Address

  • Org-Wide Email Address

  • Subject Line

  • System Mode Generation (Experience Cloud)

If both the template and the Flow provide a supported value, the Flow value overrides the template.

Optional Send Email field mappings

Step 4: Save, activate, and test

Save the Flow.

Activate it.

Then test the run and confirm it:

  • uses the correct Base Record ID

  • loads the expected email template

  • attaches the expected SDoc records

  • sends to the expected recipients

  • uses the expected subject line

Optional Send Email field mappings before saving and testing

Troubleshooting and common errors

The email sends, but the attachment is missing
  • Symptom: The email is delivered, but the expected file is not attached.

  • Cause: The value mapped into Attachments is not a valid SDoc ID.

  • Fix: Pass the generated SDoc ID from the earlier Flow step. Or confirm the stored ID still points to an existing SDoc record.

The email uses the wrong record data
  • Symptom: Merge fields resolve from the wrong record.

  • Cause: The wrong value was mapped into Base Record ID.

  • Fix: Map the record ID that should drive the email template merge fields.

The action faults in Experience Cloud
  • Symptom: The Flow fails when it reaches Send Email in an Experience Cloud flow.

  • Cause: The System Mode Generation (Experience Cloud) value does not match the user context or access model.

  • Fix: Review that setting and test again with the expected portal user context. Add a Fault path from the action if you want to capture and display the failure cleanly.

Advanced configurations and reference

  • Use HTML Email Templates when you need additional details regarding the invocable action.

  • Base Record ID sets the merge field context for the email template.

  • S-Docs Email Template Name or ID accepts either the template name or the template record ID.

  • Attachments expects SDoc IDs for the documents you want to send.

  • Recipient Email Address, CC Recipient Email Address, BCC Recipient Email Address, and Subject Line can override template values.

  • System Mode Generation (Experience Cloud) is useful when the Flow runs in Experience Cloud and standard user access is not enough.