1 Top tip! Make your compose actions self documenting in Power Automate Microsoft Office 365 ComposeLeadimage

1 Top tip! Make your compose actions self documenting in Power Automate

Very often I hear flow people telling others that we should use Compose actions instead of variables. But when you reference a compose action it just shows “Outputs”.

The Compose action

The compose action is one of those actions that doesn’t do much while it is one of the most useful actions in Power Automate.

When you want to structure data or use data you can put it in a compose action and then use it at a later stage in your flow.

A while back I looked at some alternatives in my post Compose or Variables or neither

But …

compose actions showing outputs

Both purple actions in the above flow are compose actions. The first action is called Important data, while the second action is using this data. When you look at this flow in 6 months time can you still remember what that second action is doing?

1 Top tip! Make your compose actions self documenting in Power Automate Microsoft Office 365 Tooltip showing the

Yes, you could hover over the Outputs and a tool tip will show you that Important data is referenced. But this is not ideal if you want to understand a flow with many actions in it.

How can we make the compose references self documenting?

Alternative way of referencing compose actions.

To make the Compose action self documenting we will first need to have a look at the first compose action.

How about structuring our data a bit more. So that a json object is created by the compose. remember whatever we put into this compose is what we will see in the output.

1 Top tip! Make your compose actions self documenting in Power Automate Microsoft Office 365 Compose action showing data name

Now we can reference in the second Compose the More Important Data in the first Compose action using the following expression:

outputs('More_Important_Data')?['More Important Data']

When you initially edit the flow you will still see the outputs expression, but when you reload the flow all the magic will have happened.

compose actions self documenting in Power Automate

Now we can see which compose is being referenced. ok, there is one small downside as you might have to type the expressions and yes you could use the parse json action if you wanted to avoid the typing, but once you get used to the syntax it isn’t that much of a problem that you can’t use the Dynamic Content.

Multiple settings in one Compose

You could if you wanted to even put multiple properties in one compose so that you can avoid multiple boxes. This avoids having many variables/compose actions at the beginning of your flow cluttering the flow.

2 thoughts on “1 Top tip! Make your compose actions self documenting in Power Automate

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: