How does Flow bulkification manage large record collections to prevent governor limit exhaustion?
Answer
Basics: Governor limits are per transaction and shared with Apex: 100 synchronous SOQL queries, 150 DML statements and 10,000 DML rows. A record-triggered flow handling a data load of 200 records must not run a query or DML per record. Flow's engine groups interviews so a Get Records or Create Records element runs once for the whole batch, but logic you place inside a Loop does not get that protection.
How it works:
- The platform bulk-processes record-triggered interviews: for a batch of 200 inserted records, each element is executed for all interviews together where possible.
- Inside the flow, collect work into a record collection variable using Assignment within the loop.
- After the loop, run one Create/Update/Delete Records on the collection.
- Use Get Records before the loop and filter in memory with Decision or Collection Filter/Sort instead of querying per iteration.
- Prefer before-save record-triggered flows for same-record field changes: they need no DML and are far faster.
Advanced / deep dive: The classic failure is Get Records or Update Records inside a Loop, or calling a subflow or invocable Apex that itself queries inside the loop; each iteration consumes SOQL/DML, hitting 100 SOQL or 150 DML errors ("Too many SOQL queries: 101"). Per-interview limits also apply: at most 2,000 executed elements per flow interview. Because flows, triggers and legacy automation share one transaction, ten record-triggered flows plus Apex on the same object add up; use Flow Trigger Explorer and Trigger Order to see the combined load. Collection operations (Collection Filter, Collection Sort, Transform) reduce loops. For large volumes, move work to Scheduled-Triggered Flows (batches of 200), asynchronous paths ("Run Asynchronously"), or Apex Batch. Invocable Apex called from flows receives a List of inputs and must be bulk-safe itself.
Code / config example: