Azure Logic Apps create JSON array from separate received xml - azure

I am new to Azure and have to create JSON Array from separate XML messages received by the logic app. The logic app requests data and receives the response in XML format. I proposed an approach that is saving the message in Azure storage then through the Azure function create the JSON array. Is this approach affect the performance? Is there any idea?
Thanks in advance

There are 2 ways where you can completely rely on Logic apps without involving Azure functions
Consider this to be the sample xml
<?xml version="1.0"?>
<PurchaseOrder PurchaseOrderNumber="99503" OrderDate="1999-10-20">
<Address Type="Shipping">
<Name>Adam Murphy</Name>
<Street>123 Maple Street</Street>
<City>Mill Valley</City>
<State>CA</State>
<Zip>10999</Zip>
<Country>Ireland</Country>
</Address>
<Address Type="Billing">
<Name>Tai Yee</Name>
<Street>8 Oak Avenue</Street>
<City>Old Town</City>
<State>PA</State>
<Zip>95819</Zip>
<Country>Ireland</Country>
</Address>
<DeliveryNotes />
</PurchaseOrder>
WAY-1
You can directly convert xml to json using json(xml(triggerBody()))
Here is the logic app for your reference -
output
If you want to have a custom json, then you can create one using Parse_Json and Compose Connectors.
Here I'm just taking the output of Compose Connector to Parse_Json in order to parse the resultant Json to get the custom JSON script. Below is the Json I'm trying to create.
{
"PurchaseOrder": {
"OrderNumber": "#{body('Parse_JSON')?['PurchaseOrder']?['#PurchaseOrderNumber']}",
"PurchaseDate": "#{body('Parse_JSON')?['PurchaseOrder']?['#OrderDate']}",
"Location": [
{
"Name": "#{items('For_each')?['Name']}",
"Address": "#{items('For_each')?['Street']},#{items('For_each')?['City']},#{items('For_each')?['State']},#{items('For_each')?['Country']},#{items('For_each')?['Zip']}"
}
]
}
}
output
Here is the code view of my logic app. You can directly use this to get the exact workflow in your logic app.
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Compose": {
"inputs": "#json(xml(triggerBody()))",
"runAfter": {},
"type": "Compose"
},
"For_each": {
"actions": {
"Compose_2": {
"inputs": {
"PurchaseOrder": {
"Location": [
{
"Address": "#{items('For_each')?['Street']},#{items('For_each')?['City']},#{items('For_each')?['State']},#{items('For_each')?['Country']},#{items('For_each')?['Zip']}",
"Name": "#{items('For_each')?['Name']}"
}
],
"OrderNumber": "#{body('Parse_JSON')?['PurchaseOrder']?['#PurchaseOrderNumber']}",
"PurchaseDate": "#{body('Parse_JSON')?['PurchaseOrder']?['#OrderDate']}"
}
},
"runAfter": {},
"type": "Compose"
}
},
"foreach": "#body('Parse_JSON')?['PurchaseOrder']?['Address']",
"runAfter": {
"Parse_JSON": [
"Succeeded"
]
},
"type": "Foreach"
},
"Parse_JSON": {
"inputs": {
"content": "#outputs('Compose')",
"schema": {
"properties": {
"?xml": {
"properties": {
"##version": {
"type": "string"
}
},
"type": "object"
},
"PurchaseOrder": {
"properties": {
"##OrderDate": {
"type": "string"
},
"##PurchaseOrderNumber": {
"type": "string"
},
"Address": {
"items": {
"properties": {
"##Type": {
"type": "string"
},
"City": {
"type": "string"
},
"Country": {
"type": "string"
},
"Name": {
"type": "string"
},
"State": {
"type": "string"
},
"Street": {
"type": "string"
},
"Zip": {
"type": "string"
}
},
"required": [
"##Type",
"Name",
"Street",
"City",
"State",
"Zip",
"Country"
],
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
},
"type": "object"
}
},
"runAfter": {
"Compose": [
"Succeeded"
]
},
"type": "ParseJson"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {},
"triggers": {
"manual": {
"inputs": {
"schema": {}
},
"kind": "Http",
"type": "Request"
}
}
},
"parameters": {}
}
WAY-2
You can use liquid templates in order to convert xml to json using Transform XML to JSON Connector. For more information you can refer thread1 and thread2.
REFERENCES:
Logic App: Basic XML to JSON Expression Conversion

Related

retrieve values from an json array in azure logic app

what will be the easiest way to retrive the "HydraulicPressure" and "FailedPickupsLastHr" values from the below json in logic app?
{
"variables": [
{
"name": "sensorarray",
"type": "String",
"value": "{\"ContentData\":{\"applicationId\":\"0db2345\",\"deviceId\":\"178\",\"enqueuedTime\":\"2022-09-17T14:27:22.386Z\",\"enrichments\":{},\"messageSource\":\"properties\",\"messageType\":\"devicePropertyReportedChange\",\"properties\":[{\"name\":\"FailedPickupsLastHr\",\"value\":42},{\"name\":\"HydraulicPressure\",\"value\":30.863390107917837}],\"schema\":\"default#v1\",\"templateId\":\"dtmi:z\"},\"Properties\":{\"iotcentral-application-id\":\"05\",\"iotcentral-message-source\":\"properties\",\"iotcentral-message-type\":\"devicePropertyReportedChange\",\"iotcentral-device-id\":\"1q9hn5l4xcl\",\"x-opt-sequence-number\":5663,\"x-opt-offset\":\"5307784\",\"x-opt-enqueued-time\":\"2022-09-17T14:27:28.046Z\",\"message-id\":{\"EncodeSize\":38},\"group-sequence\":0},\"SystemProperties\":{\"EnqueuedTimeUtc\":\"2022-09-17T14:27:28.046Z\",\"Offset\":\"5307784\",\"PartitionKey\":null,\"SequenceNumber\":5663}}"
}
]
}
Load this definition as a new LogicApp into your tenant ...
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Initialize_Failed_Pickups_Last_Hr": {
"inputs": {
"variables": [
{
"name": "FailedPickupsLastHr",
"type": "integer",
"value": "#variables('Object')['ContentData']['properties'][0]['value']"
}
]
},
"runAfter": {
"Initialize_Hydraulic_Pressure": [
"Succeeded"
]
},
"type": "InitializeVariable"
},
"Initialize_Hydraulic_Pressure": {
"inputs": {
"variables": [
{
"name": "HydraulicPressure",
"type": "string",
"value": "#{variables('Object')['ContentData']['properties'][1]['value']}"
}
]
},
"runAfter": {
"Initialize_Object": [
"Succeeded"
]
},
"type": "InitializeVariable"
},
"Initialize_Object": {
"inputs": {
"variables": [
{
"name": "Object",
"type": "object",
"value": "#JSON(variables('Payload'))"
}
]
},
"runAfter": {
"Initialize_Payload": [
"Succeeded"
]
},
"type": "InitializeVariable"
},
"Initialize_Payload": {
"inputs": {
"variables": [
{
"name": "Payload",
"type": "string",
"value": "{\"ContentData\":{\"applicationId\":\"0db2345\",\"deviceId\":\"178\",\"enqueuedTime\":\"2022-09-17T14:27:22.386Z\",\"enrichments\":{},\"messageSource\":\"properties\",\"messageType\":\"devicePropertyReportedChange\",\"properties\":[{\"name\":\"FailedPickupsLastHr\",\"value\":42},{\"name\":\"HydraulicPressure\",\"value\":30.863390107917837}],\"schema\":\"default#v1\",\"templateId\":\"dtmi:z\"},\"Properties\":{\"iotcentral-application-id\":\"05\",\"iotcentral-message-source\":\"properties\",\"iotcentral-message-type\":\"devicePropertyReportedChange\",\"iotcentral-device-id\":\"1q9hn5l4xcl\",\"x-opt-sequence-number\":5663,\"x-opt-offset\":\"5307784\",\"x-opt-enqueued-time\":\"2022-09-17T14:27:28.046Z\",\"message-id\":{\"EncodeSize\":38},\"group-sequence\":0},\"SystemProperties\":{\"EnqueuedTimeUtc\":\"2022-09-17T14:27:28.046Z\",\"Offset\":\"5307784\",\"PartitionKey\":null,\"SequenceNumber\":5663}}"
}
]
},
"runAfter": {},
"type": "InitializeVariable"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"ParameterTest1": {
"defaultValue": "\"\"",
"type": "String"
}
},
"triggers": {
"manual": {
"inputs": {
"method": "GET",
"schema": {}
},
"kind": "Http",
"type": "Request"
}
}
},
"parameters": {}
}
It will give you my answer in full and show you how to get to the values you're after.
The basic steps are ...
Initialize the initial JSON you have as a string.
Then convert that string to an object using the json expression
The last two steps involve expressions to extract the values you're after.
Basically, you need to parse the string value to an object and then evaluate it.
I have reproduced in my environment, you can similarly do it for your json array as below:
Firstly, select initialize variable step and then set it with below json example :
[{
"variables":
{
"name": "sensorarray",
"type": "String"
}
}]
Then, select the SELECT step
And then select the varaible you want from array and then get it with using item as below:
Output:
Try to update your array as the given example and try the above steps you will get the output as above.

