Merging with Record-Triggered Flows
- Navigate to Setup > Process Automation > Flows.

- From the Flows page, click New Flow.

- Select Record-Triggered Flow, then click Create.

- You’ll be prompted to define the starting node’s criteria based on how the flow is initiated, and to configure the Salesforce Object for the action. You can return to this screen by editing the Start node of the Flow. For more information on building out your flow, please see the Salesforce documentation on Defining Conditions in a Flow.

- Below the Start node, select Add Element, then select Action. This will auto-display the Action section to the right.

- In the Action field, search and select Automate SharePoint (apex-shareconnect__AutomateSharePoint).

- Fill out the required fields for Label and API Name. With Merge Connect installed, you will now see the operation New File from Template. Select New File from Template.
Please Note: If Merge Connect is not installed in your org, or you haven’t been assigned a license and the Merge Connect Standard User permission set, this option will not appear.

-
Next you will see a few additional options. Below is a list of the available options:
-
Publish Results Event — Publishes a platform event on completion of the operation with its results in JSON format, including data such as the ID of a Generated File. By default, this is not enabled.
-
Template — By default, the template is set to From Share Connect, which will allow users to select a template created through the Template Builder in Merge Connect for the set Object. However this can be changed to the following option:
-
From a Text Variable — Users can create a variable resource type with the data type of text that will contain a template ID (taken from templates created through template builder) as the value.
-
-
Generated File Format — By default, it is set to Microsoft Format (only .docx and .pptx files are supported). However, this can be changed to a PDF document (.pdf).
-
Template Name — The Select a Template button will open up the Select Templates Modal.
-
Destination — By default, it is set to Default Record Folder. However, this can be changed to any of the following destinations:
-
Default Object Folder
-
Folder in Default Record Folder
-
Linked Folder
-
Parent Record’s Default Record Folder
-
Folder in Parent Record’s Default Record Folder
-
Parent Record’s Linked Folder
-
One Drive
-
Folder from SharePoint…
-

-
- If the Template is set to From Share Connect, and the user clicks the Select a Template modal, they will be prompted with the Select Templates Modal. Here users can select a single published template. When searching for templates they can be searched by name or description. Choose a template, then click Select.

-
Additionally, users can add a child operation by clicking + Add Child Operation. Below is a list of the available options:
-
Save File to Salesforce — On completion of the merge, the file will be saved to your org. You can also add an additional level child operation in Update Record Field.
-
Link File to Parent Record — If there is a parent record for the record, then it will also link the file to the parent record’s SharePoint Links component.
-
Update Record Field — You can select a field on the object that on merge will update with one of the following values:
-
SharePoint File URL
-
SharePoint File ID
-
Salesforce Content Document ID
-
Salesforce Content Version ID
-

-
- Now that your Flow is completed, you can enter the required fields for Flow Label and Flow API Name, then click Save.

- Click Activate.

- To test a Record-Triggered Flow, go back to your Salesforce object/record, and trigger your flow. Once triggered, the component will display a state of automation in progress.
