Configure Email Sending On Your Record Page
What You'll Learn
Connect an HTML email template to Documents (S-Docs)
Preload email content when users send generated files
Enable automatic email open after document generation
Test the full record-page email workflow
Troubleshoot missing templates and blank email defaults
What You'll Build
In this tutorial, you will configure an Opportunity record page so users can send generated documents with a predefined email template.
By the end, you will have:
One Documents (S-Docs) component tied to an HTML email template
Optional automatic email open after generation
A tested send-by-email workflow from the record page
One repeatable admin setup for end users
Estimated time: 10 minutes
Prerequisites
Before you start, make sure you have:
Access to a Lightning record page that already includes Documents (S-Docs)
Permission to edit Lightning record pages
One active S-Docs HTML email template for the same base object, such as
OpportunityOne test record for that object
Basic familiarity with the Documents (S-Docs) component
Complete Create Your First Email Template
Step 1: Open the record page in Lightning App Builder
Start on a real record for the object that uses your S-Docs setup.
For this example, use an Opportunity.
Open Salesforce.
Go to Opportunities.
Open one test opportunity.
Click the Gear icon.
Click Edit Page.
This opens Lightning App Builder for the current record page.
Step 2: Select the Documents component
Now open the settings for the component that holds generated files.
In the page canvas, click Documents (S-Docs).
Go to the properties panel on the right.
Confirm you selected the document-list component, not Generate Documents (S-Docs).
You are now in the correct place to control email behavior for generated files.
Step 3: Set the email template
Choose the S-Docs email template that should load when users send a document.
In the component properties, find Email Template or Email Template Name.
Enter the exact template name, or select it if a list appears.
Confirm the template is built for the same object as the page, such as
Opportunity.
Each Documents (S-Docs) component can use one email template at a time.
The selected template must use the HTML format. PDF templates do not load as email body templates.
What you just did:
Connected one reusable email template to the component
Set the default body content for the send workflow
Matched the component to one object-specific template
Step 4: Turn on automatic email open if needed
Use this option when users usually email the document right after generation.
Stay in the Documents (S-Docs) properties panel.
Find Automatically Open Email Editor.
Enable the checkbox if you want the email editor to open right after generation.
Leave this off if users usually review the file before sending.
What you just did:
Chose whether email starts automatically
Reduced one click for high-volume send workflows
Kept the record-page flow aligned with your team's process
Step 6: Generate a test document
Create one fresh document before you test the email workflow.
Find Generate Documents (S-Docs) on the same record page.
Generate one document from a test template.
Wait for the document to appear in Documents (S-Docs).
If the document does not appear right away, refresh the record page once.
This gives you a current file to use in the email test.
Step 7: Open the email workflow and verify the result
Now confirm the component loads the expected template.
If Automatically Open Email Editor is enabled, the email editor may already be open.
If it is not open:
Find the generated document in Documents (S-Docs).
Select the document if needed.
Click Send or Email.
Then verify these results:
The email editor opens
The expected HTML email template loads
The subject and body match the template
The generated document is attached
The To field is populated if the template provides a value
What you just did:
Confirmed the component-level email setup works
Verified the user sees the expected email content
Finished one complete record-page send test
Common Issues and Solutions
The email template does not load
Check these items:
The component uses the correct template name
The selected template uses the
HTMLformatThe template Related To Type matches the component object
The page was saved and activated after the change
The email editor opens, but the recipient is blank
Check these items:
The email template has a valid To value configured
The source record contains data in the email field used by the template
The merge field path in the template points to a real field on the current record or related record
If you still need to configure the template, use Create Your First Email Template.
Automatically Open Email Editor does not trigger
Check these items:
Automatically Open Email Editor is enabled on Documents (S-Docs)
The document was newly generated from the same record page
The page was saved after the setting changed
Both S-Docs components are on the same active record page
The wrong email template appears
Check these items:
You edited the correct Documents (S-Docs) component in App Builder
The page does not include a second document-list component with a different template
The template name entered in the property matches the intended record exactly
The send action is missing or unavailable
Check these items:
A generated document exists in Documents (S-Docs)
The user has permission to send email from Salesforce
The page includes the full S-Docs record-page setup
If the record page still needs setup, use Configure Document Generation On Your Record Page.
What You've Learned
✅ Connected an HTML email template to Documents (S-Docs) ✅ Enabled optional automatic email open after generation ✅ Tested the email workflow from a Lightning record page ✅ Verified template content and attachment behavior ✅ Learned the most common fixes for record-page email setup
Next Steps
Use Create Your First Email Template to build the HTML template that loads in the email editor.
Use Configure Template Settings: Email to control subjects, recipients, sender options, and restrictions.
Use Generate and Email Your Document to test the end-user workflow from the record page.
Use Configure Document Generation On Your Record Page if you still need the full component setup.
Practice Exercise
Configure one test record page so users can send a generated quote with a predefined email template.
Open one test
Opportunityrecord page in Lightning App Builder.Set an HTML email template on Documents (S-Docs).
Enable Automatically Open Email Editor.
Save the page and generate one document.
Confirm the email editor opens with the expected template and attachment.
Bonus challenges:
Test the same setup with automatic email open turned off
Update the email template subject and verify the new value loads
Add this setup to another object's record page
Last updated
Was this helpful?

