Lets discuss ‘compose’ component under Data Operation in Power Automate. The official doc describe it as “Use the Data Operation – Compose action to save yourself from having to enter the same data multiple times as you’re designing a cloud flow. “
So basically you can store the input here something like this:
The main question that arises is why to use Compose when we have “Initialize Variable” component allready there. Here is how Initilize variable work:
The main differencei s ‘Performance’. So while variable can be setup multiple times, the Compose is more like a constant which can only be initialized once. This give a performace boost when using Compose compared to variable.
Just a run over a big array and doing same operation shows the differnece in the performance.
So if you are intializing a value just once and dont wish to modify it later – use compose. Use variable only when data modification is needed.