Platform Events
All Event Types

Content Version Created

Overview

The Content Version Created Event is published when a Create Salesforce File flow action action successfully creates a Salesforce File (Content Document) from an external storage file. The content-version-created event type can be used to filter this event. The corresponding Get Event Details flow action returns the Content Version Created sub-type with useful information including External Storage File, Created Salesforce File and other.

This event is particularly useful in scenarios where the creation of Salesforce Files needs to initiate downstream processes or workflows.

How To Use This Event ?

To use CloudFiles Platform Events, you must first setup your platform event triggered flow as shown in the CloudFiles Event Handler Flow Template. This article will introduce you to the concepts of the event type in the CloudFiles Event Object as well as event details that are returned by the Get Event Details flow action.

Once you are familiar with these, you will understand how to interpret & use these as illustrated in the sections below.

Document image


Event Type For Decision Filter

Please use content-version-created as the type filter when selecting this event in the decision element in flow builder.

Output Fields From Get Event Details

The corresponding Get Event Details flow action returns the Content Version Created sub-type with useful information including the created Salesforce File's ContentVersionId, corresponding External Storage File's metadata details, File Name and ParentId (i.e. recordId input in the corresponding Create Salesforce File action). Refer to the image below for a list of outputs and descriptions of the parameters returned in this sub-type.

Document image

  1. File - A lookup Field of type Resource ( cldfs_Resource )which shall contain the external storage file's metadata details.
    1. driveId - The external storage drive ID of the file.
    2. id- The unique resource ID of the file in external storage.
    3. library- The External Storage Library (Ex sharepoint)
    4. name- The Name of the File
    5. path- The Storage Location Path of the File (Null if the storage is Google Drive)
    6. type- Always file
  2. ContentVersionId - The RecordId of the created Salesforce File's Content Version
  3. FileName - The created Salesforce File's Name
  4. ParentId - The Text string input in the corresponding Create Salesforce File action. (e.g., the Record ID or any other identifier provided during the action).