Using the Common Data Service (Current Environment) connector you can create Power Automate flows that get triggered by an event on a CDS entity. When you create the flow you choose a condition or set of conditions that trigger the flow.
Sometimes you need to vary what the flow does based on the CDS trigger that started the flow. There is no obvious way to test which condition triggered the flow. Because of this, I have seen situations on projects where there are lots near-identical flows for create and update. This can obviously lead to maintenance issues. You can however create an expression to examine the SdkMessage attribute in the trigger body of the flow. The SdkMessage contains the name of the event that triggered the flow.
You can use the expression in a number of ways such as testing its value as part of a switch or condition control.
You can use SdkMessage in an expression to conditionally set the value of a field based on it’s value e.g. if(equals(triggerBody()?[‘SdkMessage’],’Update’), ‘Updated’, ‘Created’)
If you are testing the value of SdkMessage a number of times in your flow you might be better to create a variable at the start of your flow and use this instead. This will make your flow more readable.