Auto-create SharePoint Folder (SharePoint Document Location) on record create using Power Automate Flow (Dataverse)


We recently had a requirement to create the SharePoint folder automatically on the Account records creation, instead of having the users click on the Documents tab to create it.

We could write a Power Automate flow to achieve this.

Here we have enabled the Share Point server-based integration. Also, the SharePoint Site and the main or parent folder for the Account are already created/configured.

Below is the corresponding Document location record for the parent Account folder.

  • So basically, we will create a new folder inside the Account folder in the SharePoint site configured in CRM.
  • Then create a new SharePoint Document Location record specifying the Account document location as a parent.
  • And then Associate / Relate the new account record created with this new document location record.

Below is how our Flow will look like –

  1. Triggers on Account record creation.

2. Create a new folder inside Account Folder, here for the name of the folder we are using the format “AccountName_AccountNumber

3. Create a new Document Location record, associating the Account document location with the parent location record. Here we are specifying the same folder name in the relative URL.

We can also fetch the GUID of the Account document location and/or use a variable to store the GUID.

4. Lastly, we are associating these 2 new records.

Below is our newly created account record.

Below we can see our flow ran successfully.

We can see the new folder created and associated.

Here if we click the Documents tab immediately after creating the account record, before our flow runs, we might have the OOB folder also getting created along with our custom folder (flow being asynchronous). If our custom folder is already created and associated before the user clicks on the documents tab, then CRM will not be creating a new folder.

Hope it helps..

Advertisements

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

2 thoughts on “Auto-create SharePoint Folder (SharePoint Document Location) on record create using Power Automate Flow (Dataverse)”

  1. Hi Nishant,
    Thank you for your very interesting post. Maybe I missed something but your flow creates the folder for a newly created account but when I visit the account record and go to the associated Document table, the system also creates a corresponding folder name Account_Nam_AccountId.
    How could we avoid the classical forlder creation ?
    Very best regards.
    Youcef

    Like

Please share your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Power Spark

Power Spark By Shrangarika

Van Carl Nguyen

Exploration of Power Platform

My Trial

It is my experience timeline.

Power⚡Thomas

Sharing my knowledge and experience about the Microsoft Power Platform.

Arpit Power Guide

a guide to powering up community

Welcome to the Blog of Paul Andrew

Sponsored by Cloud Formations Ltd

Deriving Dynamics 365

Deriving Solutions and features on Power Platform/Dynamics 365

The CRM Ninja

Thoughts & musings from a Dynamics 365 Ninja!

D CRM Explorer

Learn about Microsoft Dynamics CRM Power Platform customization and implementation and other cool stuffs

Stroke // Jonas Rapp

I know pre-stroke. I will improve who I was.

Power Melange

Power Melange By Shalinee

Clavin's Blog

Power Automate - Power Apps - SharePoint Online - Azure - Nintex - K2 - Artificial Intelligence

Sat Sangha Salon

An Inquiry in Being

The Indoencers

The Influencers & Influences of Indian Music

Monika Halan's blog

Hand's-free money management

D365 Demystified

A closer look at Microsoft Dynamics 365.

Microsoft Mate (msftmate) - Andrew Rogers

Experienced consultant primarily focused on Microsoft Dynamics 365 and the Power Platform

Knowhere365

Specific topics by Django Lohn on the whole Microsoft365 Stack

Manmit Rahevar's Blog

One Stop Destination for Microsoft Technology Solutions

MG

Naturally Curious

Brian Illand

Power Platform and Dynamics 365

Steve Mordue MVP

A Microsoft Business Applications MVP

Subwoofer 101

Bass defines your home theater

SQLTwins by Nakul Vachhrajani

SQL Server tips and experiences dedicated to my twin daughters.

Everything D365

Discovering Azure DevOps and D365 Business Applications

Tech Wizard

Lets do IT Spells

XRM Tricks (Power Platform & Dynamics CRM )

Power Platform & Dynamics CRM

CRM TIPS BY PRM

Mail to crmtipsbyprm@gmail.com for queries and suggestions

nijos.dev

Giving back to the community what I have learned

xrm CRM Dynamics

Dynamics CRM Technical & Functional Info

Dynamics 365 Blogs - Explained in unique way

Sometimes you need to look at things from different perspective.

CRM Keeper

Dynamics 365 Customer Engagement, CRM, Microsoft CRM, Dynamics CRM