Share With Community User
While the Create Attachment flow action provides a seamless way to connect files or folders from external storage to Salesforce records. This integration enables users to access attached resources directly through the CloudFiles Lightning Web Component (LWC), which can be placed on record detail pages. The same functionality extends to Experience Cloud, allowing organizations to share resources with portal users while maintaining control through sharing settings.
When configured in CloudFiles > Document Management > Experience Cloud, the sharing settings ensure that attachments visible on internal record pages are also displayed in the Experience Cloud widget for portal users.
Additionally, the Share With Community User action enables a specific resource sharing explicity with either Salesforce records for Experience Cloud pages or directly with users or groups through the Content Library Widget.
The image below gives an overview of the input parameters and what this action looks like. Detailed description of these input parameters and outputs are provided in the following sections.
The Create Attachment action links external resources to Salesforce records or users, automating access to files and folders across different use cases. For example, an organization can create an External sub-folder for an account record, share it with associated portal users, and keep other folders for internal purposes only. Similarly, internal and external monthly reports can be organized into separate folders, ensuring that only external reports are shared with clients.
By providing resource parameters and specifying the target (such as a Salesforce record ID, user ID, or group ID), the action facilitates precise sharing. It automatically updates CloudFiles widgets on internal records and Experience Cloud pages, ensuring both internal teams and external users have the access they need.
The flow action can be helpful in following example use cases among many others.
- Share an external folder containing chemical datasheets with clients while keeping other folders for internal purpose only.
- Create separate folders for storing internal and external monthly reports and share only external reports with clients.
To specify the resource file or folder you want to share or remove, it is necessary to provide the following parameters that define the target resource and its sharing destination. Below is a detailed explanation of each input:
Indicates the ID of the drive in which the target file or folder resides. This is essential for external storage systems like Google Drive or SharePoint, where files are stored across multiple drives.
Specifies the external storage library, such as sharepoint, google , dropbox, box, onedrive, azure or cloudfiles (AWS S3). This determines the platform on which the resource resides.
Input the Resource Id i.e. unique identifier of the file or folder being shared. This ID is used to locate and process the resource within the specified library and drive.
Specfies whether the target is a file or folder.
Specifies the target recipient of the shared resource. This field can be populated with the user Id of the user we want to share the target file or folder. It can also be populated with a salesforce record Id to share it with multiple users related to that record.
This can be:
- A Salesforce Record ID to associate the file or folder with a record (such as an Account or Opportunity) and share it with all the users having record access.
- A User ID to share the resource directly with an individual user.
- A Group ID to share with a predefined group of users in Salesforce.
The target file/folder are shared with designated user(s) as a result of execution of the flow action. The action returns following items as output.
This is the salesforce record Id/user Id/group Id to which a file or folder is shared.
This is the resource related to the target file/folder.