How do I parse text by line in an Azure Logic App?

I've got a Logic App that reads in an email from a form submission. Unfortunately, I only have access to the email and not where the form results are stored, so I currently have the Logic App set up to pull in the email and convert it to text.
If it was just one field, I assume I could just grab it all, throw it in a variable and split it to get what I need, but I'm not sure how to do this with multiple lines.
The emails always come in with this format:
---
Date: 08/18/2022
Time: 09:30:00
Requestor Name: Robert Bobson
Requestor Email: bob#companyname.com
Requestor Phone Number: 800-867-5309
Site Name: CompanyName
Site Number: 123456789
---
Am I able to set a line index and then grab everything on that line and then split it before assigning it to a variable? Is this going to require RegEx or is there a workaround or expression in Logic Apps that will handle this?
Thank you in advance!
You can achieve your requirement using expressions.
First, try removing the extra lines from the given email. below is the expression I'm using to achieve the same.
split(outputs('Compose'),'\n\n')
The above expression results in:
Am I able to set a line index and then grab everything on that line and then split it before assigning it to a variable?
yes, This is possible using the below expression
outputs('Compose_2')?[0] gives the Date
outputs('Compose_2')?[1] gives the Time
...
RESULTS:
Alternatively, You can convert the string into Parsable Json and then Parse it through Parse JSON Action. Below is the flow of my Logic App
In the above step I'm extracting the values on both left and right sides and storing them into a variable. You can use either of slice or substring functions to extract the values.
In the next step I'm trying to Parse the values through Parse JSON action.
RESULTS:
You can test the same using below code view in your logicapp
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Compose": {
"inputs": "Date: 08/18/2022\n\nTime: 09:30:00\n\nRequestor Name: Robert Bobson\n\nRequestor Email: bob#companyname.com\n\nRequestor Phone Number: 800-867-5309\n\nSite Name: CompanyName\n\nSite Number: 123456789",
"runAfter": {},
"type": "Compose"
},
"Compose_2": {
"inputs": "#split(outputs('Compose'),'\n\n')",
"runAfter": {
"Compose": [
"Succeeded"
]
},
"type": "Compose"
},
"Compose_3": {
"inputs": "#body('Parse_JSON')?['Site Name']",
"runAfter": {
"Parse_JSON": [
"Succeeded"
]
},
"type": "Compose"
},
"Initialize_variable": {
"inputs": {
"variables": [
{
"name": "length",
"type": "integer"
}
]
},
"runAfter": {
"Compose_2": [
"Succeeded"
]
},
"type": "InitializeVariable"
},
"Initialize_variable_2": {
"inputs": {
"variables": [
{
"name": "Json",
"type": "string"
}
]
},
"runAfter": {
"Initialize_variable": [
"Succeeded"
]
},
"type": "InitializeVariable"
},
"Parse_JSON": {
"inputs": {
"content": "#concat('{',substring(variables('Json'),0,sub(length(variables('Json')),1)),'}')",
"schema": {
"properties": {
"Date": {
"type": "string"
},
"Requestor Email": {
"type": "string"
},
"Requestor Name": {
"type": "string"
},
"Requestor Phone Number": {
"type": "string"
},
"Site Name": {
"type": "string"
},
"Site Number": {
"type": "string"
},
"Time": {
"type": "string"
}
},
"type": "object"
}
},
"runAfter": {
"Until": [
"Succeeded"
]
},
"type": "ParseJson"
},
"Until": {
"actions": {
"Append_to_string_variable": {
"inputs": {
"name": "Json",
"value": "#{outputs('Current_Object')},"
},
"runAfter": {
"Current_Object": [
"Succeeded"
]
},
"type": "AppendToStringVariable"
},
"Current_Object": {
"inputs": "\"#{substring(outputs('Compose_2')?[variables('length')],0,indexOf(outputs('Compose_2')?[variables('length')],':'))}\":\"#{slice(outputs('Compose_2')?[variables('length')],add(indexOf(outputs('Compose_2')?[variables('length')],':'),2),length(outputs('Compose_2')?[variables('length')]))}\"",
"runAfter": {},
"type": "Compose"
},
"Increment_variable": {
"inputs": {
"name": "length",
"value": 1
},
"runAfter": {
"Append_to_string_variable": [
"Succeeded"
]
},
"type": "IncrementVariable"
}
},
"expression": "#equals(variables('length'), length(outputs('Compose_2')))",
"limit": {
"count": 60,
"timeout": "PT1H"
},
"runAfter": {
"Initialize_variable_2": [
"Succeeded"
]
},
"type": "Until"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {},
"triggers": {
"manual": {
"inputs": {},
"kind": "Http",
"type": "Request"
}
}
},
"parameters": {}
}
You can Convert the email body using "Html To Text" action and then assign it to an array variable by using the split expression for any delimiter.

