How to Trigger a Record-Triggered Flow When a File is Uploaded in Salesforce
Salesforce now supports record-triggered flows on ContentDocument and ContentVersion objects, allowing easy no-code automation for file uploads and updates. This solves the longstanding limitation where flows couldn’t react to file events without Apex. With this new capability, admins and developers can create automations like blocking file deletions or sharing uploaded files across related records using standard flow features and async paths. It opens simpler, declarative options for file-related validation and automation previously requiring custom code.
- Build record-triggered flows on ContentDocument and ContentVersion objects for file events.
- Use before-save flows with Custom Error elements to block file deletion by criteria.
- Leverage async path in flows to handle timing issues with ContentDocumentLink creation.
- Create ContentDocumentLink records in flow to share files with related records like Account.
- Current limitation: cannot trigger flows on ContentDocumentLink when files are shared.
Record-triggered flow is one of the most common and powerful flow types in Salesforce. However, it has certain limitations. One major limitation was not being able to select ContentDocument or other file objects as the starting object. In other words, you couldn't trigger a record-triggered flow when a file was uploaded in Salesforce. In Winter '26 release, Salesforce introduced a new feature to use Automation Event-Triggered Flow to address this gap. However, it had many limitations and didn't work with custom objects. Here is the good news: In the Spring '26 release , Salesforce has finally made it possible to trigger a record-triggered flow when a file is uploaded. You can now build record-triggered flows on ContentDocument and ContentVersion objects. Build Record-Triggered Flows on Content Document and Content Version Objects This update is a big deal for file automation in Salesforce. Until now, you usually needed an Apex trigger and class to react to file uploads or deletions.