How to Trigger a Flow When a File Is Uploaded in Salesforce : Yumi Ibrahimzade
by: Yumi Ibrahimzade
blow post content copied from Salesforce Time
click here to view original post
**Summary of the Content:** Salesforce has introduced a significant update in its Winter '26 release, allowing users to trigger flows when files are uploaded. Previously, record-triggered flows could not initiate actions based on file uploads due to limitations, forcing users to rely on Apex code for such automations. Now, through the new Automation Event-Triggered Flow feature, users can create flows that activate upon file uploads without writing any code. Key details include: - Users can check for the new Automation Event-Triggered Flow and the "File Attach" option in their Salesforce environment. - Salesforce provides different "File Attach" events for each object, so users can trigger flows specific to the object related to the file upload (e.g., Task, Account). - Users can set filters to specify conditions for when the flow should be triggered, based on file names or types. - The flow can utilize a global variable, {!$Event}, which contains information about the uploaded file and its associated record, allowing for actions like updating records based on the uploaded file. This enhancement greatly simplifies file management automations in Salesforce. **Relevant Context:** This change alleviates a common challenge faced by Salesforce users who frequently handle files, making it easier to automate responses to file uploads without needing specialized coding knowledge. **SEO Hashtags:** #Salesforce #FlowAutomation #FileManagement #Winter26Release #Apex #AutomationEvent #SalesforceTips #ContentDocument #FileUploadAutomation #CRM
Record-triggered flow is one of the most common and powerful flow type in Salesforce. However, record-triggered flows come with certain limitations. One major limitation has always been that you couldn’t select ContentDocument or any file related object as the starting object. In other words, it wasn’t possible to trigger a flow when a file was uploaded in Salesforce.
This gap has long been a pain point for many Salesforce environments. The only workaround was to use Apex code, which meant involving developers even for simple automations related to file uploads.
Fortunately, with the Winter '26 release, Salesforce has finally addressed this limitation. A brand new feature now allows you to use an Automation Event-Triggered Flow that fires when someone uploads a file. This opens the door for declarative automations around file management, and no Apex required.
The New Option to Trigger a Flow When a File is Uploaded in Salesforce
It’s still not possible to select ContentDocument or any other file-related object as the starting object in a Record-Triggered Flow. However, with the Automation Event-Triggered Flow, you can now trigger a flow when a file is uploaded in Salesforce.
First, check if the Automation Event-Triggered Flow type is available in your org. Then check whether you can see File Attach under the event library. If you don’t see either of these options, open a case with Salesforce Support. They will enable them for your org.

As you can see in the screenshot, there are 603 "File Attach" events available in this environment. This is because Salesforce creates a separate File Attach event for each object. It allows you to trigger automations specifically when a user uploads file to that particular object.
Select the File Attach event that matches your use case. For example, choose "File Attach to Task" if you want the flow to trigger whenever a user uploads a file to a Task record.

After selecting the event, you can define filters to control when the flow should start. For example, if you want the flow to trigger only when a file with a specific name or file type is uploaded, set conditions using the Name and File Extension parameters.

The Automation Event-Triggered Flow includes a global variable called {!$Event}, which stores information about the uploaded file and its related record.

For example, if you selected the "File Attach to Task" event, the {!$Event} global variable contains details from both the ContentDocument record and the related Task record.

For instance, if you want to update the related Task record, simply add an Update Records element and use the {!$Event} global variable to set the field values. In this example, we’re marking a checkbox field and updating the Task Description with the title of the uploaded file.

At the end, the flow will work like this:

The post How to Trigger a Flow When a File Is Uploaded in Salesforce appeared first on Salesforce Time.
October 28, 2025 at 04:34PM
Click here for more details...
=============================
The original post is available in Salesforce Time by Yumi Ibrahimzade
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================

Post a Comment