Salesforce users often need access to their files and folders from external cloud storage such as Sharepoint, Google Drive, AWS S3, Dropbox etc. While Salesforce provides some out-of-the-box functionality for this, setting it up and managing it on a daily basis can get difficult. The CloudFiles app makes file & folder-related automation easy on Salesforce through various flow actions. In this article, we provide a step-by-step tutorial for creating folders in SharePoint on contact creation and associating them to Salesforce objects, all using highly customizable flow actions.
Installation and setup
The first step to automatically connect your SharePoint with Salesforce is to connect CloudFiles with Salesforce. Setting up CloudFiles in your Salesforce account takes around 5 minutes. You can see the detailed steps here.
- Login to your Salesforce account as Salesforce Admin, then install CloudFiles into your production or sandbox from CloudFiles’ Salesforce marketplace listing.
- Go to setup > permission sets and select CloudFiles permission set. Click on manage assignments and choose add assignment for the users with authorization.
- Connect your CloudFiles account, by selecting CloudFiles from the app launcher inside Salesforce.

The Folder Connect Widget
The Folder connect widget links your Cloud Drive such as SharePoint, Google Drive, OneDrive, Box, DropBox and AWS to Salesforce. This widget enables you to perform various actions such as upload, preview, search, download, share, edit etc. on files and folders within Salesforce. It is a lightning web component that can be dragged and dropped into any Salesforce standard or custom object. Once the folders are linked with Salesforce using CloudFiles, you get access to a host of new automation features for your files, folders, and records. First, we’ll set up the widget:
- Go to the object where the widget is to be inserted and choose “Edit page”.
- Add a new tab, and rename it to your choice.
- Then drag and drop the “CloudFiles Connected Folder” to the tab

Now, let’s link the widget with SharePoint
- Go to the newly created widget and choose link folder.
- Choose SharePoint from the available library list.
- Access the folder to be linked and choose “select folder”.

Now you will be able to see files from a specified SharePoint folder right inside Salesforce. For a detailed guide with a video, check here.
CloudFiles Set Connected Folder flow Template
In the above section, we discussed the manual folder linking process. Now let’s see how to do this automatically. CloudFiles provides a flow template for creating and connecting folders inside Salesforce with your SharePoint drive. To use it, you must first set up the connected folder widget as mentioned above. There are two actions in this template. The Create folder action by CloudFiles creates a folder in your desired folder in SharePoint or any of the other popular Cloud Drives using flows. The Set Connected folder action by CloudFiles connects SharePoint folders to Salesforce inside any object using flows. To use this template, we will first clone it, then set the trigger conditions and other destination variables to specify our target folder in the actions and link it to the record. A comprehensive guide to setting up this folder connect flow template is here.
Cloning the template
Steps to clone the Set Connected Folder Template are given below.
- Access Salesforce setup.
- Locate and click the CloudFiles: Set Connected Folder’ flow inside flows. Save it.
- Give your flow a name and save it.

Next, to set up the trigger conditions, click on the trigger element and set the Object and Trigger Configuration Settings appropriately. Here, we’ll choose account object creation. We will also set this in the set connected folder action. This has been highlighted in the gif below.

To set the actions in this flow template, we’ll need the destination variables.
Set Destination Library
To Set the library value, edit the “library” variable on the toolbox manager and type sharepoint in the Default value. The toolbox manager is available in the Toggle toolbox in the top left.

Set Destination Drive ID
Steps to get the destination parameters for SharePoint,
- Access the content library tab from the CloudFiles App launcher
- Go to the target folder in SharePoint, the downward arrow dropdown contains all the metadata
- Copy the Drive ID in the Drive field present inside the toolbox manager.
The steps have been highlighted in the gif below

Set Destination Folder ID
- Access the metadata from the CloudFiles app launcher by following steps used to copy Drive ID.
- Copy the Folder ID. Click on the Create folder action, edit the element and paste the value in the parent folder ID field.
This has been highlighted in the image below

Set Target Folder Name
The folder created using the create folder action will require a dynamic name to be used in the flows. To set the target folder name, click the create folder action, and edit the element. Now, we’ll choose the account name as the folder name.

See it in action
To summarize, we have connected CloudFiles with Salesforce, created a folder connect widget in the object of our choice (account), and then used the Set connected Folder flow template to automatically create a folder inside SharePoint when a contact is created in Salesforce. Here, you can see when we create a new account “Andy”, a folder gets created in SharePoint with the same name, and a file upload modal is available inside the record. To learn more about the CloudFiles app, visit the CloudFiles – Salesforce Integration page.

About the author

Kamlesh Munda
Kamlesh is the head of Marketing at CloudFiles. He is a movie buff, loves driving cars, and enjoys learning about history and philosophy. He believes in creating long-lasting partnerships in business.