Using Logic App output to display relevant information in the Logic App run detail

David GROSPELIER
Published by David GROSPELIER
Category : Azure
22/02/2018

There are a lot of use cases where we need to deep dive into Logic Apps runs to understand what happened and to determine the context of the execution.
The content of the execution is, for example, the reference of an order received from a customer, the id of an employee, …
When you dive into a Logic App run, you can look into the details of the inputs/outputs of each action and connector and you can find the information you are looking for. But you can spend a lot of time doing that.

There is a very simple way to display relevant information for each run of a Logic App thanks by using the « output » of the run.

Sample Logic App

In order to illustrate the usage of the output feature, I use a very simple Logic App shown below:

 

The Logic App is triggered by an HTTP request with two fields: the OrderId and the CustomerReference.
We will add the two fields into the output of the Logic App run later on.

The Logic App responds with a Status code 200 and in the body, it gives the date of the creation of the order (UTC current time).

How to add the output

In order to display the OrderId and the CustomerReference in the detail of each Logic App run, you need to go into the Code View of the Logic App and locate the output section. In this output section, we can add the two properties we want to display as shown below:

 

Test and display the output content

To test the Logic App, I use PostMan to call the Logic App.

When I look into the Run details, I can see my two output properties:

That’s it!