Detecting Create vs Update Triggers in Dataverse Power Automate Flows
The Dataverse connector's "When a row is added, modified or deleted" trigger fires for multiple operation types. When your flow needs different logic for creates versus updates, here is how to detect which one fired.
The Modern Approach (2026)
The current Dataverse connector provides the trigger type directly in the trigger outputs. Use this expression:
@triggerOutputs()?['body/SdkMessage']
This returns one of:
Create— a new row was addedUpdate— an existing row was modifiedDelete— a row was removed
Implementing Conditional Logic
Add a Switch action right after the trigger:
Switch on: @triggerOutputs()?['body/SdkMessage']
Case: Create
- Set default field values
- Send welcome notifications
- Create related records
Case: Update
- Compare old and new values
- Trigger approval workflows
- Sync changes to external systems
Case: Delete
- Archive the record
- Clean up related data
- Send deletion notifications
Comparing Old and New Values on Update
For updates, you often want to know what actually changed. Unlike a Dataverse plug-in, the Power Automate trigger does not give you pre-operation values — there is no _previousValue_* property on the trigger body, and this is a long-standing gap that the community has open ideas requesting.
Three patterns that work today:
- Maintain a "last known value" column. When you care about transitions on a specific field (e.g.,
statuscode), keep a shadow column you write to on every change, and read from on the next run. - Use Dataverse audit history. If auditing is on for the table, your flow can call
RetrieveRecordChangeHistoryto fetch the previous value as part of the run. Heavier than a column compare, but no schema changes. - Move the comparison server-side. A real-time Dataverse plug-in registered on
PreUpdatehas the previous values in its plug-in execution context. Use a plug-in to detect the transition and a flow to react.
Whichever path you pick, do not reach for a property on the trigger body that does not exist.
Filtering Triggers
Instead of detecting the type in-flow, you can filter at the trigger level:
- In the trigger configuration, set Change type to only the operations you care about
- Use Filter rows to further narrow which records fire the flow
- Use Select columns to limit the payload and improve performance
This reduces unnecessary flow runs and keeps your run history clean.
Common Pattern: Single Trigger, Shared Logic
For flows where create and update share most logic but differ in a few steps:
- Run shared validation and data enrichment first
- Use a Condition to branch only where behavior differs
- Converge back to shared post-processing
This avoids maintaining two nearly identical flows for create and update scenarios.
Key Takeaway
Use triggerOutputs()?['body/SdkMessage'] to detect the operation type. Filter at the trigger level when possible to reduce unnecessary runs. And remember: the trigger does not expose pre-update values — keep that comparison server-side or use a shadow column rather than chasing a property that isn't there.
Keep reading
MCP Explained: How Claude Connects to Your Dataverse Data
An introduction to the Model Context Protocol and how the Dataverse MCP server lets Claude read and write business data through natural language.
Querying Dataverse from Claude: A Practical MCP Walkthrough
A hands-on example of using the Dataverse MCP server with Claude to query tables, create records, and update data in Dynamics 365 through natural language.
What's New in Dynamics 365 and Power Platform — 2026 Release Wave 1
The standout features from Microsoft's 2026 Release Wave 1 for Dynamics 365 and Power Platform, and what they mean for your projects.
Newsletter
New posts, straight to your inbox
One email per post. No spam, no tracking pixels, unsubscribe anytime.
Comments
No comments yet. Be the first.