POWER AUTOMATE — PROJECT 3🟡 INTERMEDIATE
Bulk Order Processing from Excel — variables, filter-before-loop, Switch branching, and Compose-driven debugging.
Bulk Order Processing — nightly run
Recurrence — nightly 2:00 AM (Asia/Kolkata)
𝑥
Initialize variable: varProcessedCount = 0
Filter array — Status = 'New'
reduces 340 rows → 42 rows before looping
Switch: OrderType
Standard
28 orders
Express
12 orders
Default
2 flagged
🔁
Apply to each — Compose line item
{ "orderId": "ORD-4821", "customer": "Aster Mfg", "amount": 18500, "flag": "none" }
Do until — batch update Excel rows
exit: count ≥ 42 OR 20 iterations (hard cap)

Sample rows after Filter array

OrderTypeStatus
ORD-4821StandardNew
ORD-4822ExpressNew
ORD-4809StandardProcessed (excluded)

Why filter-before-loop matters here

340 total rows → filtered to 42 before the loop starts. Looping over all 340 and checking status inside each iteration would run 8x more actions for the same result.
What this shows: the dataset is reduced with Filter array before any loop runs, Switch cleanly separates three order types instead of nested Conditions, Compose makes each iteration's shaped data visible in run history, and the Do-until batch update is capped by both a count condition and a hard iteration limit.