Create Link
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.
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.
NOTE: If you use a record triggered flow, make sure you run this action on an asynchronous path as shown below.
Please configure following parameters after inserting the flow action
- Library - One of sharepoint, google, onedrive, dropbox, box, cloudfiles
- 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.
- Resource Id - Id of file, folder or dataroom. You can get it from one of the earlier actions in flow like "Create Folder".
- Resource Type - folder, file or dataroom
- Salesforce Record Id - Id of the Salesforce record. In a record triggered flow, this would be {!$Record.Id}
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.