website logo
Go To WebsiteAppexchange
Home
Salesforce
HubSpot
Web App
API Reference
Navigate through spaces
⌘K
Table Of Contents
Quick Starts
Features
Widgets
Flow Actions
Flow Templates
Platform Events
Tutorials
How to make existing Salesforce records work with CloudFiles
Copy Salesforce files to SharePoint
Apex
FAQs
Support
Docs powered by archbee 

CloudFiles Platform Event

On various actions related to files, CloudFiles publishes a Salesforce platform event named CloudFiles Event. This Event has following fields - 

  1. Type - Type of the event. For example - file-uploaded, folder-created etc.
  2. Data - Data related to the event. This fields is used internally by the Get Event Details flow action to return the event details
  3. Object Type - Salesforce record type where the event originated. Example - Account, Case etc. For event originated outside a record context, this field is null
  4. Request Id - Exists when the event is published as a result of an asynchronous action

CloudFiles Platform Event can be used to setup flows which trigger on platform events. Please follow the steps below to setup an event based flow -

  • To create a flow, select the trigger as "Platform Event"
Salesforce Platform Event based flow
Salesforce Platform Event based flow

  • Select "CloudFiles Event" from the list of events as shown below
Document image

  • Add a decision element in our flow to only run this flow for the event type we're interested in. For example - file-uploaded. Optionally, you can specify a Object Type filter to limit the flow execution for specific Salesforce record type
Document image

  • Next, we will use the flow action Get Event Details to get the data related to the event. This data can be used in further flow elements. For example, on file upload, you may want to use the file name and save it on a specific property on a Salesforce record. To do this, insert the flow action named "Get Event Details" and configure it as shown below - 
Document image


The value of "Event" fields is simply {!Record} as the flow Record variable is our platform event.

The output to this flow action can further be used in the flow. Output for each type is explained in the articles specific to each type of event.

Document image







Updated 18 May 2023
PREVIOUS
Platform Events
NEXT
Folder Created Event
Docs powered by archbee