Platform Events
All Event Types

File Uploaded Event

Overview

This event is published when a file is uploaded through the CloudFiles widget on a record page in Salesforce. The file-uploaded event type can be used to filter this event. The corresponding Get Event Details flow action returns the Uploaded File Details sub-type with useful information including file name, drive id, record id etc for further use.

This event should not be confused with Salesforce File Attached Event which is published when a file is uploaded to Salesforce native storage, through "Files" or "Notes & Attachments" section.

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 file-uploaded 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 Uploaded File Details sub-type with useful information including file name, drive id, record id etc for further use. Refer to the image below for a list of outputs and descriptions of the parameters returned in this sub-type.

Document image

  1. Id - External Id of the file
  2. DriveId - Id of the drive in case of SharePoint or Google Drive storage
  3. Library - One of sharepoint, google, onedrive, box, dropbox, cloudfiles
  4. RecordId - Id of the Salesforce record where the file is uploaded
  5. Name - Name of the uploaded file

Use Cases

  1. If the uploaded file name contains the word "Proposal" in it, update the opportunity stage to "Value proposition"
  2. When a file is uploaded through CloudFiles widget, update the count of uploads in a property
  3. When a resume is uploaded, use document AI to extract student info and auto-generate an interview scoring sheet using templates created in google docs.