Quick Starts

Connect external folder to a record

CloudFiles widget is a lightning web component that be dragged and dropped onto any Salesforce standard or custom object. Once inserted, the user can go to the respective object and link the widget to a folder sitting in SharePoint / Google Drive / OneDrive / Box / Dropbox or even AWS S3. Once linked, users can see the contents of the folder, search, preview, edit, download, share files and do a lot more. Users can also upload files directly in Salesforce which get stored in the external storage.

CloudFiles also supports linking multiple folders or files to a Salesforce record

Further, CloudFiles provides flow actions that can automate the resource(folder or file) creation and linking process, thus providing an extra layer of automation on top.

This article explains the following -

  1. Setting up the widget- This section provides steps and screenshots to drag and drop the widget onto any Salesforce standard or custom object.
  2. Linking the widget to folder - This section shows how to link a folder to an object's widget. This can be done manually or automatically using flow actions.
  3. Working with linked folders- This section shows the usability of the linked folder such as upload, search, preview, edit, share and other operations right from the Salesforce record.
  4. Folder linking automation- This section covers the flow component used to automate the folder / file linking operation.
  5. Unlinking the folder - This section shows how to disconnect a linked folder or file from the widget.

Keep scrolling for more info.

1 - Setting up the widget

You can drag and drop the folder widget onto any standard or custom Salesforce object. Simply go to the 'Edit Page' from the object page, add a new tab to your object and drag and drop the widget. These steps are shown in the video below.



"CloudFiles Connected Folder" widget has been replaced by the more generic "CloudFiles" widget.

2 - Linking the widget to the folder

Now that your widget is setup, you can start linking files or folders with your Salesforce objects. Just click the "Select folder/file" button in the widget, select the folder from any cloud storage (e.g. SharePoint, Google Drive, Box, Dropbox, AWS S3, OneDrive) and that's it. Follow the simple steps below -

  1. Go to the Salesforce record where you want to link the folder
  2. Locate the CloudFiles widget that you had added in the previous step
  3. Click on the "Select folder/file" button (See note below if you instead see the "Connect CloudFiles" button here)
  4. A dialog will open where you can select your library / folder / file that you want to link
  5. Select the folder or file. The contents will immediately start showing up in your widget

NOTE: If you see the "Connect CloudFiles" button instead of the "Select folder/file" button on the widget, this is because you recently installed the Salesforce app and haven't connected it to the CloudFiles account yet. Simply click the Connect button and follow on-screen instruction. Screenshots for this are shown in Step 2 here.

Here's a video that shows this in action. You can also connect multiple folders and files in this widget.



3 - Working with linked folders

The connected folders are pretty easy and intuitive to use. You can upload files and create folders, search inside this folder and sub-folders, do actions such as edit in cloud drive, download, preview etc... on the files & folders. Explore the buttons all around the widget to know more.

Document image


4 - Folder linking automation

In this section, we cover a small flow template that enables you to automatically link folders from external storage onto Salesforce pages. This flow template is available as part of the managed package and can be cloned and updated as per your business needs. 

Before setting up the automations, please connect your automation user by following the article on Automations

For the sake of simplicity, we created a simple flow that creates a folder in SharePoint whenever an contact is created, and then links it to the folder widget of that contact.

  1. Create a record triggered flow.
  2. Set trigger conditions of new contact creation
  3. Use asynchronous path to add CloudFiles actions. You can also clone the Create & Attach Folder Flow template that comes pre-packaged with the app.
  4. Add CloudFiles folder creation action and configure parameters
  5. Add CloudFiles folder linking action and configure parameters
  6. Save and test your flow

The video below shows our final flow along with the parameters we used. You can check the details on how to configure these paramters in our article on CloudFiles Template: Create & Attach Record Folder.



You can easily get the various IDs associated to this action using the simple steps below.

  1. Click on App Launcher on top left. Search for the CloudFiles App.
  2. In the CloudFiles App, select the Content Library Tab
  3. Go to your cloud storage. You may need to login if you haven't done so before.
  4. Go to the target folder where you would like to place the created folders in.
  5. Click on View Metadata option from the folder list item dropdown as shown below.
  6. A dialog box opens up which shows all the IDs and other meta data required for automations.

These steps are shown in the GIF below -

Document image


5 - Unlinking the folder

To unlink the folder or file, either go to widget home or inside the connected folder and click on the Disconnect button as shown in the image below.

Document image


More resources on CloudFiles - Salesforce Integration

There's a plethora of articles and videos that you can refer to for more information on using CloudFiles with Salesforce. The app offers a number of Lightning web components, flow actions and other flow components, custom objects and apex support which makes document automations and sharing easy.

You can not only do auto-folder creation and connection as shown above, but you can also share these files with community as well as external users. You can enable security & collect analytics on the files. With the help of flow components, processed can be completely automated.

This article links to various sections of the knowledge base that cover these components and use-cases in Salesforce.