Skip to content
TipsPower Automate

Power Automate

Scope() Trick for Better Flow Performance

Wrap parallel actions in a Scope to run them concurrently and reduce your flow execution time by up to 80%.

The Problem

By default, Power Automate runs actions sequentially. If you have three independent API calls that each take 2 seconds, your flow takes 6 seconds. But these calls do not depend on each other: they could run at the same time.

Bad Approach: Sequential Actions

Code
Step 1: Get Customer Details      (2s)
Step 2: Get Order History         (2s)
Step 3: Get Payment Status        (2s)
────────────────────────────────────
Total:                            6s

Each action waits for the previous one to finish, even though none of them use the other's output.

Good Approach: Parallel Scope

Wrap independent actions inside a Scope action. Actions inside a Scope run in parallel by default.

Code
Scope: "Load All Data"
  ├── Get Customer Details        (2s) ──┐
  ├── Get Order History           (2s) ──┤ All run at once
  └── Get Payment Status          (2s) ──┘
────────────────────────────────────
Total:                            ~2s

The flow continues to the next step only after all actions inside the Scope have completed.

Error Handling with runAfter

If one action in the Scope fails, the entire Scope fails by default. Use Configure run after on a follow-up action to handle errors gracefully:

Code
// Action after the Scope -- runs on failure too
"runAfter": {
  "Scope_Load_All_Data": [
    "Succeeded",
    "Failed"
  ]
}

Then check individual results:

Code
if(equals(result('Get_Customer_Details')?[0]?['status'], 'Succeeded'),
   'OK',
   'Customer fetch failed'
)

Key Takeaway

Group independent actions in a Scope for automatic parallelism. Three actions at 2 seconds each go from 6 seconds to 2 seconds, a 66% reduction with zero extra cost.