Flow Actions

Create Link

Introduction

The Create Link flow action creates a shareable link of a file, folder or dataroom that can be copied to a Salesforce property for later use. This means you can automatically create sharing links of files & folders when certain conditions like record creation happens in Salesforce.

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

1 - Add Share 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 Share 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 - Configure parameters

Please configure following parameters after inserting the flow action

  1. Library - One of sharepoint, google, onedrive, dropbox, box, cloudfiles
  2. DriveId - Drive Id for SharePoint or Google Drive. This parameter is not needed for other storages. To get the value of Drive Id, please refer to Create Folder flow action.
  3. Resource Id - Id of file, folder or dataroom. You can get it from one of the earlier actions in flow like "Create Folder".
  4. Resource Type - folder, file or dataroom
  5. Salesforce Record Id - Id of the Salesforce record. In a record triggered flow, this would be {!$Record.Id}



Document image


3 - Returned Value

The Apex action returns a custom type called Link. You can use fields from this type, like id, url etc. You can use these fields in subsequent flow actions or save them as custom fields on record to use outside this flow.