A record-triggered flow fails during data loads with 'Too many SOQL queries'. What's wrong and how do you fix it?
Your confidence:Not rated
Model answer
Likely causes
- Get Records or Create/Update/Delete inside a loop.
- Several flows (and triggers) on the same object each querying; the transaction's limits are shared.
- Recursion: the flow updates records that re-trigger flows.
- Broad entry conditions, so the flow runs on every edit.
Fix
- Move queries out of loops: one Get Records with an IN filter, assign in the loop, one DML after the loop.
- Use Transform / Filter collection elements.
- Tighten entry conditions ("only when updated to meet the condition").
- Consolidate overlapping flows; set trigger order.
- Move heavy logic to bulk-safe invocable Apex or an async path.
- Test with 200+ records in a sandbox before releasing.
โ Key points to hit
โ Red-flag answers
- Reducing the data load batch size as the fix
- Converting everything to Apex without diagnosis
โช Follow-ups
How do you see which automation used the queries?
The debug log lists flow interviews and elements with their SOQL and DML; filter for FLOW_ELEMENT and SOQL events, or use the Apex Log Analyzer.
Does Flow bulkify automatically?
Flow batches some elements across interviews in the same transaction, but loops containing queries or DML still multiply calls. Design for bulk explicitly.