# Auto Create Folder

> #### **Create customized folder structure within SharePoint to store CRM records. Download** [**SharePoint Security Sync**](https://bit.ly/3Gumu81) **app from our** [**website**](https://bit.ly/3Gumu81) **or** [**Microsoft AppSource**](https://appsource.microsoft.com/en-gb/product/dynamics-365/inogic.sync-dynamics-365-sharepoint-security-model?tab=Overview) **and Sign Up for 15 days free trial.**

This feature allows users to create folder structure in the respective SharePoint Site with the help of workflow. The **‘Auto Create Folder’** field on the entity configuration form serves this purpose.

![](https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FEtcDeGYtbCiDXk2GLvWG%2FAuto%20Create%20Folder_1.1.png?alt=media\&token=dafbc125-8643-4c9a-b40e-ec4f2b17defc)

By default the field is set to **‘No’**. The user has to select **‘Yes’** from the dropdown of Auto Create Folder to create folder structure in SharePoint Site. To create the folder automatically, the user has to first create a workflow or can use Power Automate as well and call the **AutoCreateFolderStructure** action.&#x20;

Follow the steps given below to create a workflow.

* Navigate to **Advance settings** --> **Processes** --> Select **‘+New’.**

![](https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2Fr1wNMvLUou12k0INfr4a%2FAuto%20Create%20Folder%20Workflow_1.1.png?alt=media\&token=d4584069-593d-4cf5-9fa0-4ee59990eec0)

* Give an appropriate name to the workflow --> For **‘Category’** select **‘Workflow’** --> Choose the entity for which you want to create folders automatically --> Click on **Ok.**

![](https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FkaX7j3o9zkNQzxcqvRPS%2FAuto%20Create%20Folder%20Workflow_2.png?alt=media\&token=fa420e22-0e9a-4f86-9a9f-0b098dafe21f)

* As per business requirement this workflow can be run for different events.

![](https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FxdyeHaJorZx2AVHZ9tL8%2FAuto%20Create%20Folder%20Workflow_3.1.png?alt=media\&token=2fc8eeb7-7964-454f-8f51-bdd667e67993)

* &#x20;Click on **‘Add Step’.**

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2Fs4JhY2UtvlwNKx2wyniW%2FAuto%20create%20folder%205.png?alt=media&#x26;token=40a9b514-ee2d-4819-9efb-2d2c10ebb464" alt=""><figcaption></figcaption></figure>

* Next, select **Perform Action** step.

![](https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FDyoLLqNryr9wgCwCK37n%2FAuto%20Create%20Folder%20Workflow_4.1.png?alt=media\&token=03921583-843d-4e91-a61b-6a70a570614f)

* Then from the dropdown select the **AutoCreateFolderStructure** action as shown below:

![](https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FmHtHOAqe8KOpnF2q4qlX%2FAuto%20Create%20Folder%20Workflow_5.1.png?alt=media\&token=c2d82e4b-a31f-4eac-b8e4-625a3be6abb8)

* Click on **Set Properties** --> Select **Account** and **Record URL(dynamic)** in the **‘Look for’** section --> Click on **Save and Close**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FPHPOrxpI5tLrSnY69vtR%2Fimage.png?alt=media&#x26;token=65315144-4cc4-41cb-9c9d-34c8fdf2795d" alt=""><figcaption></figcaption></figure>

* **Activate** the workflow.

![](https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2Fc6AaZatcrYCPmvzr5mZg%2FAuto%20create%20folder%209.png?alt=media\&token=6bce5631-629f-4953-9d1f-89ae347786bd)

Once the workflow is activated, based on the triggering event, the record will be created in SharePoint. By Auto Create folder, feature user will be able to create a folder in SharePoint without hitting the **Attach2Dynamics button** or **Documents/ Files tab**.

{% hint style="success" %}
For further queries, reach out to us at <crm@inogic.com>
{% endhint %}
