FAQs
Configuration & Administration
How to get event details for a file uploaded in SharePoint
overview cloudfiles supports a webhook that allows you to trigger file uploaded event in salesforce whenever a file is uploaded to a connected sharepoint library this is useful when you want salesforce automations to trigger instantly to new documents which are uploaded directly to sharepoint (and not via the cloudfiles lwc on a record page) setting up the power automate flow the flow will consist of 3 main steps and looks like the following step 1 trigger on file creation start with the “when a file is created (properties only)” sharepoint trigger configure this to watch the specific site and document library where new files will be uploaded this step ensures the flow starts running the moment a file is added to that location step 2 – retrieve file properties next, add the “get file properties” sharepoint action in the site address and library name , select the same site and document library you are monitoring in the 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 file details to the 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 ("file uploaded") the drive id from the “get file properties” output the drive item id from the same output the full path of the file you can use the lightning icon to fetch the parameters directly or alternatively use the following json function this ensures cloudfiles knows exactly which file in sharepoint triggered the event and can process it accordingly inside salesforce testing the flow after saving and enabling the flow, upload a file to the configured sharepoint library in power automate, check the run history to confirm that all steps completed successfully then, verify in salesforce that the file uploaded event was triggered you can check the list of most recent file uploaded 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