Flow Actions

Get Salesforce Files

Introduction

The CloudFiles: Get Salesforce Files flow action enables the retrieval of the IDs of all Salesforce Files attached to a specific Salesforce record. This is particularly useful when you need to perform further operations on these files, such as processing, sharing, or deleting them in bulk. By incorporating this action into your Salesforce Flow, you can automate tasks involving Salesforce Files, enhancing efficiency and reducing manual effort.

The image below provides an overview of the input parameters and how this action appears in a Salesforce flow. Detailed descriptions of the input and output parameters are provided in the following sections.

Document image


What This Action Does

The CloudFiles: Get Salesforce Files action takes the ID of a Salesforce record as input and retrieves a Text Collection containing the ContentDocumentIDs of all Salesforce Files attached to that record. These IDs can be used for various purposes, such as triggering further automation or integrating with other systems.

Example Use Case:Automating Salesforce file copying into external storage and deleting from Salesforce. For example, for Opportunity records, when an Opportunity is closed, retrieve all attached Salesforce files, copy them into the connected external storage and delete the Salesforce files once copied.

Input Parameters

To configure the Get Salesforce Files action, provide the following parameter:

Record ID

The RecordId of the Salesforce Object whose linked Content Documents (Salesforce files) need to be retrieved.

Output Parameters

The action returns the following output:

Document image


Text Collection of ContentDocumentIDs

Document image


A collection of ContentDocumentIDs for all Salesforce Files linked to the specified record. These IDs can be passed to other flow actions for further processing, such as copying into external storage or deleting the Salesforce files etc.

Use Caution

The action cannot Output IDs of Salesforce Attachments i.e. the Old Salesforce Classic's File format.