How to
Get Salesforce files
The Get files action allows you to bring in any files or attachments from a record on a connected SFDC org to send as attachments in emails from a Pendula flow.
The Get files node supports any standard, special and custom objects associated with the Connected Salesforce organisation that have files attached to them.
Configuring the node
Select the Salesforce connection to use with the node (i.e. the Salesforce instance you want to get files from).
How to add and find IDs for ID fields
For specific record IDs: Access the required record ID in your web browser. The URL displayed in the browser address bar contains both the Salesforce instance and the Record ID.
Salesforce Classic example
URL: http://na1.salesforce.com/5003000000D8cuI
Record ID: 5003000000D8cuI
Lightning Experience example:
URL: https://na1.lightning.force.com/lightning/r/Case/5003000000D8cuIQAA/view?0.source=alohaHeader
Record ID: 5003000000D8cuIQAA
How to find merge field ID
You can search for and find the correct merge field by clicking the green data explorer button on the field itself. If you want to make sure of the node your merge field is coming from, you can find it manually using the steps below.
Fields such as ID in SFDC will display as ID in the Object Manager, but will show in the Data Explorer view (merge field tab) in Pendula "AccountID".
From the trigger node (or a previous Get record node) you can find the ID of the related record by using the data explorer under the ‘merge field’ tab. Navigate to This node > record > ContactID (or another lookup ID if required) and click ‘copy’. Copy this merge field into the Get files node.
Pendula does not validate the format or data for the referenced value in the query. If the format is incorrect, the experience will continue down the failed path.
Add criteria
You can specify a number of criteria that relate to the ContentDocument object (i.e the Files) in Salesforce to support a number of different document delivery use cases in a Pendula flow.
The query builder supports merge fields from the trigger node (or any other node/integration previously used within the flow), and exact values.
You can also specify the number of most recent files, up to 10. By default, the node will fetch ALL files on the record.
Supported use cases
-
Select a record by ID as described above. If no criteria are specified by the user, the custom action will automatically retrieve all files on the associated record.
-
For example, you may want to retrieve all files with a pdf extension, or with a filename containing ‘Invoice’. You may set any criteria for attributes on the
ContentDocument
object.Note that emails in Pendula will not be sent if the combined total of body and attachments is over 10MB. The Get file action will automatically create a failure outcome for files that:
- Have a
ContentSize
> 10MiB - Are not one of the following supported file types:
FileType
= TXT, HTML, ICS, JPEG, PNG, GIF, WebM, MP4, MPEG, PDF, DOC, DOCX, XLS, and XLSX
- Have a
-
Along with specific attributes of the file, you can also only retrieve the most recent files matching that criteria from the record (for example, the most recent pdf containing ‘invoice’ in the filename).
The Retrieve most recent files dropdown supports fetching up to the 10 most recent files on a single record. By default, all files matching the criteria will be retrieved.
Using Salesforce formulas
You can use SFDC Date Literals and Date Formulas in your query. Read more about using these formulas here.
Using the like
operator
You can use the like operator with supported formulas in your query. The like
operator matches single characters and patterns found anywhere in a string—beginning, ending, or somewhere in-between.
Use case | Formula |
Match any single character in the string. For example, to filter on a list of countries, a pattern of |
Underscore ( |
Match any pattern in the string. Starting a pattern with a percent sign returns all words that end with the specified characters. The percent sign indicates that any number of characters can precede the specified ones. Ending a pattern with a percent sign returns all the words that begin with the specified characters. Any number of characters can follow the specified ones. To match a pattern anywhere in a string, the pattern must start and end with a percent sign. For example, to filter on a list of countries, a pattern of |
Percent sign ( |
Include a literal percent sign or underscore in a pattern. |
Escape with a backwards slash ( |
Additional wildcard characters and regular expressions aren’t supported.
For picklist and boolean operators (apart from is null
), the value is not case-sensitive.
Outcome paths
Success path: the experience will continue down this path if all files are successfully retrieved.
Failed: the experience receives an unexpected failure from Salesforce. If this outcome path is switched OFF, the experience will end and be marked as ‘failed’. If this path is switched ON the experience will continue down that path to the next configured node.
Not found: The experience fails to retrieve some or any files from Salesforce—this would include files that have been automatically excluded due to validation rules. If this outcome path is switched OFF, the experience will end and be marked as ‘failed’. If this path is switched ON the experience will continue down that path to the next configured node.
Too large: The total of the files retrieved is over 10MiB. If this outcome path is switched OFF, the experience will end and be marked as ‘failed’. If this path is switched ON the experience will continue down that path to the next configured node.
Current known limitations & workarounds
Pendula is regularly releasing updates and fixes for limitations where possible and appropriate. We will continue to update the list below as more capability becomes available.
Limitation | Workaround (if applicable) |
Field validation: the get files currently does not support visualising system values associated with any fields (for example, picklist values). This means you must enter exactly the correct values when entering the desired value otherwise the experience will fail. |
For picklist and boolean operators (apart from The format of the fields used in configuring criteria will need to adhere to the SFDC API formats: |
Polymorphic fields: Polymorphic fields, e.g. Owner (User, Group), are not currently supported and won't be available as a field from Salesforce. | |
Operators: the get files action does not support the
The type of field does not filter operators. The incorrect operator with field type (e.g. less than on a string) may error the flow or cause expected results. |