Emailing Files and Attachments in Flow
You can install Send Rich Email and use it to send attachments. Here’s some useful information.
Suppose you have a records with 3 attached files, like this case:
Flow retrieves information about these attachments by doing a Get Records on the Content Document Link record:
The collection of Content Document Link Ids can be passed straight on to Send Rich Email, using the ContentDocumentAttachments input attribute, and the files will be sent as attachments with the email:
In the future, the Send Rich Email action will likely be extended to enable files stored in Salesforce as Static Resources or in the older Attachments format to be directly emailed as well. Leave a comment if you need that functionality.
If you need more information about the attachments, such as Description, FileType, or Title, do a Get Records for the Content Document that’s related to your Content Document Link (see below for more information on how Content Documents and Content Document Links interact).
Files and the Content Family of Entities
However, Salesforce has replaced the Attachment paradigm with a more flexible and modern mechanism that allows for multiple versions of a document to exist. This mechanism involves three different types of entity:
- Content Document represents the file in the abstract. But “real” versions of this document are distinct and have different version numbers, so there’s also a…
- Content Version represents a specific version of the Content Document. A Content Document can have multiple Content Versions
- Content Document Link is used to connect a Content Document to a record.