Custom Blog Image

Trigger a Flow when File is uploaded to a record

Trigger a flow when File is uploaded to a record

With the Winter ’26 release, Salesforce allows you to trigger a Flow when a file is uploaded to a record. By using the Automation Event Triggered Flow type, we can initiate a flow whenever a file is attached to a record.

Earlier, it was not possible because of the limitations of Record Triggered Flows. As a ContentDocument object or anyother related file object is not available as a starting object. So that would make it impossible to trigger a flow when a file is attached to a record. The only workaround was to write Apex. But with this winter’26 release, it would be much easier to trigger a flow when a File is uploaded to a record.

Trigger a Flow when a file is uploaded to a record

To understand, let’s take a simple scenario of updating theng case record description whenever there is a file attached to it.

Step 1: Go to Setup and then Quick Find Box, search for Flow

create a flow

 

Step 2: Click on New Flow, which will open a pop-up. Search for Automation Event-Triggered Flow and select it.

trigger a flow when file is uploaded to a record,

 

This is a new type of flow which launches when an automation event is received.

Step 3: This will again open a pop-up asking about some data spaces. For now, leave it as it is and click next.

data space

 

Step 4: This will open a flow builder, where we can see that we need to select the event on which we want it to fire.

flow builder

This will be the starting point of the flow. Click on Select Event, which will open a list of available events as shown below.

 

event categoreis

 

Step 5: We will select the File Attach event, and then it will open all the file attach event types.

file attach event types

 

Step 6: For our use scenario, we are looking for when a file is attached to a case record. So we will search for “File Attach to Case”.

 

File Attach to case

 

It will then open a sidebar where we can define our filter criteria. One of the filters is for the document type. If we want to run the flow only when we upload a PNG file, we can define the condition accordingly. Similary we have other filters where we can define our filter criteria.

 

Filter criteria

 

Step 7:  Now, we also want to update the Case record where we attach the file. So to do that, we will add an update element in our flow.

Update case record

 

Here, we filter the Case ID for the record where we attach the file because we want to update that same Case record. In the resource box, click on Event, and then we have the Case object available.

resource

 

We have set the Description to the Title of the Document. To do that, we have taken Event resources, and from that Triggered Content Document object will be available.

Now we can save and activate the flow. To check this, we create a Case record and upload a document. As soon as we upload the file, the Description field updates.

output

Also Read – Top Flow Features in Salesforce Spring ’26 Release

FAQs

1. Is this feature available in all Salesforce editions?

This feature is available in Professional, Unlimited, and Performance Enterprise.

2. What Is an Automation Event-Triggered Flow?

An Automation Event-Triggered Flow launches when a specific automation event occurs. One such event introduced in Winter ’26 is the File Attach event.

3. Can we update the record to which the file is attached?

Yes, we can update the same record on which file is attached as demonstrated in the scenario. We have Event resources available, which store the Salesforce object information on which the file is attached.

Conclusion

The Winter ’26 release makes it easy to trigger a Flow when a file is uploaded in Salesforce by introducing Automation Event-Triggered Flows with the File Attach event. Basically, this eliminates the need for Apex by enabling a declarative approach.

Previously, we had limited options because file objects were not available in record-triggered flows. But Winter ’26 solves this limitation and brings file uploads directly into Salesforce Flow.

Get a complete Roadmap to Learn Salesforce Admin and Development👇

Share Now

Kashish have extensive Salesforce development experience, holding 4 Salesforce certifications. she posses expertise in Apex, Lightning Web Components, and Salesforce Admin, with a track record of successful project delivery. As a dedicated Salesforce enthusiast, she actively seek and embrace new challenges and opportunities within the dynamic Salesforce ecosystem.

Leave a Reply

Your email address will not be published. Required fields are marked *