You can email a generated document automatically with a Salesforce flow. First, you add an email template and email settings to your document solution. Then you build a record-triggered flow that calls the ASync Document Generate Solution hic_docmerge Apex action.
Before you begin
- You have a document solution in Docs Made Easy. See Create a document template with the Document Automation Wizard.
- You have permission to create flows in Salesforce.
- Flow automation is a Pro feature. The user the flow runs as needs the Docs Made Easy and Docs Made Easy Pro licenses, the Docs Made Easy Business User or Docs Made Easy Admin permission set, and the Docs Made Easy Pro User permission set. See Assign licenses and permission sets.
Set up the email in your document solution
Go to Document Setup and click the pencil icon next to your document solution. The solution opens for editing.
On the Add Email Template tab, create the email template that the flow sends.
On the same tab, select Email and enter the email details. Click Save, then click Next. Docs Made Easy saves the email settings to your solution.

Create the flow
Click the Setup icon at the top right of the screen, enter
Flowin the Quick Find box, click Flows, and then click New Flow. The new flow dialog opens.Select Record-Triggered Flow, then click Edit next to Configure Start. The Configure Start panel opens.
In Configure Start, select your object and set the trigger that you need.

Select Free Form, then drag the Action element from the left side of the screen onto the canvas. The New Action page opens.
In the Action field, search for and select ASync Document Generate Solution hic_docmerge. Then fill in the required fields, such as Label and API Name.

In the
documentSolutionIdfield, enter the ID of your document solution. The document solution ID is the part of the solution's URL that is highlighted below.
For the record ID, enter the triggering record's ID,
{!$Record.Id}(in the resource picker, choose Triggering Record > Record ID), and click Done. Salesforce adds the action to your flow.On the canvas, connect the start element to the Apex action element. Save the flow, then click Activate.
Test the flow
Open a record of the object you chose (for example, an account) and update it so that it meets your trigger conditions.
Go to the Related tab and refresh the page. The generated file appears in both Files and Notes & Attachments, and you can open it. The recipients that you set up in your solution receive the email.

The email is sent through Salesforce, so Salesforce email limits apply, and it's recorded in the record's activity history. If nothing happens, check the Salesforce debug logs for the flow run.
Related: Automate document generation with Flow · Email the generated document as an attachment in background mode