Navigate to Salesforce Setup > Process Automation > Flows.
From the Flows page, click New Flow.
Select Autolaunched Flow (No Trigger), then click Create.
To create the flow, we first need to create a RecordID variable. To create a new variable, click the box in the top left corner.
Click on New Resources and select Resource Type as Variable. Then set the Data Type as Text. For Availability Outside the Flow, check Available for input. Finally, click Done.
In order for the flow to trigger on any record, we will need to add a Get Records element to capture the RecordID. Below the starting node, select Add Element, then select Get Records. This will auto-display the Get Records section to the right.
For the Get Records action you will need to select the Object you want this Autolaunched Flow to trigger on. Next, for Filter Account Records, set the Field input value to the Object Id with the value equal to the RecordID variable that was created. For How Many Records to Store, select All Records.
Below the Get Records node, click Add Element, and select Action. This will auto-display the Action section to the right.
In the Action field, search and select Automate Merge (apex-mergeconnect__AutomateMerge).
Fill out the required fields for Label and API Name. Before continuing, you will need to select the Object this flow will trigger on and a RecordID Variable.
Now you can create your New File from Template Merge Connect Operation. Once completed, click Save.
Click Activate.
For an Autolaunched Flow, you will need a method to trigger the flow, in this example we will be using a custom button. To create a custom button, go to Salesforce Setup, and click on Object Manager.
Select your desired Object.
From the right-hand side, select Buttons, Links, and Actions.
Select New Button or Link.
Provide a Label and Name for your button. For this scenario, the following settings are recommended:
Display Type = Detail Page Button
Behavior = Display in existing window without sidebar or header
Content Source = URL
For the button link in the text field, you will need to get the Flow URL. This can be obtained by navigating to Salesforce Setup > Flows > View Details and Versions. The construction of the button link is: [flow url]?[created variable in flow]=[object id].
Finally, you will need to add your button to your page layouts. Click on Page Layouts, then select the desired page layout.
Select Mobile & Lightning Actions. Under Salesforce Mobile and Lightning Experience Actions, select Override the Predefined Actions. Drag and drop your created button into the section, then click Save.
Now you will be able to trigger your Merge Connect Autolaunched Flow through a button.