Data migration · Flows

Your record-triggered Flows are great at their day job. During a data load, they also stamp today’s date on 2014 records and fire off emails nobody asked for. Here is how to let the migration user skip them while everyone else keeps the automation.

4 stepsCustom Permission, Permission Set, assign it, edit the Flow
1 conditionadded to the Flow’s entry criteria
Flow stays onEveryone except the migration user still triggers it
3‑minute videoThe whole setup, start to finish
On this page
  1. The problem
  2. 1 · Custom Permission
  3. 2 · Permission Set
  4. 3 · Assign the user
  5. 4 · Edit the Flow
  6. Test, then load
  7. Gotchas and FAQ
Watch on YouTube ↗
The problem

Your Flow is doing its job. That’s the problem.

Record-triggered Flows that are useful every day can do the wrong thing to hundreds of thousands of migrated records in an afternoon.

The example from the video: an active Flow fires when a record’s Status changes to Active, and sets Client Start Date to today. Lovely for a new client signed this morning. Less lovely for a client who became Active in 2014 and is being migrated today, because now their start date says 2026.

You could deactivate the Flow for the load. But then it’s off for everyone, and you have to remember to turn it back on. The cleaner option is a bypass: the Flow stays active, and it skips one user, the one doing the migration.

Prefer to read? Everything in the video is written out below.

Step 1

Create a Custom Permission.

This is the flag the Flow will check to decide whether the running user gets a pass.

  1. In Setup, search for Custom Permissions and click New.
  2. Name it Bypass Flows. The API name becomes Bypass_Flows.
  3. Save.

Already set up a validation rule bypass? Keep the two permissions separate. Sometimes you want the rules on and the automation off, or the other way round.

Step 2

Put it in a Permission Set.

A Permission Set lets you give the bypass to one person and take it away again later, without touching profiles.

  1. In Setup, open Permission Sets and click New.
  2. Call it Bypass Flows. No license type is needed.
  3. Open Custom Permissions inside the set, click Edit, add Bypass Flows and save.
Step 3

Assign it to the migration user.

Whoever logs into Data Loader for the load gets the Permission Set. Nobody else does.

From the Bypass Flows Permission Set, click Manage Assignments → Add Assignment, pick the migration user and click Assign. A dedicated migration user makes this cleaner, and makes it obvious later which records came in with automation bypassed.

Step 4

Teach the Flow to check the permission.

Add one condition to the Flow’s entry criteria so it only runs for users who do not hold Bypass Flows.

Open the Flow, click the Start element, and keep your existing condition. Then make the entry criteria require that the running user doesn’t have the permission. With a formula, it looks like this (the video’s example triggers on Status = Active):

AND(
  ISPICKVAL( {!$Record.Status__c}, "Active" ),
  NOT( {!$Permission.Bypass_Flows} )
)

Swap Status__c for your own field. The important line is the last one. When the running user holds Bypass Flows, the whole AND() is false and the Flow never starts. Everyone else triggers it exactly as before.

Don’t break the original condition. The bypass is added to the logic. It must not change when the Flow normally runs. Save as a new version, and the Flow stays active the whole time.

Before the load

Test both users, then load.

Two quick tests tell you the bypass works and that you didn’t break the Flow for everyone else.

  1. 1

    As a normal user

    Change a test record to Active. Client Start Date should still fill in. The Flow is fine.

  2. 2

    As the migration user

    Do the same. Client Start Date should stay as it was. The bypass works.

  3. 3

    After the migration

    Remove the Permission Set assignment, and review the imported records for anything the Flow would normally have filled in. Bypassing the Flow doesn’t make the data right on its own.

Gotchas

The questions people ask.

Can I bypass a Flow without deactivating it?
Yes. That’s the whole point. The Flow stays active, and only users with the Bypass Flows permission skip it.
Does this affect other users?
No. The check is per user. Without the permission, the Flow runs normally.
I set it all up, but the Flow still runs during my load
Check that the Permission Set is assigned to the exact user Data Loader is logged in as, and that the condition references $Permission.Bypass_Flows with the right API name.
Can I bypass a lot of Flows at once?
You can add the same check to each Flow. If you would rather switch a batch of automation off for the load window, here is how to mass deactivate Flows and validation rules.
What do I do after the migration?
Remove the Permission Set from the migration user. The Flow then runs for them again, and nothing else needs changing.
Data Migration Masterclass

Automation is one piece of the load plan.

The Masterclass covers the whole migration in load order, including when to bypass, when to deactivate and what to clean up afterwards.

Know someone whose Flows keep firing during a data load?

Share on LinkedIn
Doing this for a whole org, not just one object?

One CSV is a tutorial. Forty objects, 15 years of history and a go-live date is a project. That’s the part I do for a living.

See how I run migrations →