Step-by-Step Guide: Adding Conditional Logic to Your Salesforce Document Generation Templates

Published on November 18, 2025

What if hours of work took seconds?

What’s the reality with Docs Made Easy. Generate flawless documents instantly—because your time is too valuable.

Save Hours Today

The Send Email Via Flow Feature in the Salesforce Document Generation app offers a seamless way to automate email delivery and document generation within Salesforce. By integrating this feature into your workflow, you can send personalized emails automatically with the generated documents attached, reducing manual effort and saving time.

This guide will walk you through the steps to set up this powerful feature, helping you leverage the full potential of your Salesforce Document Generation app for a more efficient, automated process.

Setting Up Your Document Solution and Email Template

Step 1: Kindly edit your document solution first by selecting Document Setup, then clicking the pencil icon.

Kindly edit your document solution first by selecting Document Setup, then clicking the pencil icon.

Step 2: On the Add Email Template tab in your solution. Kindly create an email template first, which can be sent via email.

 Add Email Template

Step 3: In the next step, please choose email on the same tab and add information like this to send an email. To save this information on your solution, please click on Save and then the Next button.

Core Steps to Creating a Flow

Note: As we have already set up email parameters in our solution. We can create a flow to send an email with the help of below steps mentioned below. We can use ASync Document Generate Solution hic_docmergeapex-hic_dme__ComposerinvocableDocSolController.


Step 1: Click the setup button on the right side of the screen. 

Click the setup button on the right side of the screen.

Step 2: You will see a homepage like the one below; on the left side, use Quick Find to search for “FLOW”.

You will see a homepage like the one below; on the left side, use Quick Find to search for "FLOW

Step 3:Click on “FLOWS” as shown below, then click on “NEW FLOW”.

Click on "FLOWS" as shown below, then click on "NEW FLOW

Step 4: Now you will see the screen below; choose “Record-Triggered Flow”.

Now you will see the screen below; choose "Record-Triggered Flow

Step 5: Now click “Edit” as shown in the red box.

Now click "Edit" as shown in the red box

Step 6: After that, you will see “Configure Start” below. Select your object and configure the trigger as needed.

STEP-6 After that, you will see "Configure Start" below. Select your object and configure the trigger as needed.

Step 7: After that, choose “Free Form” and drag and drop the Action (Element) from the left side of the screen. 

STEP- 7 After that, choose "Free Form" and drag and drop the Action (Element) from the left side of the screen.

Step 8: Next, you will see the “New Action” page; fill in the “Action” field by searching “ASync Document Generate Solution hic_docmerge,” then complete all required fields like Label and API Name.

ASync Document Generate Solution

Step 9: In the “documentSolutionId” field, enter the Document Solution ID of your document.

 STEP- 9 In the "documentSolutionId" field, enter the Document Solution ID of your document.

documentSolutionId

Step 10: Now, enter the record ID and click “Done.” Your flow is now created.

STEP-10 Now, enter the record ID and click "Done." Your flow is now created.

STEP-11 Now, connect an Apex Action element.

STEP -12 Save the flow and activate it as shown below.

Step 12: Save the flow and activate it as shown below.

STEP-11 Now, connect an Apex Action element.

 

Step 13: Now, go to the Account record and update it according to your requirements.

STEP-13 Now, go to the Account record and update it according to your requirements.

Step 14: Now, go to the Related tab and click on Notes and Attachments.

STEP-14 Now, go to the Related tab and click on Notes and Attachments.

Step 15: Now, you can refresh it. Your file is generated, and you can view it.

STEP- 15 Now, you can refresh it. Your file is generated, and you can view it.

Conclusion

By following the steps above, you can easily set up the Send Email Via Flow Feature in your Salesforce Document Generation App, enhancing your document handling process with automation. This feature not only ensures accurate, timely document delivery but also aligns with the broader goals of Document Automation, enabling faster, more efficient workflows in your Salesforce environment. 

Docs Made Easy seamlessly automates your document generation and communication with this advanced integrated solution.

Frequently Asked Questions

It automates document generation and email delivery inside Salesforce using Record-Triggered Flows.
No. Everything is configured using Flow Builder’s drag-and-drop interface.
Open your Document Solution in Docs Made Easy — the ID appears in the URL or settings panel.
Yes. Docs Made Easy supports multiple templates or merged outputs in one email.
Absolutely. This feature works with any standard or custom Salesforce object.
Inside Notes & Attachments or Files of the related record.