How do I parse Json file from azure blob storage to Azure Sql using Azure logic app

[][1]I have a multiple json files dropping in blob storage weekly, I want to use azure logic app to parse json file and copy data into Azure Sql? Please help
For achieving your requirement, Below are the flow that you can follow :-
Blob trigger (When a blob is added or modified (properties only) (V2)) >> Get blob content using path (V2) >> Parse JSON >> SQL related Action (For instance I'm using Insert row (V2)).
Below is the sample JSON that I'm uploading to my container.
{
"employees": {
"emp_name": "abc",
"hire_date": "2022-10-23",
"salary": 10000
}
}
I'm using triggers path to get the content of the blob. While Inserting the row I'm using Parse JSON values. Below is my Logic App.
Result:
UPDATED ANSWER
As per your requirement, you can either manually trigger flow using `` or set a recurrence trigger to make the flow triggered at times and then use list all files in that particular container from the storage account. Here is how the flow looks like
detailed flow
RESULTS:
code view of my logic app
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"For_each": {
"actions": {
"Get_blob_content_using_path_(V2)": {
"inputs": {
"host": {
"connection": {
"name": "#parameters('$connections')['azureblob']['connectionId']"
}
},
"method": "get",
"path": "/v2/datasets/#{encodeURIComponent(encodeURIComponent('AccountNameFromSettings'))}/GetFileContentByPath",
"queries": {
"inferContentType": true,
"path": "#items('For_each')?['Path']",
"queryParametersSingleEncoded": true
}
},
"runAfter": {},
"type": "ApiConnection"
},
"Insert_row_(V2)": {
"inputs": {
"body": {
"emp_id": "#body('Parse_JSON')?['employees']?['employee_id']",
"emp_name": "#body('Parse_JSON')?['employees']?['emp_name']",
"hire_date": "#body('Parse_JSON')?['employees']?['hire_date']",
"salary": "#body('Parse_JSON')?['employees']?['salary']"
},
"host": {
"connection": {
"name": "#parameters('$connections')['sql']['connectionId']"
}
},
"method": "post",
"path": "/v2/datasets/#{encodeURIComponent(encodeURIComponent('default'))},#{encodeURIComponent(encodeURIComponent('default'))}/tables/#{encodeURIComponent(encodeURIComponent('[dbo].[employees]'))}/items"
},
"runAfter": {
"Parse_JSON": [
"Succeeded"
]
},
"type": "ApiConnection"
},
"Parse_JSON": {
"inputs": {
"content": "#json(body('Get_blob_content_using_path_(V2)'))",
"schema": {
"properties": {
"employees": {
"properties": {
"emp_name": {
"type": "string"
},
"employee_id": {
"type": "integer"
},
"hire_date": {
"type": "string"
},
"salary": {
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
}
},
"runAfter": {
"Get_blob_content_using_path_(V2)": [
"Succeeded"
]
},
"type": "ParseJson"
}
},
"foreach": "#body('Lists_blobs_(V2)')?['value']",
"runAfter": {
"Lists_blobs_(V2)": [
"Succeeded"
]
},
"type": "Foreach"
},
"Lists_blobs_(V2)": {
"inputs": {
"host": {
"connection": {
"name": "#parameters('$connections')['azureblob']['connectionId']"
}
},
"method": "get",
"path": "/v2/datasets/#{encodeURIComponent(encodeURIComponent('AccountNameFromSettings'))}/foldersV2/#{encodeURIComponent(encodeURIComponent('JTJmY29udGFpbmVyMQ=='))}",
"queries": {
"nextPageMarker": "",
"useFlatListing": false
}
},
"metadata": {
"JTJmY29udGFpbmVyMQ==": "/container1"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"manual": {
"inputs": {
"schema": {}
},
"kind": "Http",
"type": "Request"
}
}
},
"parameters": {
"$connections": {
"value": {
"azureblob": {
"connectionId": "/subscriptions/<SUBSCRIPTION ID>/resourceGroups/<RESOURCE GROUP NAME>/providers/Microsoft.Web/connections/azureblob",
"connectionName": "azureblob",
"id": "/subscriptions/<SUBSCRIPTION ID>/providers/Microsoft.Web/locations/centralus/managedApis/azureblob"
},
"sql": {
"connectionId": "/subscriptions/<SUBSCRIPTION ID>/resourceGroups/<RESOURCE GROUP NAME>/providers/Microsoft.Web/connections/sql",
"connectionName": "sql",
"id": "/subscriptions/<SUBSCRIPTION ID>/providers/Microsoft.Web/locations/centralus/managedApis/sql"
}
}
}
}
}

Azure Logic App HTTP Action step - dynamically get endOfDate date

i have an azure logic app with recurrence that will call api endpoint every midnight, im passing in two date properties in my request body that will include start of day and end of day.
Logic app has expression startOfDay() however they dont have endOfDay(), how can I dynamically get end of day in UTC format like startOfDay() does?
Thanks
this is how my request body looks like but its also complaining about #startOfDay()
{
"organizationId": 'f41186b0-7f09-42c5-8a9d-81a2ad2b0e61',
"attemptedDeliveries": true,
"cancelDateStart": #{startOfDay()},
"cancelDateEnd": ""
}
There is no direct expression for endOfDay but one of the workarounds is to addToTime and 'subtractFromTime' from startOfDay to get the endOfDay. Consider I'm taking the timestamp to be UtcNow() and to calculate the endOfDay I'm using the below expression.
subtractFromTime(addToTime(outputs('startOfDay'),1,'Day','o'),1,'Second','yyyy-MM-ddTHH:mm:ss')
I'm using Parse Json in order to retrieve the inner Json details for future use. By doing this, you can have a custom JSON created using Compose() connector.
Result:-
Codeview
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Compose": {
"inputs": {
"attemptedDeliveries": "#body('Parse_JSON')?['attemptedDeliveries']",
"cancelDateEnd": "#{outputs('endOfDay')}",
"cancelDateStart": "#{outputs('startOfDay')}",
"organizationId": "#{body('Parse_JSON')?['organizationId']}"
},
"runAfter": {
"endOfDay": [
"Succeeded"
]
},
"type": "Compose"
},
"Parse_JSON": {
"inputs": {
"content": "#triggerBody()",
"schema": {
"properties": {
"attemptedDeliveries": {
"type": "boolean"
},
"cancelDateEnd": {
"type": "string"
},
"cancelDateStart": {
"type": "string"
},
"organizationId": {
"type": "string"
}
},
"type": "object"
}
},
"runAfter": {},
"type": "ParseJson"
},
"endOfDay": {
"inputs": "#subtractFromTime(addToTime(startOfDay(utcNow()),1,'Day','o'),1,'Second','yyyy-MM-ddTHH:mm:ss')",
"runAfter": {
"startOfDay": [
"Succeeded"
]
},
"type": "Compose"
},
"startOfDay": {
"inputs": "#startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ss')",
"runAfter": {
"Parse_JSON": [
"Succeeded"
]
},
"type": "Compose"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {},
"triggers": {
"manual": {
"inputs": {
"schema": {}
},
"kind": "Http",
"type": "Request"
}
}
},
"parameters": {}
}
Here is the json that I'm receiving from my body of Http trigger
{
"organizationId": "f41186b0-7f09-42c5-8a9d-81a2ad2b0e61",
"attemptedDeliveries": true,
"cancelDateStart": "",
"cancelDateEnd": ""
}
Updated Answer
After the follow up here my logic app
Result:
Codeview
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"endOfDay": {
"inputs": "#subtractFromTime(addToTime(startOfDay(utcNow()),1,'Day','o'),1,'Second','yyyy-MM-ddTHH:mm:ss')",
"runAfter": {
"startOfDay": [
"Succeeded"
]
},
"type": "Compose"
},
"startOfDay": {
"inputs": "#startOfDay(utcNow(),'yyyy-MM-ddTHH:mm:ss')",
"runAfter": {},
"type": "Compose"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {},
"triggers": {
"Recurrence": {
"evaluatedRecurrence": {
"frequency": "Second",
"interval": 30
},
"recurrence": {
"frequency": "Second",
"interval": 30
},
"type": "Recurrence"
}
}
},
"parameters": {}
}
After endOfDay connector you can add 4 parallel HTTP triggers and add logic to it.
REFERENCES: Reference guide to workflow expression functions in Azure Logic Apps and Power Automate

Logic app tracked properties are not getting logged in log analytic workspace

Tracked properties are not getting logged in log analytic workspace. I have configured the required settings in diagnostic settings section of logic app.
**Below is logic app code-**
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Initialize_variable": {
"inputs": {
"variables": [
{
"name": "test",
"type": "string",
"value": "#triggerBody()?['uid']"
}
]
},
"runAfter": {},
"type": "InitializeVariable"
},
"Response": {
"inputs": {
"body": "#variables('test')",
"statusCode": 200
},
"kind": "Http",
"runAfter": {
"Initialize_variable": [
"Succeeded"
]
},
"trackedProperties": {
"OutputBlobName": "#triggerBody()?['uid']"
},
"type": "Response"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {},
"triggers": {
"manual": {
"inputs": {
"schema": {
"properties": {
"uid": {
"type": "string"
}
},
"type": "object"
}
},
"kind": "Http",
"type": "Request"
}
}
},
"parameters": {}
}
Is there any configuration at workspace level that I ma missing.
I believe you need to modify your code a bit. I am sharing an example which might help:
Image 1:
changing this ( Image 1) to the this (Image 2) did the trick :
Image 2:
Reference : https://www.connected-pawns.com/2018/06/19/cant-see-tracked-properties-logic-app/
Also you can check : https://peterrombouts.nl/2019/04/01/logicapps-monitoring-with-log-analytics/
Late to the party here, but since you've already got the property you want to track stored in a variable, you can attach tracked properties to that action:
"Initialize_variable": {
"inputs": {
"variables": [
{"name": "test",
"type": "string",
"value": "#triggerBody()?['uid']" }
] },
"runAfter": {},
"type": "InitializeVariable",
"trackedProperties": {
"OutputBlobName": "#action().inputs.variables[0].value"
}
}

Resources