web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Multiple stage wise Em...
Power Automate
Suggested Answer

Multiple stage wise Email and Audit log flow

(0) ShareShare
ReportReport
Posted on by 2
I am implementing a single, deterministic Power Automate workflow triggered by “When an item is created or modified” in a Power Apps–driven SharePoint solution, where Power Apps is the authoritative source for all state transitions and data mutations, and Power Automate operates strictly as an event processor for notifications and audit persistence. The flow enforces concurrency control (degree = 1), isolates logic using scopes, and avoids Get item entirely, relying instead on “Get changes for an item or file (properties only)” with trigger window semantics to detect state transitions and field-level deltas. A critical requirement is conditional audit logging: audit records must be generated only when an item has previously been returned for amendment and is subsequently modified and resubmitted, and only for a defined subset of business fields; initial creation, standard forward routing, reviewer actions, and status changes must be excluded. The audit gate is implemented by evaluating the previous state value and confirming a forward transition from a returned condition, followed by explicit column-level change detection using HasColumnChanged flags to generate one audit record per modified field. During implementation, the platform repeatedly auto-injects Apply to each when binding ID or trigger window values into the Get changes action, despite the flow being strictly single-item driven, and earlier iterations exhibited duplicate notifications and ID resolution issues when Get item was used. These have been partially mitigated by using trigger output expressions directly and emitting notifications only on state transitions, but I am seeking confirmation that this architecture represents the correct, platform-aligned approach for building a production-grade, single-flow, state-driven workflow with deterministic execution and conditional auditing, and whether there are any recommended refinements to avoid implicit array handling and loop injection in this pattern.
Categories:
I have the same question (0)
  • S-Venkadesh Profile Picture
    1,208 Super User 2026 Season 1 on at
     
    Power Automate auto-injects “Apply to each” loops when Split-On is turned OFF and the trigger output is treated as an array. Ensure Split on settings is turned ON


     
    Hope this helps! If it does, please give it a 🩷 Like.
    If this solved your issue, please ✅ mark it as the solution so it can help others in the community too.
     
    Warm Regards,
    S-Venkadesh
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,191 Super User 2026 Season 1 on at
    Hi,
     
    Keep using a single flow, trigger concurrency = 1, trigger conditions for state transitions, and Get changes… with HasColumnChanged for your audit gate, that is a recommended pattern.
    The auto Apply to each appears because some trigger tokens are typed as arrays; this is cosmetic as long as the concurrency is 1 and the loop only ever processes one item.
    To reduce loop injection, prefer expressions like triggerOutputs()?['body/ID'] or triggerWindowStartToken in expressions instead of picking dynamic content directly, and avoid any actions that return collections.
    For production‑grade robustness, keep your scopes, add explicit error‑handling or logging scopes, and store config e.g., field lists, status values in environment variables or a config list to avoid hardcoding.
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 378

#2
Valantis Profile Picture

Valantis 329

#3
David_MA Profile Picture

David_MA 283 Super User 2026 Season 1

Last 30 days Overall leaderboard