When it fires
Fires for folders created via the widget, flow actions, Apex, the REST API, or storage-side sync. Source surface is in origin.
Payload
| Field | Type | Description |
|---|---|---|
resourceId | string | The new folder’s CloudFiles ID. |
library | string | Library the folder was created in. |
recordId | string | Linked CRM record, if any. |
origin | string | widget · flow · apex · api · sync |
occurredAt | datetime | UTC timestamp. |
Consuming the event
In Salesforce, subscribe via Platform Events or the CloudFiles Event custom object (Intercepting CloudFiles Events). In HubSpot, use workflow triggers. Over HTTP, register a webhook.
trigger OnCloudFilesEvent on cloudfiles__Event__e (after insert) { for (cloudfiles__Event__e e : Trigger.new) { if (e.cloudfiles__Type__c == 'folder.created') { // notify, stamp the record, etc. } } }
