The parallel task order problem is solvable with a tracking column approach. You're right that multiple "when item modified" triggers will fire independently causing duplicate emails.
The fix: add a Status column to your Tasks list (e.g. Pending, In Progress, Complete, Rejected). The flow logic becomes:
Flow 1 - Task created trigger:
- Filter: TaskOrder = 1 AND Status = Pending
- Set Status = In Progress, send email
Flow 2 - Task modified trigger (when Status changes to Complete or Rejected):
- Trigger condition: Status eq 'Complete' or Status eq 'Rejected'
- Get all tasks for the same ActionID where TaskOrder = current TaskOrder + 1... wait
For the parallel scenario (multiple tasks with same order number), the challenge is knowing when ALL tasks at order level N are done before firing level N+1. You need a check, not just a trigger.
Inside Flow 2, after a task completes:
1. Get all tasks for the same ActionID with the same TaskOrder as the completed task
2. Check if ALL of them have Status = Complete or Rejected using a condition: length(filter(tasks, status ne 'Complete' and status ne 'Rejected')) = 0
3. Only if all are done, get tasks for the next TaskOrder and set them to In Progress + send emails
The key expression to check if all parallel tasks are done:
length(body('Get_parallel_tasks')?['value']) = 0
where Get_parallel_tasks filters for same ActionID, same TaskOrder, Status not in (Complete, Rejected).
This prevents double-firing because only the last task to complete in a parallel group will pass the "all done" check.
Best regards,
Valantis
✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.
❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).
🏷️ For follow-ups @Valantis.
📝 https://valantisond365.com/