File Uploaded
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 which is published when a file is uploaded to Salesforce native storage, through "Files" or "Notes & Attachments" section.
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.
Please use file-uploaded as the type filter when selecting this event in the decision element in flow builder
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.
- Id - External Id of the file
- DriveId - Id of the drive in case of SharePoint or Google Drive storage
- Library - One of sharepoint, google, onedrive, box, dropbox, cloudfiles
- RecordId - Id of the Salesforce record where the file is uploaded
- Name - Name of the uploaded file
- If the uploaded file name contains the word "Proposal" in it, update the opportunity stage to "Value proposition"
- When a file is uploaded through CloudFiles widget, update the count of uploads in a property
- 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.