In this article, you will learn how the DocumentsCorePack (DCP) can be used to save generated documents to a specified SharePoint URL in a classic workflow. More information about how to create a workflow can be found here.
Within your workflow, create a new MSCRM-ADDONS.com AutoMergeWorkingItem record and open the settings via [Set Properties].

Complete the following fields:
❶ Name: Type in the name of your newly created step. In this example we used “Save File to SharePoint.”
❷ AutoMergeAction: Open the drop-down menu and select CreateDocument. Select this option to create a document in any Microsoft Dynamics 365 standard and/or custom entity.
❸ PrimaryRecordUrl: Insert the PrimaryRecordUrl here by using the Form Assistant on the right side (highlighted). A description of how to set a PrimaryRecordUrl field can be found in this blog article.
❹TemplateToExecute: Open the look-up record and select the template which should be executed.
❺ SharePoint URL: Insert your SharePoint URL here, which can be dynamic or static. If you want to specify a folder, the URL has to end with a ‘/’.
- Example: https://xyz.sharepoint.com/sites/dcp/account/
If you want to specify a folder and a file name then you type the full URL with the filename, but without extension into this field.
- Example: https://xyz.sharepoint.com/sites/dcp/account/myfilename
❻ Direction: Select the direction of your SharePoint service here. In this case Entity to SharePoint because we want to save a generated document based on an entity to SharePoint.
After defining the properties, save your newly created process and do not forget to [Activate] it in the command bar.
Have a look at this blog article to learn how to upload a SharePoint document to an email.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.