How to use parameter or variable or output of compose action as tracked properties in Azure Logic App?

645 Views Asked by At

How can we use parameter or variable or output of compose as Tracked properties?

We need to use a value from HTTP request payload as tracked properties. We are able to fetch required value using Xpath. We are not able to use it as tracked properties. We are thinking to use either parameter or variable or output of compose. So, How can we use parameter or variable or output of compose as Tracked properties?

1

There are 1 best solutions below

2
SwethaKandikonda On

For demonstration purposes I have used below xml as my HTTP body.

<?xml version="1.0"?>
<produce>
  <item>
    <name>Gala</name>
    <type>apple</type>
    <count>20</count>
  </item>

Below is the flow of my Logic app.

enter image description here

The tracked property expression that worked for me is as below.

"@base64ToString(xpath(xml(triggerBody()),'/produce/item/name')[0]['$content'])"

enter image description here

Tracked property that I'm receiving in my log analytics workspace.

enter image description here