website logo
Go To WebsiteAppexchange
Home
Salesforce
HubSpot
Web App
API Reference
Navigate through spaces
⌘K
Table Of Contents
Quick Starts
Features
Widgets
Flow Actions
Flow Templates
Platform Events
Tutorials
How to make existing Salesforce records work with CloudFiles
Copy Salesforce files to SharePoint
Apex
FAQs
Support
Docs powered by archbee 

Create Folder

Introduction

The Create folder flow action creates a folder in a desired destination on any cloud storage. This means you can automatically create folders in Google Drive, SharePoint, OneDrive etc.

The Create folder action requires the following parameters -

  1. Library - The desired library where the file must go (e.g. sharepoint)
  2. Destination parameters - Various parameters that specify where the folder must be created
  3. Folder name - Final name of the folder that can be specified using Salesforce merge fields

In this article we show how to add this action to your flow and configure the parameters.

1 - Add Create Folder Action to your Flow

Create a standard Salesforce flow. You can choose to have any type of trigger conditions here. Then add an element and choose actions. If you have CloudFiles correctly installed and connected, you can find the Create Folder action in the CloudFiles category on the left.



Document image


NOTE: If you use a record triggered flow, make sure you run this action on an asynchronous path as shown below.

Document image


2 - Library Parameter

Library is the desired Cloud based drive where you wish to create the folder. This is a simple text field and you can enter one of these options -

  1. sharepoint for SharePoint
  2. google for Google Drive
  3. onedrive for OneDrive Personal & OneDrive for business
  4. dropbox for Dropbox
  5. box for Box
  6. cloudfiles for AWS s3

3 - Destination Parameters

These parameters help specify where the target folder should be created. There are multiple parameters that may need to be set based on the target cloud storage. E.g. sharepoint users require all 3 while dropbox users may require only one.

These parameters can be easily copied from within Salesforce using the Content Library Tab. Below we describe these parameters and then we show how to copy them easily with a single click.

  1. Parent Folder ID -This is the cloud drive generated ID of the folder where you want to create this folder in.
  2. Drive ID -This is important for google drive & sharepoint users only. These cloud storages offer multiple 'drives' where documents can be uploaded.

These parameters can be obtained within Salesforce with a single click by navigating to the parent folder in the Content Library Tab and clicking the "View Metadata" button as shown in image below. The Content Library Tab can be accessed from the CloudFiles App Launcher or an also be inserted onto any of your standard or custom apps.

Follow the steps below to retrieve these IDs - 

  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. A dialog box opens up which shows all the IDs. Copy the ID from here.

These steps are shown in the GIF below -

Document image


4 - Folder Name

Folder name is the name you wish to give your created Folder. You can add merge fields from the respective Salesforce object as well. E.g. in our example, we used the lead's first name as the name of our created folder.

A standard strategy is to create a calculated field on your object from multiple text properties that acts as the name of the folder, and then use this calculated field here.

Document image


5 - Returned Value: Create Folder ID

The Apex action returns the folder ID of the created folder. You can choose to save this folder ID somewhere if you wish to use it later.

6 - See it in Action

In the gif below, we show how creating a new lead creates a new folder in Sharepoint.

Document image







Updated 03 May 2023
PREVIOUS
Flow Actions
NEXT
Create Attachment
Docs powered by archbee 
TABLE OF CONTENTS
Introduction
1 - Add Create Folder Action to your Flow
2 - Library Parameter
3 - Destination Parameters
4 - Folder Name
5 - Returned Value: Create Folder ID
6 - See it in Action