Workflow Rules, Process Builder, and Flows All Running on the Same Object
“Three automation tools on one object means nobody knows what's happening.”
What Happened
Took over an org where Accounts had: 4 Workflow Rules, 2 Process Builders, 3 Record-Triggered Flows, and 2 Apex triggers. When a user updated an Account, all of them fired. In a specific order that nobody documented. A Workflow Rule set a field that a Process Builder checked. The Process Builder set a field that a Flow used. The Flow called an Apex action that the trigger also handled. Duplicate emails. Conflicting field updates. One user update spawned 47 SOQL queries.
The Wrong Way
Object: Account has ALL of these active: Workflow Rule: "Set Priority on Save" → Field Update: Priority__c Workflow Rule: "Email on High Value" → Email Alert if Amount > 100k Process Builder: "Account Automation" → Updates Region__c, sends Chatter post Process Builder: "Legacy Integration" → Calls Apex action for sync Flow: "Account After Save" → Updates related Contacts Flow: "Account Notifications" → Sends custom notifications Trigger: AccountTrigger → Validates data, creates Tasks // Execution order: Before triggers → Validation → After triggers // → Workflow Rules → Process Builders → Flows // Good luck debugging.
The Right Way
// Consolidate EVERYTHING into ONE automation type per object:
// 1. One Apex Trigger per object with handler pattern
trigger AccountTrigger on Account (before insert, before update, after insert, after update) {
AccountTriggerHandler.run(Trigger.operationType, Trigger.new, Trigger.oldMap);
}
// 2. OR one Record-Triggered Flow per object per timing
// (Before Save Flow + After Save Flow)
// 3. Document it in a single place:
// Flow: Account - Before Save (validation, field defaults)
// Flow: Account - After Save (related record updates, notifications)
// 4. Deactivate all legacy Workflow Rules and Process Builders
// 5. Migrate their logic into the consolidated Flow or Trigger
// Migration checklist:
// □ Inventory all automations on the object
// □ Map execution order and dependencies
// □ Consolidate into single trigger or flow pair
// □ Test with bulk data (200 records)
// □ Deactivate old automations (don't delete until verified)The Lesson
One automation tool per object. Pick Flows or Apex triggers, not both. Never layer Workflow Rules, Process Builder, and Flows on the same object. Consolidate or suffer.
Enjoyed this? Get more like it.
Glen's Musings — AI, investing, and building things. Occasional. Free.
More Admin Mistakes
Validation Rules That Block Your Own Automations
Your validation rule doesn't care if a Flow or trigger made the change.
Read moreCareer-EndingCreating an Infinite Loop with Record-Triggered Flows
Flow updates record. Update triggers Flow. Flow updates record. Repeat until Salesforce gives up.
Read moreAnnoyingManaging Access with Profiles Instead of Permission Sets
Profiles are for login settings. Permission Sets are for everything else.
Read more