Events
Capturing SharePoint Events
Resource Updated in SharePoint
overview cloudfiles supports a webhook that allows you to trigger a resource updated event in salesforce whenever metadata or properties of a file are changed directly in a connected sharepoint library this is useful when you want salesforce automations to respond to file updates made in sharepoint (for example, when a column like “tags” is updated), not just when actions are taken via the cloudfiles lightning component setting up the power automate flow the flow will consist of 3 main steps and looks like the following step 1 – trigger on file modification start with the “when a file is created or modified (properties only)” sharepoint trigger configure this trigger to monitor the specific site address and document library where file metadata changes will happen you can also add a specific parent folder under which changes need to be monitored in the advanced parameters step 2 – retrieve file properties add the “get file properties” sharepoint action set the site address and library name to the same site and library used in the trigger in previous step in the id field, pass the id value from the trigger step this action fetches the metadata you will need later you can use the lightning icon that appears on the id field to fetch data from the previous step and search for "id" step 3 – send updated details to cloudfiles webhook add an http action and configure it to send the collected file details to the cloudfiles webhook endpoint set the method to post , and in the uri field, paste the production webhook url for sharepoint ( https //api cloudfiles io/webhooks/library event?library=sharepoint ) in the headers , include a x webhook secret key with the secret value you retrieved from salesforce you can go to cloudfiles app > settings > api keys and copy the "webhook secret key" to retrieve this key in the body , send a json payload containing the event name ("resource updated") the drive id from the “get file properties” output the drive item id from the same output the full path of the file the list of updated fields (as a list of strings) you can use the lightning icon to fetch the parameters directly or alternatively use the following json function it is optional to send the names of actual columns that are being changed in the updatedfields array it is recommended that the follow up salesforce flow that gets triggered on this event can use the get resource property flow action to retrieve the metadata value of the specific column being monitored in case you still wish to send a specific list of columns, you can add that as a list of strings e g "updatedfields" \["tags", "status"] testing the flow after the flow is saved and enabled modify metadata (for example, update the “tags” field) on a file in the monitored sharepoint document library in power automate, check the flow’s run history confirm that the trigger fired, properties were retrieved, and the http request succeeded in salesforce, look for a new resource updated event you can check the list of most recent resource updated cloudfiles events recorded in salesforce with the help of the following soql query if the event isn’t recorded, double check the posted file details (drive id, item id, full path) and ensure the user connected in power automate has access to the file once you confirm that the event is getting successfully recorded in salesforce, you can intercept that event and build automations on top of it